model

package
v0.0.0-...-44a2381 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
	ErrExists   = errors.New("already exists")
)

Functions

func NewError

func NewError(model string, err error) error

Types

type ID

type ID = uint

type Session

type Session struct {
	ID        ID        `json:"id" db:"id"`
	CreatedAt time.Time `json:"createdAt" db:"created_at"`
	UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`

	Begin time.Time  `json:"begin" db:"sess_begin"`
	End   *time.Time `json:"end" db:"sess_end"`

	Task ID `json:"taskId" db:"task_id"`
	User ID `json:"userId" db:"user_id"`
}

type User

type User struct {
	ID        ID        `json:"id" db:"id"`
	CreatedAt time.Time `json:"createdAt" db:"created_at"`
	UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`

	Name       string  `json:"name" db:"name"`
	Surname    string  `json:"surname" db:"surname"`
	Patronymic *string `json:"patronymic,omitempty" db:"patronymic"`

	PassportSerie  int `json:"passportSerie" db:"passport_serie"`
	PassportNumber int `json:"passwortNumber" db:"passport_number"`

	Address string `json:"address" db:"address"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL