dddd
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.

84 lines
8.2 KiB

package wechat
type GroupForm struct {
Id int64 `json:"id" gorm:"column:g_id;type:bigint(20);;primaryKey;unique;not null;autoIncrement;index"`
Name string `json:"name" gorm:"column:g_name;type:varchar(255);not null;comment:组织名称"` //'组织名称',
Parentid int64 `json:"parentid" gorm:"column:g_parentid;type:bigint(20) unsigned;default:0;not null;comment:父级栏目"` //'父级栏目',
Orderes int64 `json:"orderes" gorm:"column:g_order;type:bigint(20) unsigned;default:0;not null;comment:企业微信排序"` //'企业微信排序',
Time int64 `json:"time" gorm:"column:g_time;type:bigint(20) unsigned;default:0;not null;comment:编辑时间"` //'编辑时间',
Sate int8 `json:"state" gorm:"column:g_sate;type:tinyint(1) unsigned;default:1;not null;comment:状态"` //'状态',
Group string `json:"group" gorm:"column:g_group;type:text;not null;comment:组织结构"` //'组织结构',
GroupSun string `json:"groupsun" gorm:"column:g_group_sun;type:text;not null;comment:组织结构"` //'子节点',
JinDieId int64 `json:"jindieid" gorm:"column:g_jindie_id;type:bigint(20) unsigned;default:0;not null;comment:金蝶ID"` //金蝶ID
}
func (GroupForm *GroupForm) TableName() string {
return "groupform"
}
//企业微信人员架构
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 {
4 years ago
// return "wechatusers_es"
return "wechatusers"
}
4 years ago
//企业微信人员架构
type SignOutWechatUsers 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 (SignOutWechatUsers *SignOutWechatUsers) TableName() string {
return "signout_wechatusers"
// return "wechatusers"
}