package modelswechat //企业微信人员架构 type WechatUsers struct { Uid int64 `json:"uid" gorm:"column:u_id;type:bigint(20) unsigned;default:0;not null;comment:id"` Userid string `json:"userid" gorm:"column:userid;type:varchar(255);not null;comment:wechat user id企业微信用户ID"` Name string `json:"name" gorm:"column:name;type:varchar(100);not null;comment:姓名"` Department string `json:"department" gorm:"column:department;type:text;comment:归属部门json"` Position string `json:"position" gorm:"column:position;type:varchar(255);not null;comment:企业微信职务"` Mobile string `json:"mobile" gorm:"column:mobile;type:varchar(100);not null;comment:企业微信电话"` Gender int `json:"gender" gorm:"column:gender;type:tinyint(1) unsigned;default:1;not null;comment:性别。1表示男性,2表示女性"` Email string `json:"email" gorm:"column:email;type:varchar(255);not null;comment:邮箱"` Avatar string `json:"avatar" gorm:"column:avatar;type:varchar(255);not null;comment:员工头像"` Status int `json:"status" gorm:"column:status;type:tinyint(1) unsigned;default:1;not null;comment:激活状态: 1=已激活,2=已禁用,4=未激活,5=退出企业。"` Extattr string `json:"extattr" gorm:"column:extattr;type:mediumtext;comment:企业微信员工扩展属性"` MainDepartment int64 `json:"main_department" gorm:"column:main_department;type:int(8) unsigned;default:0;not null;comment:主部门"` QrCode string `json:"qr_code" gorm:"column:qr_code;type:text;comment:员工个人二维码,扫描可添加为外部联系人(注意返回的是一个url,可在浏览器上打开该url以展示二维码);第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取"` IsLeaderInDept string `json:"is_leader_in_dept" gorm:"column:is_leader_in_dept;type:text;comment:表示在所在的部门内是否为上级。0-否;1-是。是一个列表,数量必须与department一致。第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取"` ThumbAvatar string `json:"thumb_avatar" gorm:"column:thumb_avatar;type:varchar(255);not null;comment:头像缩略图url"` UserNumber string `json:"user_number" gorm:"column:user_number;type:varchar(8);not null;comment:工号"` SysBf int64 `json:"sys_bf" gorm:"column:sys_bf;type:int(20) unsigned;default:0;not null;comment:系统分厂"` SysWs int64 `json:"sys_ws" gorm:"column:sys_ws;type:int(20) unsigned;default:0;not null;comment:系统工段"` SysPs int64 `json:"sys_ps" gorm:"column:sys_ps;type:int(20) unsigned;default:0;not null;comment:系统职务"` WmTema int64 `json:"wm_tema" gorm:"column:wm_tema;type:int(20) unsigned;default:0;not null;comment:系统班组"` IsAdmin int `json:"is_admin" gorm:"column:is_admin;type:tinyint(1) unsigned;default:1;not null;comment:管理员1、否;2:是"` IsRole int64 `json:"is_role" gorm:"column:is_role;type:int(20) unsigned;default:0;not null;comment:角色"` Pwd string `json:"pwd" gorm:"column:pwd;type:varchar(255);not null;comment:密码"` Time int64 `json:"time" gorm:"column:time;type:int(20) unsigned;default:0;not null;comment:写入时间"` } func (WechatUsers *WechatUsers) TableName() string { // return "wechatusers_es" return "wechatusers" }