package models import "hr_server/overall" //员工附属信息 type PersonnelContent struct { Number string `json:"number" gorm:"primaryKey;column:number;type:varchar(30) unsigned;not null;comment:员工工号;index"` Idcardno string `json:"idcardno" gorm:"column:idcardno;type:varchar(50) unsigned;default:'';not null;comment:身份证号"` Passportno string `json:"passportno" gorm:"column:passportno;type:varchar(50) unsigned;default:'';not null;comment:护照号码"` Globalroaming string `json:"globalroaming" gorm:"column:globalroaming;type:varchar(50) unsigned;default:'';not null;comment:国际区号"` Mobilephone string `json:"mobilephone" gorm:"column:mobilephone;type:varchar(50) unsigned;default:'';not null;comment:手机号码"` Email string `json:"email" gorm:"column:email;type:varchar(255) unsigned;default:'';not null;comment:电子邮件"` Gender int `json:"gender" gorm:"column:type;gender:tinyint(1) unsigned;default:1;not null;comment:性别(1:男性;2:女性;3:中性)"` Birthday int64 `json:"birthday" gorm:"column:birthday;type:bigint(20) unsigned;default:0;not null;comment:birthday"` Myfolk string `json:"myfolk" gorm:"column:myfolk;type:varchar(50) unsigned;default:'';not null;comment:民族"` Nativeplace string `json:"nativeplace" gorm:"column:nativeplace;type:varchar(255) unsigned;default:'';not null;comment:籍贯"` Idcardstartdate int64 `json:"idcardstartdate" gorm:"column:idcardstartdate;type:bigint(20) unsigned;default:0;not null;comment:身份证有效期开始"` Idcardenddate int64 `json:"idcardenddate" gorm:"column:idcardenddate;type:bigint(20) unsigned;default:0;not null;comment:身份证有效期结束"` Idcardaddress string `json:"idcardaddress" gorm:"column:idcardaddress;type:varchar(255) unsigned;default:'';not null;comment:身份证地址"` IdcardIssued string `json:"idcardIssued" gorm:"column:idcardIssued;type:varchar(255) unsigned;default:'';not null;comment:身份证签发机关"` Health int `json:"health" gorm:"column:type;health:tinyint(1) unsigned;default:1;not null;comment:健康状况(1:良好;2:一般;3:较弱,4:有生理缺陷;5:残废)"` Maritalstatus int `json:"maritalstatus" gorm:"column:type;maritalstatus:tinyint(1) unsigned;default:1;not null;comment:婚姻状况(1:未婚;2:已婚;3:丧偶;4:离异)"` Internaltelephone string `json:"internaltelephone" gorm:"column:internaltelephone;type:varchar(255) unsigned;default:'';not null;comment:内线电话"` Currentresidence string `json:"currentresidence" gorm:"column:currentresidence;type:varchar(255) unsigned;default:'';not null;comment:现居住地址"` Time int64 `json:"time" gorm:"column:time;type:bigint(20) unsigned;default:0;not null;comment:创建时间"` Constellation string `json:"constellation" gorm:"column:constellation;type:varchar(255) unsigned;default:'';not null;comment:现居住地址"` Isdoubleworker int `json:"isdoubleworker" gorm:"column:type;isdoubleworker:tinyint(1) unsigned;default:1;not null;comment:是否双职工(1:是;2:否)"` Isveterans int `json:"isveterans" gorm:"column:type;isveterans:tinyint(1) unsigned;default:1;not null;comment:是否为退役军人(1:是;2:否)"` Veteransnumber string `json:"veteransnumber" gorm:"column:veteransnumber;type:varchar(255) unsigned;default:'';not null;comment:退役证编号"` Jobstartdate int64 `json:"jobstartdate" gorm:"column:jobstartdate;type:bigint(20) unsigned;default:0;not null;comment:参加工作日期"` Entrydate int64 `json:"entrydate" gorm:"column:entrydate;type:bigint(20) unsigned;default:0;not null;comment:入职日期"` Probationperiod int64 `json:"probationperiod" gorm:"column:probationperiod;type:int(5) unsigned;default:0;not null;comment:试用期"` Planformaldate int64 `json:"planformaldate" gorm:"column:planformaldate;type:bigint(20) unsigned;default:0;not null;comment:预计转正日期"` } func (PersonnelContent *PersonnelContent) TableName() string { return "personnel_content" } //编辑职务分类内容 func (PersonnelContent *PersonnelContent) EiteCont(whereMap interface{}, saveData interface{}) (err error) { err = overall.CONSTANT_DB_HR.Model(&PersonnelContent).Where(whereMap).Updates(saveData).Error return }