package models import "hr_server/overall" //员工档案(主) type Personnel struct { Id int64 `json:"id" gorm:"primaryKey;column:m_id;type:bigint(20) unsigned;not null;comment:ID"` Number string `json:"number" gorm:"column:number;type:varchar(30) unsigned;not null;comment:员工工号"` Name string `json:"name" gorm:"column:name;type:varchar(255) unsigned;default:'';not null;comment:姓名"` HireClass int `json:"hireclass" gorm:"column:hire_class;type:tinyint(1) unsigned;default:1;not null;comment:雇佣类型(1:雇佣入职;2:再入职;)"` PositionLevel string `json:"positionlevel" gorm:"column:position_level;type:varchar(200) unsigned;default:'';not null;comment:入职职层"` Position int64 `json:"position" gorm:"column:position;type:bigint(20) unsigned;default:0;not null;comment:职位"` AdminOrg int64 `json:"adminorg" gorm:"column:admin_org;type:bigint(20) unsigned;default:0;not null;comment:所属行政组织"` Company int64 `json:"company" gorm:"column:company;type:bigint(20) unsigned;default:0;not null;comment:入职公司"` EmpType int `json:"emptype" gorm:"column:emp_type;type:tinyint(1) unsigned;default:1;not null;comment:用工关系(1:实习生;2:待分配;3:试用员工;4:正式员工;5:停薪留职;6:退休;7:辞退;8:离职)"` Deparment string `json:"deparment" gorm:"column:deparment;type:text;comment:部门"` Time int64 `json:"time" gorm:"column:time;type:bigint(20) unsigned;default:0;not null;comment:写入时间"` EiteTime int64 `json:"eitetime" gorm:"column:eite_time;type:bigint(20) unsigned;default:0;not null;comment:编辑时间"` JobClass int64 `json:"jobclass" gorm:"column:job_class;type:bigint(20) unsigned;default:2;not null;comment:职务分类"` PositionGrade int64 `json:"positiongrade" gorm:"column:position_grade;type:bigint(20) unsigned;default:0;not null;comment:入职职等"` Role string `json:"role" gorm:"column:role;type:longtext;comment:变动原因"` } func (Personnel *Personnel) TableName() string { return "personnel" } //编辑职务分类内容 func (Personnel *Personnel) EiteCont(whereMap interface{}, saveData interface{}) (err error) { err = overall.CONSTANT_DB_HR.Model(&Personnel).Where(whereMap).Updates(saveData).Error return }