|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+package configreq
|
|
|
2
|
+
|
|
|
3
|
+// UserLoginRequest 用户登录请求
|
|
|
4
|
+type UserLoginRequest struct {
|
|
|
5
|
+ UserID string `json:"user_id" binding:"required"`
|
|
|
6
|
+ Password string `json:"password" binding:"required"`
|
|
|
7
|
+}
|
|
|
8
|
+
|
|
|
9
|
+// UserRegisterRequest 用户注册请求(需邀请码)
|
|
|
10
|
+type UserRegisterRequest struct {
|
|
|
11
|
+ UserID string `json:"user_id" binding:"required"`
|
|
|
12
|
+ Password string `json:"password" binding:"required"`
|
|
|
13
|
+ Name string `json:"name" binding:"required"`
|
|
|
14
|
+ Mobile string `json:"mobile" binding:"required"`
|
|
|
15
|
+ Email string `json:"email,omitempty"`
|
|
|
16
|
+ InvitationCode string `json:"invitation_code" binding:"required"`
|
|
|
17
|
+}
|
|
|
18
|
+
|
|
|
19
|
+// CreateTenantAdminRequest 创建租户管理员用户请求(BasicAuth使用)
|
|
|
20
|
+type CreateTenantAdminRequest struct {
|
|
|
21
|
+ TenantID string `json:"tenant_id" binding:"required"`
|
|
|
22
|
+ UserID string `json:"user_id" binding:"required"`
|
|
|
23
|
+ Password string `json:"password" binding:"required"`
|
|
|
24
|
+ Name string `json:"name" binding:"required"`
|
|
|
25
|
+ Mobile string `json:"mobile" binding:"required"`
|
|
|
26
|
+ Email string `json:"email,omitempty"`
|
|
|
27
|
+}
|
|
|
28
|
+
|
|
|
29
|
+// CreateInvitationCodeRequest 创建邀请码请求(TokenAuth使用)
|
|
|
30
|
+type CreateInvitationCodeRequest struct {
|
|
|
31
|
+ RoleID string `json:"role_id" binding:"required"`
|
|
|
32
|
+ ExpiresDays int `json:"expires_days,omitempty"` // 可选,默认7天
|
|
|
33
|
+}
|
|
|
34
|
+
|
|
|
35
|
+// UserTokenRequest 用户创建自身token请求(TokenAuth使用)
|
|
|
36
|
+type UserTokenRequest struct {
|
|
|
37
|
+ ExpiresDays int `json:"expires_days" binding:"required"`
|
|
|
38
|
+ ProjectID string `json:"project_id,omitempty"` // 可选项目ID
|
|
|
39
|
+}
|