Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyPassword ¶
Types ¶
type Department ¶
type Department struct {
ID uint `json:"id" gorm:"primarykey"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Name string `json:"name"`
}
Department Database
type Employe ¶
type Employe struct {
ID uint `json:"id" gorm:"primarykey"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
FirstName string `json:"firstname" validate:"required,min=2,max=30"`
LastName string `json:"lastname" validate:"required,min=2,max=30"`
Description string `json:"description,omitempty" validate:"omitempty,min=20,max=300"`
BatchID string `json:"batch_id" gorm:"unique"`
DepartmentID uint `json:"department_id"`
Violations []Violation `json:"violations" gorm:"foreignKey:ID"`
IsActive bool `json:"isactive"`
}
Employe Database
type HMI ¶
type HMI struct {
ID uint `json:"id" gorm:"primarykey"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
MachineID uint `json:"machine_id"`
Name string `json:"name"`
IP pgtype.Inet `json:"ip" gorm:"type:inet"`
Port int `json:"port"`
MAC pgtype.Macaddr `json:"mac" gorm:"type:macaddr"`
HMIUsers []HMIUser `json:"hmiusers" gorm:"foreignKey:ID"`
}
type Machine ¶
type Machine struct {
ID uint `json:"id" gorm:"primarykey"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
LineID uint `json:"line_id"`
Name string `json:"name"`
Stations []Station `json:"stastions" gorm:"foreignKey:ID"`
PLCs []PLC `json:"plcs" gorm:"foreignKey:ID"`
HMIs []HMI `json:"hmis" gorm:"foreignKey:ID"`
IsActive bool `json:"is_active"`
}
type PLC ¶
type PLC struct {
ID uint `json:"id" gorm:"primarykey"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
MachineID uint `json:"machine_id"`
Name string `json:"name"`
IP pgtype.Inet `json:"ip" gorm:"type:inet"`
Port int `json:"port"`
MAC pgtype.Macaddr `json:"mac" gorm:"type:macaddr"`
}
type Station ¶
type Station struct {
ID uint `json:"id" gorm:"primarykey"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
MachineID uint `json:"machine_id"`
Name string `json:"name"`
ShortName string `json:"short_name"`
Description string `json:"description"`
IsActive bool `json:"is_active"`
}
type User ¶
type User struct {
ID uint `json:"id" gorm:"primarykey"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Name string `json:"name" gorm:"unique" validate:"required,min=3,max=20"`
Email string `json:"email" gorm:"unique" validate:"required,email"`
Password []byte `json:"password" validate:"required"`
IsAdmin bool `json:"is_admin"`
}
Click to show internal directories.
Click to hide internal directories.