Documentation ¶
Index ¶
- Variables
- type Act
- type ActsDetail
- type Category
- type Credentials
- type Defect
- type ElementEquipment
- type ElementType
- type JournalItem
- type NewCredentials
- type Object
- type ObjectsDetail
- type Order
- type Profile
- type Review
- type Search
- type Session
- type TechTask
- type TechTasks
- type TimeRange
- type Timestamp
- type UpdateCredentials
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyEmail = errors.New("empty email") ErrEmptyPhone = errors.New("empty phone") )
View Source
var (
ErrEmptyCredentials = errors.New("empty credentials")
)
Functions ¶
This section is empty.
Types ¶
type Act ¶
type Act struct { ID int `json:"id" db:"id"` StaffID int `json:"staff_id" db:"staff_id"` StaffDesc *Profile `json:"staff_desc,omitempty"` SuperviserID int `json:"superviser_id" db:"superviser_id"` SuperviserDesc *Profile `json:"superviser_desc,omitempty"` ObjectID int `json:"object_id" db:"object_id"` ObjectDesc *Object `json:"object_desc,omitempty"` ReviewID int `json:"review_id" db:"review_id"` ReviewDesc *Review `json:"review_desc,omitempty"` EndAt types.NullTime `json:"end_at" db:"end_at"` Finished bool `json:"finished" db:"finished"` Approved bool `json:"approved" db:"approved"` Reverted bool `json:"reverted" db:"reverted"` StaffSign string `json:"staff_sign" db:"staff_sign"` StaffSignAt types.NullTime `json:"staff_sign_at" db:"staff_sign_at"` SuperviserSign string `json:"superviser_sign" db:"superviser_sign"` SuperviserSignAt types.NullTime `json:"superviser_sign_at" db:"superviser_sign_at"` ActDetailDesc interface{} `json:"act_detail_desc"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*Act) SQLParamsRequest ¶
type ActsDetail ¶
type ActsDetail struct { ActID int `json:"act_id" db:"act_id"` ElementID int `json:"element_id" db:"element_id"` ElementDesc interface{} `json:"element_desc"` Defects types.NullMeta `json:"defects" db:"defects"` DefectsDesc interface{} `json:"defects_desc"` Category int `json:"category" db:"category"` RepairedAt types.NullTime `json:"repaired_at" db:"repaired_at"` Images types.NullMeta `json:"images" db:"images"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*ActsDetail) SQLParamsRequest ¶
func (u *ActsDetail) SQLParamsRequest() []string
type Category ¶
type Category struct { ID int `json:"id" db:"id"` RapairPeriod int `json:"rapair_period" db:"rapair_period"` Description string `json:"description" db:"description"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*Category) SQLParamsRequest ¶
type Credentials ¶
type Credentials struct { Password string `json:"user_password"` Email string `json:"user_email"` Phone string `json:"user_phone"` }
Credentials is a struct for check user
func (*Credentials) String ¶
func (c *Credentials) String() string
func (*Credentials) Validate ¶
func (c *Credentials) Validate() error
type Defect ¶
type Defect struct { ID int `json:"id" db:"id"` ElementType int `json:"element_type" db:"element_type"` Description string `json:"description" db:"description"` Сategory int `json:"category" db:"category"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*Defect) SQLParamsRequest ¶
type ElementEquipment ¶
type ElementEquipment struct { ID int `json:"id" db:"id"` Description string `json:"description" db:"description"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*ElementEquipment) SQLParamsRequest ¶
func (u *ElementEquipment) SQLParamsRequest() []string
type ElementType ¶
type ElementType struct { ID int `json:"id" db:"id"` Description string `json:"description" db:"description"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*ElementType) SQLParamsRequest ¶
func (u *ElementType) SQLParamsRequest() []string
type JournalItem ¶
type JournalItem struct { FindAd types.NullTime `json:"find_at"` ObjectDesc *Object `json:"object_desc"` ElementDesc interface{} `json:"element_desc"` ElementTypeDesk interface{} `json:"element_type_desc"` DefectsDesc interface{} `json:"defects_desc"` StaffDesc interface{} `json:"staff_desc"` Category int `json:"category" db:"category"` RapairAt types.NullTime `json:"repair_at" db:"repair_at"` }
type NewCredentials ¶
type NewCredentials struct { Password string `json:"user_password"` Email string `json:"user_email"` Phone string `json:"user_phone"` Role types.Role `json:"user_role"` }
NewCredentials is a stuct for create user
func (*NewCredentials) String ¶
func (c *NewCredentials) String() string
func (*NewCredentials) Validate ¶
func (c *NewCredentials) Validate() error
type Object ¶
type Object struct { ID int `json:"id" db:"id"` Address string `json:"object_address" db:"object_address"` Name string `json:"object_name" db:"object_name"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*Object) SQLParamsRequest ¶
type ObjectsDetail ¶
type ObjectsDetail struct { ObjectID int `json:"object_id" db:"object_id"` ElementID int `json:"element_id" db:"element_id"` ElementName string `json:"element_name" db:"element_name"` ElementType int `json:"element_type" db:"element_type"` ElementEqupment int `json:"element_equipment" db:"element_equipment"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*ObjectsDetail) SQLParamsRequest ¶
func (u *ObjectsDetail) SQLParamsRequest() []string
type Order ¶
type Order struct { ID int `json:"id" db:"id"` ObjectID int `json:"object_id" db:"object_id"` ObjectDesc *Object `json:"object_desc"` TechTasksDesc interface{} `json:"tech_tasks_desk"` SuperviserDesc *Profile `json:"superviser_desc"` TechTasks types.NullMeta `json:"tech_tasks" db:"tech_tasks"` SuperviserID int `json:"superviser_id" db:"superviser_id"` StartAt types.NullTime `json:"start_at" db:"start_at"` EndAt types.NullTime `json:"end_at" db:"end_at"` StaffID int `json:"staff_id" db:"staff_id"` StaffDesc *Profile `json:"staff_desc"` SuperviserSign string `json:"superviser_sign" db:"superviser_sign"` SuperviserSignEt types.NullTime `json:"superviser_sign_at" db:"superviser_sign_at"` StaffSign string `json:"staff_sign" db:"staff_sign"` StaffSignEt types.NullTime `json:"staff_sign_at" db:"staff_sign_at"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*Order) SQLParamsRequest ¶
type Profile ¶
type Profile struct { ID int `json:"id" db:"id"` FirstName string `json:"user_first_name" db:"user_first_name"` MiddleName string `json:"user_middle_name" db:"user_middle_name"` LastName string `json:"user_last_name" db:"user_last_name"` Position string `json:"user_position" db:"user_position"` Company string `json:"user_company" db:"user_company"` UserElectroGroup string `json:"user_electro_group" db:"user_electro_group"` PrivateKey string `json:"-" db:"user_private_key"` PublicKey string `json:"user_public_key" db:"user_public_key"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*Profile) SQLParamsRequest ¶
type Review ¶
type Review struct { ID int `json:"id" db:"id"` Description string `json:"description" db:"description"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*Review) SQLParamsRequest ¶
type Session ¶
type Session struct { ID string `json:"id" db:"id"` UserID int `json:"user_id" db:"user_id"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*Session) SQLParamsRequest ¶
type TechTask ¶
type TechTask struct { ID int `json:"id" db:"id"` Description string `json:"description" db:"description"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*TechTask) SQLParamsRequest ¶
type TechTasks ¶
type TechTasks struct { ID int `json:"id" db:"id"` Description string `json:"description" db:"description"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*TechTasks) SQLParamsRequest ¶
type Timestamp ¶
type Timestamp struct { CreatedAt types.NullTime `json:"created_at" db:"created_at"` UpdatedAt types.NullTime `json:"updated_at" db:"updated_at"` DeletedAt types.NullTime `json:"deleted_at" db:"deleted_at"` }
func (*Timestamp) CreateTimestamp ¶
func (t *Timestamp) CreateTimestamp()
func (*Timestamp) DeleteTimestamp ¶
func (t *Timestamp) DeleteTimestamp()
func (*Timestamp) UpdateTimestamp ¶
func (t *Timestamp) UpdateTimestamp()
type UpdateCredentials ¶
type UpdateCredentials struct { Password string `json:"user_password"` OldPassword string `json:"user_old_password"` }
UpdateCredentials is a structs for update user's Credentials
func (*UpdateCredentials) Validate ¶
func (c *UpdateCredentials) Validate() error
type User ¶
type User struct { ID int `json:"id" db:"id"` Hash string `json:"-" db:"user_hash"` Role types.Role `json:"user_role" db:"user_role"` Email string `json:"user_email" db:"user_email"` Phone string `json:"user_phone" db:"user_phone"` Meta types.NullMeta `json:"meta" db:"meta"` Timestamp }
func (*User) SQLParamsRequest ¶
Click to show internal directories.
Click to hide internal directories.