67 lines
3.5 KiB
Go
67 lines
3.5 KiB
Go
package enterprise_wechat
|
||
|
||
type CreateBoos2JXStaffReq struct {
|
||
Userid string `json:"userid"` // y 用户id 成员UserID。对应管理端的帐号,企业内必须唯一。长度为1~64个字节。只能由数字、字母和“_-@.”四种字符组成,且第一个字符必须是数字或字母。系统进行唯一性检查时会忽略大小写
|
||
Name string `json:"name"` // y 成员名称。长度为1~64个utf8字符
|
||
Alias string `json:"alias"` // n 成员别名。长度1~64个utf8字符
|
||
Mobile string `json:"mobile"` // y 手机号码。企业内必须唯一,mobile/email二者不能同时为空
|
||
Department []int `json:"department"` // y 成员所属部门id列表,不超过100个
|
||
Order []int `json:"order"` // n 部门内的排序值,默认为0,
|
||
Position string `json:"position"` // n 职务信息。
|
||
Gender string `json:"gender"` // n 性别。1表示男性,2表示女性性别。1表示男性,2表示女性
|
||
Email string `json:"email"` // y 邮箱
|
||
IsLeaderInDept []int `json:"is_leader_in_dept"` // n 个数必须和参数department的个数一致,表示在所在的部门内是否为部门负责人。1表示为部门负责人,0表示非部门负责人
|
||
Enable int `json:"enable"` // n 直属上级UserID
|
||
AvatarMediaid string `json:"avatar_mediaid"` // n 成员头像的mediaid
|
||
Telephone string `json:"telephone"` // n 座机
|
||
Address string `json:"address"` // n 地址
|
||
Extattr Extattr `json:"extattr"` // n 自定义字段。自定义字段需要先在WEB管理端添加,见扩展属性添加方法,否则忽略未知属性的赋值。
|
||
MainDepartment int `json:"main_department"` // n 主部门
|
||
ToInvite bool `json:"to_invite"` // n 是否邀请该成员使用企业微信(将通过微信服务通知或短信或邮件下发邀请,每天自动下发一次,最多持续3个工作日),默认值为true
|
||
ExternalPosition string `json:"external_position"` // n 对外职务,如果设置了该值,则以此作为对外展示的职务,否则以position来展示。长度12个汉字内
|
||
ExternalProfile ExternalProfile `json:"external_profile"` // n 成员对外属性,字段详情见对外属性
|
||
}
|
||
|
||
type Extattr struct {
|
||
Attrs []Attrs `json:"attrs"`
|
||
}
|
||
|
||
type ExternalAttr struct {
|
||
Type int `json:"type"`
|
||
Name string `json:"name"`
|
||
Text Text `json:"text,omitempty"`
|
||
Web Web `json:"web,omitempty"`
|
||
Miniprogram Miniprogram `json:"miniprogram,omitempty"`
|
||
}
|
||
|
||
type ExternalProfile struct {
|
||
ExternalCorpName string `json:"external_corp_name"`
|
||
ExternalAttr []ExternalAttr `json:"external_attr"`
|
||
}
|
||
|
||
type Attrs struct {
|
||
Type int `json:"type"`
|
||
Name string `json:"name"`
|
||
Text Text `json:"text,omitempty"`
|
||
Web Web `json:"web,omitempty"`
|
||
}
|
||
|
||
type Text struct {
|
||
Value string `json:"value"`
|
||
}
|
||
|
||
type Web struct {
|
||
URL string `json:"url"`
|
||
Title string `json:"title"`
|
||
}
|
||
|
||
type Miniprogram struct {
|
||
Appid string `json:"appid"`
|
||
Pagepath string `json:"pagepath"`
|
||
Title string `json:"title"`
|
||
}
|
||
|
||
/*获取部门列表*/
|
||
type GetAllDepartmentList struct {
|
||
}
|