user.go
3.1 KB
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
package protocol
/*修改手机号-验证旧手机验证码 */
type CheckSmsCodeRequest struct {
Captcha string `json:"captcha" valid:"Required"`
}
type CheckSmsCodeResponse struct {
}
/*修改手机号*/
type ChangePhoneRequest struct {
Phone string `json:"phone" valid:"Mobile"`
Captcha string `json:"captcha" valid:"Required"`
}
type ChangePhoneResponse struct {
}
/*ResetPassword */
type ResetPasswordRequest struct {
NewPwd string `json:"newPwd" valid:"Required"`
ConfirmPwd string `json:"confirmPwd" valid:"Required"`
}
type ResetPasswordResponse struct {
}
/*ChangePassword */
type ChangePasswordRequest struct {
NewPwd string `json:"newPwd" valid:"Required"`
ConfirmPwd string `json:"confirmPwd" valid:"Required"`
OldPwd string `json:"oldPwd" valid:"Required"`
}
type ChangePasswordResponse struct {
}
/*UserCompanys */
type UserCompanysRequest struct {
}
type UserCompanysResponse struct {
Companys []Company `json:"companys"`
}
/*SwitchCompany */
type SwitchCompanyRequest struct {
CompanyId int64 `json:"companyId" valid:"Required"`
}
type SwitchCompanyResponse struct {
AuthCode string `json:"authCode"`
}
/*用户信息 UserInfo */
type UserInfoRequest struct {
}
type UserInfoResponse struct {
User User `json:"user"`
}
//用户统计信息
/*UserStatistics */
type UserStatisticsRequest struct {
TypeTotal int64 `json:"typeTotal" valid:"Required"`
}
type UserStatisticsResponse struct {
Totals []TypeTotalItem `json:"totals"`
}
type User struct {
UserId int64 `json:"uid"`
MUserId int64 `json:"muid"` //中台用户ID
Name string `json:"uname"`
Phone string `json:"phone"`
Image Avatar `json:"image"`
Department Dep `json:"dep"`
Position Job `json:"job"`
ImToken string `json:"imToken"`
//companys
CompanyId int `json:"companyId"`
Company Company `json:"company"` //公司名称
Companys []Company `json:"companys"`
Departments []Dep `json:"deps"`
Positions []Job `json:"jobs"`
}
//公司
type Company struct {
Id int64 `json:"id"`
Name string `json:"name"`
CId int64 `json:"cid"` //统一用户中心公司编号
}
//部门
type Dep struct {
Id int `json:"id"`
Name string `json:"name"`
Time int64 `json:"-"`
}
//岗位
type Job struct {
Id int `json:"id"`
Name string `json:"name"`
Level int `json:"level"`
}
type TypeTotalItem struct {
Type int64 `json:"type"` //类型
Total int `json:"total"` //总数
HaveUpdate int `json:"haveUpdate"` //是否含有更新(0无更新,1有更新)
}
/*Permission 用户权限*/
type PermissionRequest struct {
ChanceId int64 `json:"chanceId"`
}
type PermissionResponse struct {
Check int `json:"-"`
DepartmentIds []int64 `json:"-"` //指定部门编号
EditScore int `json:"editScore"` //修改评分 1:允许 0:不允许
EditPublicStatus int `json:"editPublicStatus"` //修改公开状态 1:允许 0:不允许
CloseChance int `json:"-"` //关闭机会 1:允许 0:不允许
EditChance int `json:"editChance"` //编辑机会 1:允许 0:不允许
}