domain

package
v2.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	Response
	Expires int16  `json:"expires_in"`   // 过期时间
	Created int64  `json:"created"`      // 创建时间
	Token   string `json:"access_token"` // token
}

AccessToken 钉钉token结构体

func (*AccessToken) CreatedAt

func (token *AccessToken) CreatedAt() int64

CreatedAt Expired.CreatedAt is when the access token is generated

func (*AccessToken) ExpiresIn

func (token *AccessToken) ExpiresIn() int16

ExpiresIn is how soon the access token is expired

type AiResponse

type AiResponse struct {
	Response
	Result string `json:"result"` // 翻译结果字符串
}

翻译返回

type ChatDetail

type ChatDetail struct {
	Id                  string   `json:"chatid"`              // 群id。
	Name                string   `json:"name"`                // 群名称,长度限制为1~20个字符。
	Status              int      `json:"status"`              // 状态
	Icon                string   `json:"icon"`                // 群头像的mediaID
	ConversationTag     int      `json:"conversationTag"`     // 会话类型 2:企业群
	Owner               string   `json:"owner"`               // 群主的userid,
	UserIds             []string `json:"useridlist"`          // 群成员列表,每次最多支持40人,群人数上限为1000
	ShowHistory         int      `json:"showHistoryType"`     // 新成员是否可查看100条历史消息:1:可看
	Searchable          int      `json:"searchable"`          // 群是否可以被搜索.1:可搜索
	Validation          int      `json:"validationType"`      // 入群是否需要验证.1:要验证
	MentionAllAuthority int      `json:"mentionAllAuthority"` //@all 使用范围:.1:仅群主可用
	ManagementType      int      `json:"managementType" `     // 群管理类型:.1:仅群主可管理
	ChatBannedType      int      `json:"chatBannedType" `     // 是否开启群禁言:.1:全员禁言
}

ChatDetail:群详情

type ChatSetResponse

type ChatSetResponse struct {
	Response
	Success   bool   `json:"success"`
	RequestId string `json:"request_id"`
}

ChatSetResponse:群设置返回

type CreateChat

type CreateChat struct {
	Name                string   `json:"name,omitempty" validate:"required,max=20,min=1"`              // 群名称,长度限制为1~20个字符。
	Owner               string   `json:"owner,omitempty" validate:"required"`                          // 群主的userid,
	UserIds             []string `json:"useridlist,omitempty" validate:"required,max=40"`              // 群成员列表,每次最多支持40人,群人数上限为1000
	ShowHistory         int      `json:"showHistoryType,omitempty" validate:"omitempty,oneof=0 1"`     // 新成员是否可查看100条历史消息:1:可看
	Searchable          int      `json:"searchable,omitempty" validate:"omitempty,oneof=0 1"`          // 群是否可以被搜索.1:可搜索
	Validation          int      `json:"validationType,omitempty" validate:"omitempty,oneof=0 1"`      // 入群是否需要验证.1:要验证
	MentionAllAuthority int      `json:"mentionAllAuthority,omitempty" validate:"omitempty,oneof=0 1"` //@all 使用范围:.1:仅群主可用
	ManagementType      int      `json:"managementType,omitempty" validate:"omitempty,oneof=0 1"`      // 群管理类型:.1:仅群主可管理
	ChatBannedType      int      `json:"chatBannedType,omitempty" validate:"omitempty,oneof=0 1"`      // 是否开启群禁言:.1:全员禁言
}

func (CreateChat) Validate

func (u CreateChat) Validate(valid *validator.Validate, trans translator.Translator) error

请求参数验证

type CreateChatResponse

type CreateChatResponse struct {
	Response
	ConversationTag    int    `json:"conversationTag"`    // 会话类型 2:企业群
	OpenConversationId string `json:"openConversationId"` // 公开群会话的Id
	ChatId             string `json:"chatid"`             // 群会话的Id
}

CreateChatResponse:创建群返回

type CreateDetailDeptRequest

type CreateDetailDeptRequest interface {
	Request
	JoinOuterPermitUsers()
	JoinOuterPermitDepts()
	JoinDeptPermits()
	JoinUserPermits()
	JoinDeptManagerUserIds()
}

CreateDetailDeptRequest

type CreateRoleGroupResponse

type CreateRoleGroupResponse struct {
	Response
	GroupId int `json:"groupId"` // 角色组id
}

CreateRoleGroupResponse:创建角色组

type CreateRoleResponse

type CreateRoleResponse struct {
	Response
	RoleId int `json:"roleId"` // 角色id
}

CreateRoleResponse:创建角色

type Dept

type Dept struct {
	Id                    int      `json:"id,omitempty"`                                     // 部门id
	Name                  string   `json:"name,omitempty" validate:"omitempty,max=64,min=1"` // 部门名称。长度限制为1~64个字符,不允许包含字符"-"","以及","。
	ParentId              int      `json:"parentid,omitempty"`                               // 父部门ID,根部门ID为1。
	ParentBalanceFirst    bool     `json:"parentBalanceFirst,omitempty"`                     // 是否优先使用父部门的预算
	ShareBalance          bool     `json:"shareBalance,omitempty"`                           // 是否共享预算
	OuterPermitUsers      []string `json:"-" validate:"omitempty,lte=200"`                   // 指定本部门成员可查看的通讯录用户userid列表,总数不能超过200。当outer_dept为true时,此参数生效。
	StrOuterPermitUsers   string   `json:"outerPermitUsers,omitempty"`                       // 使用|拼接的字符串
	OuterPermitDepts      []int    `json:"-" validate:"omitempty,lte=200"`                   // 指定本部门成员可查看的通讯录部门ID列表。,总数不能超过200.当outer_dept为true时,此参数生效。
	StrOuterPermitDepts   string   `json:"outerPermitDepts,omitempty"`                       // 使用|拼接的字符串
	OuterDept             bool     `json:"outerDept,omitempty"`                              // 是否限制本部门成员查看通讯录,开启后本部门成员只能看到限定范围内的通讯录
	Hide                  bool     `json:"deptHiding,omitempty"`                             // 是否隐藏本部门,隐藏后本部门将不会显示在公司通讯录中
	CreateDeptGroup       bool     `json:"createDeptGroup,omitempty"`                        // 是否创建一个关联此部门的企业群,默认为false即不创建。
	Order                 int      `json:"order,omitempty"`                                  // 在父部门中的排序值,order值小的排序靠前。
	SourceIdentifier      string   `json:"sourceIdentifier,omitempty"`                       // 部门标识字段,开发者可用该字段来唯一标识一个部门,并与钉钉外部通讯录里的部门做映射。
	AutoAddUser           bool     `json:"autoAddUser,omitempty"`                            // 当部门群已经创建后,有新人加入部门时是否会自动加入该群
	GroupContainSubDept   bool     `json:"groupContainSubDept,omitempty"`                    // 部门群是否包含子部门
	OrgDeptOwner          string   `json:"orgDeptOwner,omitempty"`                           // 企业群群主的userid
	DeptGroupChatId       string   `json:"deptGroupChatId,omitempty"`                        // 创建部门群自动生成的id。
	DeptManagerUserIds    []string `json:"-"`                                                // 部门的主管列表,取值为由主管的userid组成的字符串,不同的userid使用"|"符号进行分隔。
	StrDeptManagerUserIds string   `json:"deptManagerUseridList,omitempty"`                  // 字符串拼接
	DeptPermits           []int    `json:"-" validate:"omitempty,lte=200"`                   // 指定可以查看本部门的其他部门列表200,当hide_dept为true时,则此值生效。
	StrDeptPermits        string   `json:"deptPermits,omitempty"`                            // 使用|拼接的字符串
	UserPermits           []string `json:"-" validate:"omitempty,lte=200"`                   // 指定可以查看本部门的人员userid列表,总数不能超过200。当hide_dept为true时,则此值生效。
	StrUserPermits        string   `json:"userPermits,omitempty"`                            // 使用|拼接的字符串
	OuterDeptOnlySelf     bool     `json:"outerDeptOnlySelf,omitempty"`                      // 是否只能看到所在部门及下级部门通讯录,开启后只能看到所在部门及下级部门通讯录,当outer_dept为true时,此参数生效
	Extension             string   `json:"ext,omitempty"`                                    // 扩展字段,JSON格式。
}

Dept:部门实体

func (*Dept) JoinDeptManagerUserIds

func (d *Dept) JoinDeptManagerUserIds()

JoinDeptManagerUserIds:组装参数,去除重复

func (*Dept) JoinDeptPermits

func (d *Dept) JoinDeptPermits()

JoinDeptPermits:组装参数,去除重复

func (*Dept) JoinOuterPermitDepts

func (d *Dept) JoinOuterPermitDepts()

JoinOuterPermitDepts:组装参数,去除重复

func (*Dept) JoinOuterPermitUsers

func (d *Dept) JoinOuterPermitUsers()

JoinOuterPermitUsers:组装参数,去除重复

func (*Dept) JoinUserPermits

func (d *Dept) JoinUserPermits()

JoinUserPermits:组装参数,去除重复

func (Dept) Validate

func (d Dept) Validate(valid *validator.Validate, trans translator.Translator) error

Validate:参数验证

type DeptCreateResponse

type DeptCreateResponse struct {
	Response
	DeptId int `json:"id"`
}

DeptCreateResponse 创建部门返回

type DeptDetail

type DeptDetail struct {
	Response
	Id                    int    `json:"id"`                    // 部门id
	Name                  string `json:"name"`                  // 部门名称。长度限制为1~64个字符,不允许包含字符"-"","以及","。
	ParentId              int    `json:"parentid"`              // 父部门ID,根部门ID为1。
	ParentBalanceFirst    bool   `json:"parentBalanceFirst"`    // 是否优先使用父部门的预算
	ShareBalance          bool   `json:"shareBalance"`          // 是否共享预算
	OuterPermitUsers      string `json:"outerPermitUsers"`      // 使用|拼接的字符串
	OuterPermitDepts      string `json:"outerPermitDepts"`      // 使用|拼接的字符串
	OuterDept             bool   `json:"outerDept"`             // 是否限制本部门成员查看通讯录,开启后本部门成员只能看到限定范围内的通讯录
	Hide                  bool   `json:"deptHiding"`            // 是否隐藏本部门,隐藏后本部门将不会显示在公司通讯录中
	CreateDeptGroup       bool   `json:"createDeptGroup"`       // 是否创建一个关联此部门的企业群,默认为false即不创建。
	Order                 int    `json:"order"`                 // 在父部门中的排序值,order值小的排序靠前。
	SourceIdentifier      string `json:"sourceIdentifier"`      // 部门标识字段,开发者可用该字段来唯一标识一个部门,并与钉钉外部通讯录里的部门做映射。
	AutoAddUser           bool   `json:"autoAddUser"`           // 当部门群已经创建后,有新人加入部门时是否会自动加入该群
	GroupContainSubDept   bool   `json:"groupContainSubDept"`   // 部门群是否包含子部门
	OrgDeptOwner          string `json:"orgDeptOwner"`          // 企业群群主的userid
	DeptGroupChatId       string `json:"deptGroupChatId"`       // 创建部门群自动生成的id。
	DeptManagerUseridList string `json:"deptManagerUseridList"` // 部门的主管列表,取值为由主管的userid组成的字符串,不同的userid使用"|"符号进行分隔。
	DeptPermits           string `json:"deptPermits"`           // 使用|拼接的字符串
	UserPermits           string `json:"userPermits"`           // 使用|拼接的字符串
	OuterDeptOnlySelf     bool   `json:"outerDeptOnlySelf"`     // 是否只能看到所在部门及下级部门通讯录,开启后只能看到所在部门及下级部门通讯录,当outer_dept为true时,此参数生效
	Extension             string `json:"ext"`                   // 扩展字段,JSON格式。
}

DepartmentDetail:部门详情

type DeptUserIdsResponse

type DeptUserIdsResponse struct {
	Response
	UserIds []string `json:"userIds,omitempty"` // 用户列表
}

DeptUserIdsResponse:获取部门人员id返回

type GetChatInfoResponse

type GetChatInfoResponse struct {
	Response
	ChatInfo ChatDetail `json:"chat_info"`
}

GetChatInfoResponse:获取群信息返回

type GetChatMsgReadResponse

type GetChatMsgReadResponse struct {
	Response
	NextCursor int      `json:"next_cursor"`    // 下次分页获取的起始游标。
	UserIds    []string `json:"readUserIdList"` // 已读人员的userid列表。已读人员为空时不返回该参数。
}

ChatSetResponse:群设置返回

type GetDeptUserDetailResponse

type GetDeptUserDetailResponse struct {
	Response
	More     bool         `json:"hasMore"`  // 在分页查询时返回,代表是否还有下一页更多数据。
	UserList []UserDetail `json:"userlist"` // 成员列表
}

GetDeptUserDetailResponse:获取部门人员详情反馈

type GetParentIdsByDeptIdResponse

type GetParentIdsByDeptIdResponse struct {
	Response
	ParentIds []int `json:"parentIds"`
}

type GetParentIdsByUserIdResponse

type GetParentIdsByUserIdResponse struct {
	Response
	ParentIds [][]int `json:"department"` // 指定员工的部门信息。
}

type GetSubDeptIdsResponse

type GetSubDeptIdsResponse struct {
	Response
	SubDeptIds []int `json:"sub_dept_id_list"`
}

type GetSubDeptResponse

type GetSubDeptResponse struct {
	Response
	Depts []DeptDetail `json:"department"`
}

type InactiveUser

type InactiveUser struct {
	More    bool     `json:"has_more"` // 是否还有更多
	UserIds []string `json:"list"`     // 用户userid
}

InactiveUser:未登录用户数据。

type InactiveUserResponse

type InactiveUserResponse struct {
	Response
	InactiveUser InactiveUser `json:"result"`
}

InactiveUserResponse:未登录用户数据。

type MicroApp

type MicroApp struct {
	// 应用名称
	Name string `json:"name"`

	// 应用id
	AgentId int `json:"agentId"`

	// 应用图标
	Icon string `json:"appIcon"`

	// 应用描述
	Desc string `json:"appDesc"`

	// 是否自建 false:不是
	Self bool `json:"isSelf"`

	// 应用状态 1:启用,0:停用
	Status int `json:"appStatus"`

	// 应用应用的OA后台管理主页
	OmpLink string `json:"ompLink"`

	// 应用的移动端主页
	HomepageLink string `json:"homepageLink"`

	// 应用的PC端主页
	PcHomepageLink string `json:"pcHomepageLink"`
}

MicroApp 钉钉应用

type OcrStructuredResponse

type OcrStructuredResponse struct {
	Response
	Result OcrStructuredResult `json:"result"` // 翻译结果字符串
}

type OcrStructuredResult

type OcrStructuredResult struct {
	Height         int    `json:"height"`          // 旋转后图片高度。
	Width          int    `json:"width"`           // 旋转后图片宽度。
	Angle          int    `json:"angle"`           // 旋转度。
	Data           string `json:"data"`            // 图片识别内容json字符串。
	OriginalHeight int    `json:"original_height"` // 图片识别内容json字符串。
	OriginalWidth  int    `json:"original_width"`  // 图片识别内容json字符串。
}

OcrStructuredResult

type OrgAdminList

type OrgAdminList struct {
	Level  int    `json:"sys_level"` // 1:表示主管理员,2:表示子管理员
	UserId string `json:"userid"`    // 用户userid
}

OrgAdminList:管理员列表

type OrgAdminScopeResponse

type OrgAdminScopeResponse struct {
	Response
	Depts []int `json:"dept_ids"` // 可管理的部门ID列表
}

type OrgAdminUserResponse

type OrgAdminUserResponse struct {
	Response
	Admins []OrgAdminList `json:"adminList"`
}

type OrgUserCountResponse

type OrgUserCountResponse struct {
	Response
	Count int `json:"count"`
}

type Request

type Request interface {
	Validate(valid *validator.Validate, trans translator.Translator) error
}

Request 请求

type Response

type Response struct {
	Code      int    `json:"errcode"`          // code
	Msg       string `json:"errmsg,omitempty"` // msg
	Success   bool   `json:"success,omitempty"`
	RequestId string `json:"request_id,omitempty"`
}

Response 响应 {"errcode":40035,"errmsg":"缺少参数 corpid or appkey"}

func (*Response) CheckError

func (res *Response) CheckError() (err error)

type RoleDetailResponse

type RoleDetailResponse struct {
	Response
	Role roleDetail `json:"role"`
}

RoleDetailResponse:获取角色详情

type RoleGroupResponse

type RoleGroupResponse struct {
	Response
	Result openRoleGroup `json:"role_group"`
}

RoleGroupResponse:获取角色组

type RoleListResponse

type RoleListResponse struct {
	Response
	RoleGroup roleListResult `json:"result"`
}

RoleListResponse:获取角色列表返回

type RoleUserListResponse

type RoleUserListResponse struct {
	Response
	Result roleUserListResult `json:"result"`
}

RoleUserListResponse:角色用户列表

type UpdateChat

type UpdateChat struct {
	Id                  string   `json:"id" validate:"required"`                                       // 群会话Id
	Name                string   `json:"name,omitempty" validate:"omitempty,max=20,min=1"`             // 群名称,长度限制为1~20个字符。
	Owner               string   `json:"owner,omitempty"`                                              // 群主的userid,
	OwnerType           string   `json:"ownerType,omitempty" validate:"omitempty,oneof=emp ext"`       // 群主类型:emp:企业员工,ext:外部联系人
	AddUserIds          []string `json:"add_useridlist,omitempty" validate:"omitempty,max=40"`         // 添加的群成员列表,每次最多支持40人,群人数上限为1000
	DelUserIds          []string `json:"del_useridlist,omitempty" validate:"omitempty,max=40"`         // 删除的成员列表
	AddExtIds           []string `json:"add_extidlist,omitempty" validate:"omitempty,max=40"`          // 添加的外部联系人成员列表
	DelExtIds           []string `json:"del_extidlist,omitempty" validate:"omitempty,max=40"`          // 删除的外部联系人成员列表
	Icon                string   `json:"icon,omitempty"`                                               // 群头像的mediaId
	Searchable          int      `json:"searchable,omitempty" validate:"omitempty,oneof=0 1"`          // 群是否可以被搜索.1:可搜索
	ShowHistory         int      `json:"showHistoryType,omitempty" validate:"omitempty,oneof=0 1"`     // 新成员是否可查看100条历史消息:1:可看
	Validation          int      `json:"validationType,omitempty" validate:"omitempty,oneof=0 1"`      // 入群是否需要验证.1:要验证
	MentionAllAuthority int      `json:"mentionAllAuthority,omitempty" validate:"omitempty,oneof=0 1"` //@all 使用范围:.1:仅群主可用
	ManagementType      int      `json:"managementType,omitempty" validate:"omitempty,oneof=0 1"`      // 群管理类型:.1:仅群主可管理
	ChatBannedType      int      `json:"chatBannedType,omitempty" validate:"omitempty,oneof=0 1"`      // 是否开启群禁言:.1:全员禁言
}

UpdateChat:更新群

func (UpdateChat) Validate

func (u UpdateChat) Validate(valid *validator.Validate, trans translator.Translator) error

请求参数验证

type User

type User struct {
	Id              string      `json:"userid,omitempty" validate:"omitempty,max=64,min=1"`    // 员工唯一标识ID(不可修改),企业内必须唯一。长度为1~64个字符,如果不传,将自动生成一个userid。
	UnionId         string      `json:"unionid,omitempty"`                                     // 员工在当前开发者企业账号范围内的唯一标识,系统生成,固定值,不会改变。
	OpenId          string      `json:"OpenId,omitempty"`                                      // openId
	Name            string      `json:"name,omitempty" validate:"omitempty,max=64"`            // 员工姓名,长度最大64个字符。
	Email           string      `json:"email,omitempty" validate:"omitempty,max=64,email"`     // 员工邮箱,长度最大64个字符。企业内必须唯一,不可重复。
	Mobile          string      `json:"mobile,omitempty"`                                      // 手机号码,企业内必须唯一,不可重复。
	Position        string      `json:"position,omitempty" validate:"omitempty,max=64"`        // 职位信息。长度为0~64个字符
	Roles           []UserRoles `json:"roles,omitempty"`                                       // 用户所在角色列表。
	OrgEmail        string      `json:"orgEmail,omitempty" validate:"omitempty,email"`         // 员工的企业邮箱,如果员工已经开通了企业邮箱,接口会返回,否则会报错。
	Avatar          string      `json:"avatar,omitempty"`                                      // 头像
	Senior          bool        `json:"isSenior,omitempty"`                                    // 是否开启高管模式
	Authed          bool        `json:"realAuthed,omitempty"`                                  // 是否实名认证:true:是false:否
	Boss            bool        `json:"isBoss,omitempty"`                                      // 是否为企业的老板
	Active          bool        `json:"active,omitempty"`                                      // 是否激活
	Hide            bool        `json:"isHide,omitempty"`                                      // 是否号码隐藏:管模式
	Admin           bool        `json:"isAdmin,omitempty"`                                     // 是否为企业的管理员
	JobNumber       string      `json:"jobnumber,omitempty" validate:"omitempty,max=64"`       // 员工工号,对应显示到OA后台和客户端个人资料的工号栏目。长度为0~64个字符。码隐藏:管模式
	Remark          string      `json:"remark,omitempty" validate:"omitempty,max=1000"`        // 备注,长度最大为1024个字符。
	WorkPlace       string      `json:"workPlace,omitempty" validate:"omitempty,max=50"`       // 办公地点。长度为0~50个字符。
	Tel             string      `json:"tel,omitempty" validate:"omitempty,max=50"`             // 分机号。长度为0~50个字符,企业内必须唯一,不可重复。
	PositionInDepts string      `json:"positionInDepts,omitempty"`                             // 设置用户在每个部门下的职位。Key是deptId,表示部门;Value是职位,表示在这个部门下的职位。
	LeaderInDepts   string      `json:"isLeaderInDepts,omitempty"`                             // 在部门里是否主管
	OrderInDepts    string      `json:"orderInDepts,omitempty"`                                // 在对应的部门中的排序,Map结构的json字符串。Key是部门的ID,Value是人员在这个部门的排序值。
	Department      []int       `json:"department,omitempty"`                                  // 数组类型,数组里面值为整型,成员所属部门ID列表。
	Extattr         string      `json:"extattr,omitempty"`                                     // 扩展属性,可以设置多种属性
	HiredDate       int         `json:"hiredDate,omitempty"`                                   // 入职时间,Unix时间戳,单位毫秒。
	Lang            string      `json:"lang,omitempty" validate:"omitempty,oneof=zh_CN en_US"` // 通讯录语言,默认zh_CN。如果是英文,请输入en_US。
	StateCode       string      `json:"stateCode,omitempty"`                                   // 国家地区码
	ManagerUserId   string      `json:"managerUserId,omitempty"`                               // 主管的ID
}
{
	"extension":"{"爱好":"旅游","年龄":"24"}",
	"mobile":"18513027676",
	"telephone":"010-86123456-2345",
	"remark":"备注备注",
	"hide_mobile":"false",
	"title":"技术总监",
	"hired_date":"1597573616828",
	"userid":"zhangsan",
	"work_place":"未来park",
	"dept_title_list":{
		"dept_id":"2",
		"title":"资深产品经理"
	},
	"dept_order_list":{
		"dept_id":"2",
		"order":"1"
	},
	"senior_mode":"false",
	"org_email":"test@xxx.com",
	"name":"张三",
	"dept_id_list":"\"2,3,4\"",
	"job_number":"4",
	"email":"test@xxx.com"
}

func (User) Validate

func (u User) Validate(valid *validator.Validate, trans translator.Translator) error

请求参数验证

type UserDetail

type UserDetail struct {
	Response
	Id              string      `json:"userid"`          // 员工唯一标识ID(不可修改),企业内必须唯一。长度为1~64个字符,如果不传,将自动生成一个userid。
	UnionId         string      `json:"unionid"`         // 员工在当前开发者企业账号范围内的唯一标识,系统生成,固定值,不会改变。
	OpenId          string      `json:"OpenId"`          // openId
	Name            string      `json:"name"`            // 员工姓名,长度最大64个字符。
	Email           string      `json:"email"`           // 员工邮箱,长度最大64个字符。企业内必须唯一,不可重复。
	Mobile          string      `json:"mobile"`          // 手机号码,企业内必须唯一,不可重复。
	Position        string      `json:"position"`        // 职位信息。长度为0~64个字符
	Roles           []UserRoles `json:"roles"`           // 用户所在角色列表。
	OrgEmail        string      `json:"orgEmail"`        // 员工的企业邮箱,如果员工已经开通了企业邮箱,接口会返回,否则会报错。
	Avatar          string      `json:"avatar"`          // 头像
	Senior          bool        `json:"isSenior"`        // 是否开启高管模式
	Authed          bool        `json:"realAuthed"`      // 是否实名认证:true:是false:否
	Boss            bool        `json:"isBoss"`          // 是否为企业的老板
	Active          bool        `json:"active"`          // 是否激活
	Hide            bool        `json:"isHide"`          // 是否号码隐藏:管模式
	Admin           bool        `json:"isAdmin"`         // 是否为企业的管理员
	JobNumber       string      `json:"jobnumber"`       // 员工工号,对应显示到OA后台和客户端个人资料的工号栏目。长度为0~64个字符。码隐藏:管模式
	Remark          string      `json:"remark"`          // 备注,长度最大为1024个字符。
	WorkPlace       string      `json:"workPlace"`       // 办公地点。长度为0~50个字符。
	Tel             string      `json:"tel"`             // 分机号。长度为0~50个字符,企业内必须唯一,不可重复。
	PositionInDepts string      `json:"positionInDepts"` // 设置用户在每个部门下的职位。Key是deptId,表示部门;Value是职位,表示在这个部门下的职位。
	LeaderInDepts   string      `json:"isLeaderInDepts"` // 在部门里是否主管
	OrderInDepts    string      `json:"orderInDepts"`    // 在对应的部门中的排序,Map结构的json字符串。Key是部门的ID,Value是人员在这个部门的排序值。
	Department      []int       `json:"department"`      // 数组类型,数组里面值为整型,成员所属部门ID列表。
	Extattr         interface{} `json:"extattr"`         // 扩展属性,可以设置多种属性
	HiredDate       int         `json:"hiredDate"`       // 入职时间,Unix时间戳,单位毫秒。
	Lang            string      `json:"lang"`            // 通讯录语言,默认zh_CN。如果是英文,请输入en_US。
	StateCode       string      `json:"stateCode"`       // 国家地区码
	ManagerUserId   string      `json:"managerUserId"`   // 主管的ID
}

UserDetail:用户详情

type UserGetByCode

type UserGetByCode struct {
	Name              string `json:"name"`               // 姓名
	UnionId           string `json:"unionid"`            // 员工在当前开发者企业账号范围内的唯一标识,系统生成,固定值,不会改变。
	AssociatedUnionId string `json:"associated_unionid"` // 用户关联的unionId。
	UserId            string `json:"userid"`             // 用户的userid。
	DeviceId          string `json:"device_id"`          // 设备id
	Admin             bool   `json:"sys"`                // 是否是管理员。
	Level             int    `json:"sys_level"`          // 级别。 1:主管理员 2:子管理员 100:老板 0:其他(如普通员工)
}

UserGetByCode:根据code获取用户信息

type UserGetByCodeResponse

type UserGetByCodeResponse struct {
	Response
	UserGetByCode `json:"result"` // 可管理的部门ID列表
}

type UserIdResponse

type UserIdResponse struct {
	Response
	ContactType int    `json:"contactType,omitempty"` // 联系人类型:0:表示企业内部员工,1:表示企业外部联系人
	UserId      string `json:"userid"`                // 用户userid
}

UserIdResponse:创建用户、根据unionId获取

type UserRoles

type UserRoles struct {
	Id    int    `json:"id,omitempty"`        // 角色id
	Name  string `json:"name,omitempty"`      // 角色名称
	Group string `json:"groupName,omitempty"` // 角色组
}

UserRoles:用户角色

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL