You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.8 KiB
27 lines
1.8 KiB
package models
|
|
|
|
import "hr_server/overall"
|
|
|
|
//人员变动记录
|
|
type PersonnelChangeRecord struct {
|
|
Number string `json:"number" gorm:"primaryKey;column:number;type:varchar(30) unsigned;not null;comment:员工工号;index"`
|
|
Type int `json:"type" gorm:"column:type;type:tinyint(1) unsigned;default:1;not null;comment:变动类型(1:雇佣入职;2:再入职;3:职位分配;4:转正;5:停薪留职;6:退休;7:辞退;8:离职)"`
|
|
Reason string `json:"reason" gorm:"column:reason;type:text;comment:变动原因"`
|
|
Position int64 `json:"position" gorm:"column:position;type:bigint(20) unsigned;default:0;not null;comment:入职职位"`
|
|
JobLevel string `json:"joblevel" gorm:"column:job_level;type:varchar(200) unsigned;default:'';not null;comment:入职职层"`
|
|
JobGrade int64 `json:"jobgrade" gorm:"column:job_grade;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:入职公司"`
|
|
Department string `json:"department" gorm:"column:department;type:varchar(255) unsigned;default:0;not null;comment:入职分厂"`
|
|
Adminorg int64 `json:"adminorg" gorm:"column:adminorg;type:bigint(20) unsigned;default:0;not null;comment:入职行政组织"`
|
|
Time int64 `json:"time" gorm:"column:time;type:bigint(20) unsigned;default:0;not null;comment:写入时间"`
|
|
}
|
|
|
|
func (PersonnelChangeRecord *PersonnelChangeRecord) TableName() string {
|
|
return "personnel_change_record"
|
|
}
|
|
|
|
//编辑职务分类内容
|
|
func (PersonnelChangeRecord *PersonnelChangeRecord) EiteCont(whereMap interface{}, saveData interface{}) (err error) {
|
|
err = overall.CONSTANT_DB_HR.Model(&PersonnelChangeRecord).Where(whereMap).Updates(saveData).Error
|
|
return
|
|
}
|
|
|