Documentation ¶
Index ¶
- func InjectEmployee(s *Employee)
- func LoadEmployee() baseiface.ISingleton
- type Department
- func (entity *Department) AutoMigrate(db *gorm.DB) error
- func (entity *Department) GetCode() string
- func (entity *Department) GetDepPath() string
- func (entity *Department) GetId() int32
- func (entity *Department) GetIsParent() int8
- func (entity *Department) GetMngrId() int32
- func (entity *Department) GetName() string
- func (entity *Department) GetParentId() int32
- func (entity *Department) GetType() int32
- func (entity *Department) Ini(iniPk bool) *Department
- func (entity *Department) IniNil(iniPk bool) *Department
- func (entity *Department) PkeyName() string
- func (entity *Department) PkeyValue() int32
- func (entity *Department) SetCode(Code string)
- func (entity *Department) SetDepPath(DepPath string)
- func (entity *Department) SetId(Id int32)
- func (entity *Department) SetIsParent(IsParent int8)
- func (entity *Department) SetMngrId(MngrId int32)
- func (entity *Department) SetName(Name string)
- func (entity *Department) SetParentId(ParentId int32)
- func (entity *Department) SetType(Type int32)
- func (entity *Department) String() string
- func (entity *Department) TableName() string
- func (entity *Department) ToString() string
- func (entity *Department) Unmarshal(body string) error
- func (entity *Department) UnmarshalBy(body []byte) error
- type DepartmentDto
- type DepartmentParams
- type Employee
- func (entity *Employee) AutoMigrate(db *gorm.DB) error
- func (entity *Employee) GetAddress() string
- func (entity *Employee) GetBeginContract() time.Time
- func (entity *Employee) GetBeginDate() time.Time
- func (entity *Employee) GetBirthday() time.Time
- func (entity *Employee) GetCode() string
- func (entity *Employee) GetContractTerm() float64
- func (entity *Employee) GetConversionTime() time.Time
- func (entity *Employee) GetDepartmentId() int32
- func (entity *Employee) GetEmail() string
- func (entity *Employee) GetEndContract() time.Time
- func (entity *Employee) GetEngageForm() string
- func (entity *Employee) GetGender() string
- func (entity *Employee) GetId() int32
- func (entity *Employee) GetIdCard() string
- func (entity *Employee) GetJobLevelId() int32
- func (entity *Employee) GetName() string
- func (entity *Employee) GetNationId() int32
- func (entity *Employee) GetNativePlace() string
- func (entity *Employee) GetNotWorkDate() time.Time
- func (entity *Employee) GetPhone() string
- func (entity *Employee) GetPoliticId() int32
- func (entity *Employee) GetPosId() int32
- func (entity *Employee) GetSchool() string
- func (entity *Employee) GetSpecialty() string
- func (entity *Employee) GetTiptopDegree() string
- func (entity *Employee) GetWedlock() string
- func (entity *Employee) GetWorkAge() int32
- func (entity *Employee) GetWorkId() string
- func (entity *Employee) GetWorkState() string
- func (entity *Employee) Ini(iniPk bool) *Employee
- func (entity *Employee) IniNil(iniPk bool) *Employee
- func (entity *Employee) SetAddress(Address string)
- func (entity *Employee) SetBeginContract(BeginContract time.Time)
- func (entity *Employee) SetBeginDate(BeginDate time.Time)
- func (entity *Employee) SetBirthday(Birthday time.Time)
- func (entity *Employee) SetCode(Code string)
- func (entity *Employee) SetContractTerm(ContractTerm float64)
- func (entity *Employee) SetConversionTime(ConversionTime time.Time)
- func (entity *Employee) SetDepartmentId(DepartmentId int32)
- func (entity *Employee) SetEmail(Email string)
- func (entity *Employee) SetEndContract(EndContract time.Time)
- func (entity *Employee) SetEngageForm(EngageForm string)
- func (entity *Employee) SetGender(Gender string)
- func (entity *Employee) SetId(Id int32)
- func (entity *Employee) SetIdCard(IdCard string)
- func (entity *Employee) SetJobLevelId(JobLevelId int32)
- func (entity *Employee) SetName(Name string)
- func (entity *Employee) SetNationId(NationId int32)
- func (entity *Employee) SetNativePlace(NativePlace string)
- func (entity *Employee) SetNotWorkDate(NotWorkDate time.Time)
- func (entity *Employee) SetPhone(Phone string)
- func (entity *Employee) SetPoliticId(PoliticId int32)
- func (entity *Employee) SetPosId(PosId int32)
- func (entity *Employee) SetSchool(School string)
- func (entity *Employee) SetSpecialty(Specialty string)
- func (entity *Employee) SetTiptopDegree(TiptopDegree string)
- func (entity *Employee) SetWedlock(Wedlock string)
- func (entity *Employee) SetWorkAge(WorkAge int32)
- func (entity *Employee) SetWorkId(WorkId string)
- func (entity *Employee) SetWorkState(WorkState string)
- func (entity *Employee) String() string
- func (entity *Employee) TableName() string
- func (entity *Employee) ToString() string
- func (entity *Employee) Unmarshal(body string) error
- func (entity *Employee) UnmarshalBy(body []byte) error
- type EmployeeDto
- type EmployeeParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectEmployee ¶
func InjectEmployee(s *Employee)
func LoadEmployee ¶
func LoadEmployee() baseiface.ISingleton
Types ¶
type Department ¶
type Department struct { /* */ Id int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:''" json:"id"` /* 编码 */ Code string `gorm:"column:code;type:varchar(32);comment:'编码';default:'none'" json:"code"` /* 部门名称 */ Name string `gorm:"column:name;type:varchar(32);comment:'部门名称'" json:"name"` /* */ ParentId int32 `gorm:"column:parent_id;type:int(11);comment:''" json:"parent_id"` /* */ DepPath string `gorm:"column:dep_path;type:varchar(255);comment:''" json:"dep_path"` Enabled uint8 `gorm:"column:enabled;type:bit(1);comment:''" json:"enabled"` IsParent int8 `gorm:"column:is_parent;type:tinyint(1);comment:'';default:0" json:"is_parent"` /* 负责人 */ MngrId int32 `gorm:"column:mngr_id;type:int(11);comment:'负责人';default:0" json:"mngr_id"` /* 0-部门 1-班组 */ Type int32 `gorm:"column:type;type:int(11);comment:'0-部门 1-班组';default:0" json:"type"` }
func NewDepartment ¶
func NewDepartment() *Department
func (*Department) GetCode ¶
func (entity *Department) GetCode() string
func (*Department) GetDepPath ¶
func (entity *Department) GetDepPath() string
func (*Department) GetId ¶
func (entity *Department) GetId() int32
func (*Department) GetIsParent ¶
func (entity *Department) GetIsParent() int8
func (*Department) GetMngrId ¶
func (entity *Department) GetMngrId() int32
func (*Department) GetName ¶
func (entity *Department) GetName() string
func (*Department) GetParentId ¶
func (entity *Department) GetParentId() int32
func (*Department) GetType ¶
func (entity *Department) GetType() int32
func (*Department) Ini ¶
func (entity *Department) Ini(iniPk bool) *Department
iniPk bool:是否初始化主键Id 初始化指针
func (*Department) IniNil ¶
func (entity *Department) IniNil(iniPk bool) *Department
iniPk bool:是否初始化主键Id 初始化指针
func (*Department) PkeyName ¶
func (entity *Department) PkeyName() string
func (*Department) PkeyValue ¶
func (entity *Department) PkeyValue() int32
func (*Department) SetCode ¶
func (entity *Department) SetCode(Code string)
func (*Department) SetDepPath ¶
func (entity *Department) SetDepPath(DepPath string)
func (*Department) SetId ¶
func (entity *Department) SetId(Id int32)
func (*Department) SetIsParent ¶
func (entity *Department) SetIsParent(IsParent int8)
func (*Department) SetMngrId ¶
func (entity *Department) SetMngrId(MngrId int32)
func (*Department) SetName ¶
func (entity *Department) SetName(Name string)
func (*Department) SetParentId ¶
func (entity *Department) SetParentId(ParentId int32)
func (*Department) SetType ¶
func (entity *Department) SetType(Type int32)
func (*Department) TableName ¶
func (entity *Department) TableName() string
gorm默认生成的表名是结构名+'s',所以必须以结构方法指定!
func (*Department) ToString ¶
func (entity *Department) ToString() string
func (*Department) Unmarshal ¶
func (entity *Department) Unmarshal(body string) error
func (*Department) UnmarshalBy ¶
func (entity *Department) UnmarshalBy(body []byte) error
type DepartmentDto ¶
type DepartmentDto struct { /* */ Id int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:''" json:"id"` /* 编码 */ Code string `gorm:"column:code;type:varchar(32);comment:'编码';default:\'none\'" json:"code"` /* 部门名称 */ Name string `gorm:"column:name;type:varchar(32);comment:'部门名称'" json:"name"` /* */ ParentId int32 `gorm:"column:parent_id;type:int(11);comment:''" json:"parent_id"` /* */ DepPath string `gorm:"column:dep_path;type:varchar(255);comment:''" json:"dep_path"` /* */ Enabled basemodel.BitField `gorm:"column:enabled;type:bit(1);comment:''" json:"enabled"` /* */ IsParent int8 `gorm:"column:is_parent;type:tinyint(1);comment:'';default:0" json:"is_parent"` /* 负责人 */ MngrId int32 `gorm:"column:mngr_id;type:int(11);comment:'负责人';default:0" json:"mngr_id"` /* 0-部门 1-班组 */ Type int32 `gorm:"column:type;type:int(11);comment:'0-部门 1-班组';default:0" json:"type"` }
type DepartmentParams ¶
type DepartmentParams struct { /* */ Id *int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:''" json:"id"` /* 编码 */ Code *string `gorm:"column:code;type:varchar(32);comment:'编码';default:\'none\'" json:"code"` /* 部门名称 */ Name *string `gorm:"column:name;type:varchar(32);comment:'部门名称'" json:"name"` /* */ ParentId *int32 `gorm:"column:parent_id;type:int(11);comment:''" json:"parent_id"` /* */ DepPath *string `gorm:"column:dep_path;type:varchar(255);comment:''" json:"dep_path"` /* */ Enabled *basemodel.BitField `gorm:"column:enabled;type:bit(1);comment:''" json:"enabled"` /* */ IsParent *int8 `gorm:"column:is_parent;type:tinyint(1);comment:'';default:0" json:"is_parent"` /* 负责人 */ MngrId *int32 `gorm:"column:mngr_id;type:int(11);comment:'负责人';default:0" json:"mngr_id"` /* 0-部门 1-班组 */ Type *int32 `gorm:"column:type;type:int(11);comment:'0-部门 1-班组';default:0" json:"type"` }
type Employee ¶
type Employee struct { // EmployeeBase basedto.BaseEntity /* 员工编号 */ Id int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:'员工编号'" json:"id"` /* 所属部门 */ DepartmentId int32 `gorm:"column:department_id;type:int(11);comment:'所属部门';default:0" json:"department_id"` /* 员工姓名 */ Name string `gorm:"column:name;type:varchar(16);comment:'员工姓名'" json:"name"` /* 性别 */ Gender string `gorm:"column:gender;type:char(4);comment:'性别'" json:"gender"` /* 出生日期 */ Birthday time.Time `gorm:"column:birthday;type:date;comment:'出生日期'" json:"birthday"` /* 身份证号 */ IdCard string `gorm:"column:id_card;type:char(18);comment:'身份证号'" json:"id_card"` /* 婚姻状况 */ Wedlock string `gorm:"column:wedlock;type:varchar(8);comment:'婚姻状况'" json:"wedlock"` /* 民族 */ NationId int32 `gorm:"column:nation_id;type:int(8);comment:'民族'" json:"nation_id"` /* 籍贯 */ NativePlace string `gorm:"column:native_place;type:varchar(20);comment:'籍贯'" json:"native_place"` /* 政治面貌 */ PoliticId int32 `gorm:"column:politic_id;type:int(8);comment:'政治面貌'" json:"politic_id"` /* 邮箱 */ Email string `gorm:"column:email;type:varchar(20);comment:'邮箱'" json:"email"` /* 电话号码 */ Phone string `gorm:"column:phone;type:varchar(11);comment:'电话号码'" json:"phone"` /* 联系地址 */ Address string `gorm:"column:address;type:varchar(64);comment:'联系地址'" json:"address"` /* 职称ID */ JobLevelId int32 `gorm:"column:job_level_id;type:int(11);comment:'职称ID'" json:"job_level_id"` /* 职位ID */ PosId int32 `gorm:"column:pos_id;type:int(11);comment:'职位ID'" json:"pos_id"` /* 聘用形式 */ EngageForm string `gorm:"column:engage_form;type:varchar(8);comment:'聘用形式'" json:"engage_form"` /* 最高学历 */ TiptopDegree string `gorm:"column:tiptop_degree;type:varchar(8);comment:'最高学历'" json:"tiptop_degree"` /* 所属专业 */ Specialty string `gorm:"column:specialty;type:varchar(32);comment:'所属专业'" json:"specialty"` /* 毕业院校 */ School string `gorm:"column:school;type:varchar(32);comment:'毕业院校'" json:"school"` /* 入职日期 */ BeginDate time.Time `gorm:"column:begin_date;type:date;comment:'入职日期'" json:"begin_date"` /* 在职状态 */ WorkState string `gorm:"column:work_state;type:varchar(8);comment:'在职状态';default:\'在职\'" json:"work_state"` /* 工号 */ Code string `gorm:"column:code;type:varchar(8);comment:'工号'" json:"code"` /* 合同期限 */ ContractTerm float64 `gorm:"column:contract_term;type:double;comment:'合同期限'" json:"contract_term"` /* 转正日期 */ ConversionTime time.Time `gorm:"column:conversion_time;type:date;comment:'转正日期'" json:"conversion_time"` /* 离职日期 */ NotWorkDate time.Time `gorm:"column:not_work_date;type:date;comment:'离职日期'" json:"not_work_date"` /* 合同起始日期 */ BeginContract time.Time `gorm:"column:begin_contract;type:date;comment:'合同起始日期'" json:"begin_contract"` /* 合同终止日期 */ EndContract time.Time `gorm:"column:end_contract;type:date;comment:'合同终止日期'" json:"end_contract"` /* 工龄 */ WorkAge int32 `gorm:"column:work_age;type:int(11);comment:'工龄'" json:"work_age"` /* */ WorkId string `gorm:"column:work_id;type:varchar(16);comment:''" json:"work_id"` }
func FindBeanEmployee ¶
func FindBeanEmployee() *Employee
func NewEmployee ¶
func NewEmployee() *Employee
func (*Employee) GetAddress ¶
func (*Employee) GetBeginContract ¶
func (*Employee) GetBeginDate ¶
func (*Employee) GetBirthday ¶
func (*Employee) GetContractTerm ¶
func (*Employee) GetConversionTime ¶
func (*Employee) GetDepartmentId ¶
func (*Employee) GetEndContract ¶
func (*Employee) GetEngageForm ¶
func (*Employee) GetJobLevelId ¶
func (*Employee) GetNationId ¶
func (*Employee) GetNativePlace ¶
func (*Employee) GetNotWorkDate ¶
func (*Employee) GetPoliticId ¶
func (*Employee) GetSpecialty ¶
func (*Employee) GetTiptopDegree ¶
func (*Employee) GetWedlock ¶
func (*Employee) GetWorkAge ¶
func (*Employee) GetWorkState ¶
func (*Employee) SetAddress ¶
func (*Employee) SetBeginContract ¶
func (*Employee) SetBeginDate ¶
func (*Employee) SetBirthday ¶
func (*Employee) SetContractTerm ¶
func (*Employee) SetConversionTime ¶
func (*Employee) SetDepartmentId ¶
func (*Employee) SetEndContract ¶
func (*Employee) SetEngageForm ¶
func (*Employee) SetJobLevelId ¶
func (*Employee) SetNationId ¶
func (*Employee) SetNativePlace ¶
func (*Employee) SetNotWorkDate ¶
func (*Employee) SetPoliticId ¶
func (*Employee) SetSpecialty ¶
func (*Employee) SetTiptopDegree ¶
func (*Employee) SetWedlock ¶
func (*Employee) SetWorkAge ¶
func (*Employee) SetWorkState ¶
func (*Employee) UnmarshalBy ¶
type EmployeeDto ¶
type EmployeeDto struct { /* 员工编号 */ Id int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:'员工编号'" json:"id"` /* 所属部门 */ DepartmentId int32 `gorm:"column:department_id;type:int(11);comment:'所属部门';default:0" json:"department_id"` /* 员工姓名 */ Name string `gorm:"column:name;type:varchar(16);comment:'员工姓名'" json:"name"` /* 性别 */ Gender string `gorm:"column:gender;type:char(4);comment:'性别'" json:"gender"` /* 出生日期 */ Birthday int64 `gorm:"column:birthday;type:date;comment:'出生日期'" json:"birthday"` /* 身份证号 */ IdCard string `gorm:"column:id_card;type:char(18);comment:'身份证号'" json:"id_card"` /* 婚姻状况 */ Wedlock string `gorm:"column:wedlock;type:varchar(8);comment:'婚姻状况'" json:"wedlock"` /* 民族 */ NationId int32 `gorm:"column:nation_id;type:int(8);comment:'民族'" json:"nation_id"` /* 籍贯 */ NativePlace string `gorm:"column:native_place;type:varchar(20);comment:'籍贯'" json:"native_place"` /* 政治面貌 */ PoliticId int32 `gorm:"column:politic_id;type:int(8);comment:'政治面貌'" json:"politic_id"` /* 邮箱 */ Email string `gorm:"column:email;type:varchar(20);comment:'邮箱'" json:"email"` /* 电话号码 */ Phone string `gorm:"column:phone;type:varchar(11);comment:'电话号码'" json:"phone"` /* 联系地址 */ Address string `gorm:"column:address;type:varchar(64);comment:'联系地址'" json:"address"` /* 职称ID */ JobLevelId int32 `gorm:"column:job_level_id;type:int(11);comment:'职称ID'" json:"job_level_id"` /* 职位ID */ PosId int32 `gorm:"column:pos_id;type:int(11);comment:'职位ID'" json:"pos_id"` /* 聘用形式 */ EngageForm string `gorm:"column:engage_form;type:varchar(8);comment:'聘用形式'" json:"engage_form"` /* 最高学历 */ TiptopDegree string `gorm:"column:tiptop_degree;type:varchar(8);comment:'最高学历'" json:"tiptop_degree"` /* 所属专业 */ Specialty string `gorm:"column:specialty;type:varchar(32);comment:'所属专业'" json:"specialty"` /* 毕业院校 */ School string `gorm:"column:school;type:varchar(32);comment:'毕业院校'" json:"school"` /* 入职日期 */ BeginDate int64 `gorm:"column:begin_date;type:date;comment:'入职日期'" json:"begin_date"` /* 在职状态 */ WorkState string `gorm:"column:work_state;type:varchar(8);comment:'在职状态';default:\'在职\'" json:"work_state"` /* 工号 */ Code string `gorm:"column:code;type:varchar(8);comment:'工号'" json:"code"` /* 合同期限 */ ContractTerm float64 `gorm:"column:contract_term;type:double;comment:'合同期限'" json:"contract_term"` /* 转正日期 */ ConversionTime int64 `gorm:"column:conversion_time;type:date;comment:'转正日期'" json:"conversion_time"` /* 离职日期 */ NotWorkDate int64 `gorm:"column:not_work_date;type:date;comment:'离职日期'" json:"not_work_date"` /* 合同起始日期 */ BeginContract int64 `gorm:"column:begin_contract;type:date;comment:'合同起始日期'" json:"begin_contract"` /* 合同终止日期 */ EndContract int64 `gorm:"column:end_contract;type:date;comment:'合同终止日期'" json:"end_contract"` /* 工龄 */ WorkAge int32 `gorm:"column:work_age;type:int(11);comment:'工龄'" json:"work_age"` /* */ WorkId string `gorm:"column:work_id;type:varchar(16);comment:''" json:"work_id"` }
type EmployeeParams ¶
type EmployeeParams struct { /* 员工编号 */ Id *int32 `gorm:"column:id;type:int(11);PRIMARY_KEY;comment:'员工编号'" json:"id"` /* 所属部门 */ DepartmentId *int32 `gorm:"column:department_id;type:int(11);comment:'所属部门';default:0" json:"department_id"` /* 员工姓名 */ Name *string `gorm:"column:name;type:varchar(16);comment:'员工姓名'" json:"name"` /* 性别 */ Gender *string `gorm:"column:gender;type:char(4);comment:'性别'" json:"gender"` /* 出生日期 */ Birthday *time.Time `gorm:"column:birthday;type:date;comment:'出生日期'" json:"birthday"` /* 身份证号 */ IdCard *string `gorm:"column:id_card;type:char(18);comment:'身份证号'" json:"id_card"` /* 婚姻状况 */ Wedlock *string `gorm:"column:wedlock;type:varchar(8);comment:'婚姻状况'" json:"wedlock"` /* 民族 */ NationId *int32 `gorm:"column:nation_id;type:int(8);comment:'民族'" json:"nation_id"` /* 籍贯 */ NativePlace *string `gorm:"column:native_place;type:varchar(20);comment:'籍贯'" json:"native_place"` /* 政治面貌 */ PoliticId *int32 `gorm:"column:politic_id;type:int(8);comment:'政治面貌'" json:"politic_id"` /* 邮箱 */ Email *string `gorm:"column:email;type:varchar(20);comment:'邮箱'" json:"email"` /* 电话号码 */ Phone *string `gorm:"column:phone;type:varchar(11);comment:'电话号码'" json:"phone"` /* 联系地址 */ Address *string `gorm:"column:address;type:varchar(64);comment:'联系地址'" json:"address"` /* 职称ID */ JobLevelId *int32 `gorm:"column:job_level_id;type:int(11);comment:'职称ID'" json:"job_level_id"` /* 职位ID */ PosId *int32 `gorm:"column:pos_id;type:int(11);comment:'职位ID'" json:"pos_id"` /* 聘用形式 */ EngageForm *string `gorm:"column:engage_form;type:varchar(8);comment:'聘用形式'" json:"engage_form"` /* 最高学历 */ TiptopDegree *string `gorm:"column:tiptop_degree;type:varchar(8);comment:'最高学历'" json:"tiptop_degree"` /* 所属专业 */ Specialty *string `gorm:"column:specialty;type:varchar(32);comment:'所属专业'" json:"specialty"` /* 毕业院校 */ School *string `gorm:"column:school;type:varchar(32);comment:'毕业院校'" json:"school"` /* 入职日期 */ BeginDate *time.Time `gorm:"column:begin_date;type:date;comment:'入职日期'" json:"begin_date"` /* 在职状态 */ WorkState *string `gorm:"column:work_state;type:varchar(8);comment:'在职状态';default:\'在职\'" json:"work_state"` /* 工号 */ Code *string `gorm:"column:code;type:varchar(8);comment:'工号'" json:"code"` /* 合同期限 */ ContractTerm *float64 `gorm:"column:contract_term;type:double;comment:'合同期限'" json:"contract_term"` /* 转正日期 */ ConversionTime *time.Time `gorm:"column:conversion_time;type:date;comment:'转正日期'" json:"conversion_time"` /* 离职日期 */ NotWorkDate *time.Time `gorm:"column:not_work_date;type:date;comment:'离职日期'" json:"not_work_date"` /* 合同起始日期 */ BeginContract *time.Time `gorm:"column:begin_contract;type:date;comment:'合同起始日期'" json:"begin_contract"` /* 合同终止日期 */ EndContract *time.Time `gorm:"column:end_contract;type:date;comment:'合同终止日期'" json:"end_contract"` /* 工龄 */ WorkAge *int32 `gorm:"column:work_age;type:int(11);comment:'工龄'" json:"work_age"` /* */ WorkId *string `gorm:"column:work_id;type:varchar(16);comment:''" json:"work_id"` }
Click to show internal directories.
Click to hide internal directories.