-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser_model.go
167 lines (145 loc) · 4.92 KB
/
user_model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
package dingtalk
// 根据userid获取用户详情
type GetUserInfoParams struct {
Language string `json:"language"`
Userid string `json:"userid"`
}
type GetUserInfoRes struct {
BaseResponse
Result User `json:"result"`
}
type User struct {
Extension string `json:"extension"`
Unionid string `json:"unionid"`
Boss bool `json:"boss"`
UnionEmpEXT UnionEmpEXT `json:"unionEmpExt"`
RoleList []RoleList `json:"role_list"`
Admin bool `json:"admin"`
Remark string `json:"remark"`
Title string `json:"title"`
HiredDate int64 `json:"hired_date"`
Userid string `json:"userid"`
WorkPlace string `json:"work_place"`
DeptOrderList []DeptOrderList `json:"dept_order_list"`
RealAuthed bool `json:"real_authed"`
DeptIDList []int64 `json:"dept_id_list"`
JobNumber string `json:"job_number"`
Email string `json:"email"`
OrgMail string `json:"org_email"`
LeaderInDept []LeaderInDept `json:"leader_in_dept"`
ManagerUserid string `json:"manager_userid"`
Mobile string `json:"mobile"`
Active bool `json:"active"`
Telephone string `json:"telephone"`
Avatar string `json:"avatar"`
HideMobile bool `json:"hide_mobile"`
Senior bool `json:"senior"`
Name string `json:"name"`
StateCode string `json:"state_code"`
}
type DeptOrderList struct {
DeptID int64 `json:"dept_id"`
Order float64 `json:"order"`
}
type LeaderInDept struct {
DeptID int64 `json:"dept_id"`
Leader bool `json:"leader"`
}
type RoleList struct {
GroupName string `json:"group_name"`
ID int64 `json:"id"`
Name string `json:"name"`
}
type UnionEmpEXT struct {
CorpID string `json:"corpId"`
Userid string `json:"userid"`
UnionEmpMapList []UnionEmpMapList `json:"unionEmpMapList"`
}
type UnionEmpMapList struct {
CorpID string `json:"corpId"`
Userid string `json:"userid"`
}
// 获取部门用户详情
type GetUserInfoWithDepartmentParams struct {
Cursor int64 `json:"cursor"`
ContainAccessLimit bool `json:"contain_access_limit"`
Size int64 `json:"size"`
OrderField string `json:"order_field"`
Language string `json:"language"`
DeptID int64 `json:"dept_id"`
}
type GetUserInfoWithDepartmentRes struct {
BaseResponse
Result GetUserInfoWithDepartmentResult
}
type GetUserInfoWithDepartmentResult struct {
PaginationInfo
List []GetUserInfoWithDepartmentList `json:"list"`
}
type GetUserInfoWithDepartmentList struct {
DeptOrder int64 `json:"dept_order"`
Leader bool `json:"leader"`
Extension string `json:"extension"`
Unionid string `json:"unionid"`
Boss bool `json:"boss"`
ExclusiveAccount bool `json:"exclusive_account"`
Mobile string `json:"mobile"`
Active bool `json:"active"`
Admin bool `json:"admin"`
Telephone string `json:"telephone"`
Remark string `json:"remark"`
Avatar string `json:"avatar"`
HideMobile bool `json:"hide_mobile"`
Title string `json:"title"`
HiredDate int64 `json:"hired_date"`
Userid string `json:"userid"`
WorkPlace string `json:"work_place"`
OrgEmail string `json:"org_email"`
Name string `json:"name"`
DeptIDList []int64 `json:"dept_id_list"`
JobNumber string `json:"job_number"`
StateCode string `json:"state_code"`
Email string `json:"email"`
}
// 获取部门用户userid列表
type GetUserIdWithDepartmentParams struct {
DeptID int64 `json:"dept_id"`
}
type GetUserIdWithDepartmentRes struct {
BaseResponse
Result GetUserIdWithDepartmentResult
}
type GetUserIdWithDepartmentResult struct {
UseridList []string `json:"userid_list"`
}
type GetUseridByUnionidRes struct {
BaseResponse
Result GetUseridByUnionidResult `json:"result"`
}
type GetUseridByUnionidResult struct {
ContactType int `json:"contact_type"`
Userid string `json:"userid"`
}
type GetUserinfoByCodeRes struct {
BaseResponse
Result GetUserinfoByCodeResult `json:"result"`
}
type GetUserinfoByCodeResult struct {
Userid string `json:"userid"`
DeviceId string `json:"device_id"`
Sys bool `json:"sys"`
SysLevel int `json:"sys_level"`
AssociatedUnionid string `json:"associated_unionid"`
Unionid string `json:"unionid"`
Name string `json:"name"`
}
type GetUserinfoByMobileParams struct {
Mobile string `json:"mobile"`
}
type GetUserinfoByMobileRes struct {
BaseResponse
Result GetUserinfoByMobileResult `json:"result"`
}
type GetUserinfoByMobileResult struct {
Userid string `json:"userid"`
}