Documentation ¶
Index ¶
- type Base
- type Employee
- func (e *Employee) Activate(hireDate time.Time) error
- func (e *Employee) CompareHashAndPassword(password string) error
- func (e *Employee) Deactivate(terminationDate time.Time) error
- func (e *Employee) HashedPassword(password string) error
- func (e *Employee) SetEmail(email string) error
- func (e *Employee) SetHireDate(hireDate time.Time) error
- func (e *Employee) SetName(name string) error
- func (e *Employee) SetPosition(position string) error
- func (e *Employee) SetPresentation(presentation string) error
- type EmployeesSkill
- type Skill
- type XP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Employee ¶
type Employee struct { Base `json:",inline" valid:"-"` Name string `json:"name" gorm:"column:name;not null" valid:"required"` Email string `json:"email" gorm:"column:email;not null" valid:"email"` Password string `json:"-" gorm:"column:password;not null" valid:"required"` Position string `json:"position" gorm:"column:position;not null" valid:"required"` Presentation string `json:"presentation" gorm:"column:presentation" valid:"required"` HireDate time.Time `json:"hire_date" gorm:"column:hire_date" valid:"required"` TerminationDate time.Time `json:"termination_date" gorm:"column:termination_date" valid:"-"` IsActive bool `json:"is_active" gorm:"column:is_active;not null" valid:"-"` Skills []*Skill `json:"-" gorm:"many2many:employees_skills" valid:"-"` EmployeesSkills []*EmployeesSkill `json:"-" gorm:"foreignKey:EmployeeID" valid:"-"` }
func NewEmployee ¶
func (*Employee) CompareHashAndPassword ¶
func (*Employee) HashedPassword ¶
func (*Employee) SetPosition ¶
func (*Employee) SetPresentation ¶
type EmployeesSkill ¶
type EmployeesSkill struct { XP XP `json:"xp" gorm:"column:xp;not null" valid:"xp"` Note string `json:"note" gorm:"column:note;varchar(500)" valid:"-"` SkillID string `gorm:"column:skill_id;type:uuid;not null;unique_index:unique_employee_skill;primaryKey" valid:"uuid"` Skill *Skill `json:"-" valid:"-"` EmployeeID string `gorm:"column:employee_id;type:uuid;not null;unique_index:unique_employee_skill;primaryKey" valid:"uuid"` Employee *Employee `json:"-" valid:"-"` }
func NewEmployeesSkill ¶
func (*EmployeesSkill) SetNote ¶
func (e *EmployeesSkill) SetNote(note string) error
func (*EmployeesSkill) SetXp ¶
func (e *EmployeesSkill) SetXp(xp XP) error
type Skill ¶
type Skill struct { Base `json:",inline" valid:"-"` Name string `json:"name" gorm:"column:name;type:varchar(255);unique" valid:"-"` Employees []*Employee `json:"-" gorm:"many2many:employees_skils" valid:"-"` EmployeesSkills []*EmployeesSkill `json:"-" gorm:"foreignKey:SkillID" valid:"-"` }
Click to show internal directories.
Click to hide internal directories.