zhangqian
2023-08-14 676ef551324d415ed5280166407c686481c6f51f
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
package request
 
import "apsClient/constvar"
 
type (
    Login struct {
        Username  string `json:"username"`  // 用户名
        Password  string `json:"password"`  // 密码
        Captcha   string `json:"captcha"`   // 验证码
        CaptchaId string `json:"captchaId"` // 验证码ID
    }
 
    Register struct {
        Username string `json:"userName" example:"用户名"`
        Password string `json:"passWord" example:"密码"`
        NickName string `json:"nickName" example:"昵称"`
        Phone    string `json:"phone" example:"电话号码"`
    }
 
    ChangePasswordReq struct {
        ID          uint   `json:"-"`           // 从 JWT 中提取 user id,避免越权
        Password    string `json:"password"`    // 密码
        NewPassword string `json:"newPassword"` // 新密码
    }
 
    DeleteUserReq struct {
        UserId string `json:"userId"` // 用户ID
    }
 
    ChangeUserInfo struct {
        ID       string `json:"id"`       // 用户ID
        NickName string `json:"nickName"` // 用户昵称
        Phone    string `json:"phone"`    // 用户手机号
        Pos      string `json:"pos"`      // 用户岗位
    }
 
    Examine struct {
        ID       string              `json:"id"`
        Status   constvar.UserStatus `json:"status"`
        Clusters string              `json:"clusters"`
    }
 
    GetUserList struct {
        PageInfo
        Keyword string `json:"keyword"` // 模糊查询关键字
    }
 
    SetOtherInfo struct {
        CompanyLogo string `json:"companyLogo"` // 公司logo
        SystemName  string `json:"systemName"`  // 系统名称
    }
 
    SetSelfInfo struct {
        NickName        string `json:"nickName"` // 用户昵称
        Phone           string `json:"phone"`    // 用户手机号
        CompanyName     string `json:"companyName" gorm:"type:varchar(255);comment:公司名称"`
        CompanyEmail    string `json:"companyEmail" gorm:"type:varchar(255);comment:公司邮箱"`
        CompanyContact  string `json:"companyContact" gorm:"type:varchar(255);comment:公司联系人姓名"`
        CompanyProvince string `json:"companyProvince" gorm:"type:varchar(255);comment:公司所在省"`
        CompanyCity     string `json:"companyCity" gorm:"type:varchar(255);comment:公司所在市"`
        CompanyTrade    string `json:"companyTrade" gorm:"type:varchar(255);comment:公司行业"`
        HeaderImage     string `json:"headerImage" gorm:"type:mediumtext;comment:用户头像"`
    }
)