feat: add creator member management
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"quyun/v2/app/requests"
|
||||
"quyun/v2/pkg/consts"
|
||||
)
|
||||
|
||||
type TenantJoinApplyForm struct {
|
||||
// Reason 申请加入原因(可选,空值会使用默认文案)。
|
||||
Reason string `json:"reason"`
|
||||
@@ -44,3 +49,110 @@ type TenantInviteItem struct {
|
||||
// Remark 备注说明。
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type TenantMemberListFilter struct {
|
||||
// Pagination 分页参数(page/limit)。
|
||||
requests.Pagination
|
||||
// Keyword 关键词搜索(匹配用户名/昵称/手机号)。
|
||||
Keyword *string `query:"keyword"`
|
||||
// Role 成员角色筛选(member/tenant_admin)。
|
||||
Role *consts.TenantUserRole `query:"role"`
|
||||
// Status 成员状态筛选(active/verified/banned 等)。
|
||||
Status *consts.UserStatus `query:"status"`
|
||||
}
|
||||
|
||||
type TenantMemberUserLite struct {
|
||||
// ID 用户ID。
|
||||
ID int64 `json:"id"`
|
||||
// Username 用户名。
|
||||
Username string `json:"username"`
|
||||
// Phone 手机号。
|
||||
Phone string `json:"phone"`
|
||||
// Nickname 昵称。
|
||||
Nickname string `json:"nickname"`
|
||||
// Avatar 头像URL。
|
||||
Avatar string `json:"avatar"`
|
||||
}
|
||||
|
||||
type TenantMemberItem struct {
|
||||
// ID 成员关系记录ID。
|
||||
ID int64 `json:"id"`
|
||||
// TenantID 租户ID。
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
// User 成员用户信息。
|
||||
User *TenantMemberUserLite `json:"user"`
|
||||
// Role 成员角色列表。
|
||||
Role []consts.TenantUserRole `json:"role"`
|
||||
// RoleDescription 角色描述列表。
|
||||
RoleDescription []string `json:"role_description"`
|
||||
// Status 成员状态。
|
||||
Status consts.UserStatus `json:"status"`
|
||||
// StatusDescription 成员状态描述。
|
||||
StatusDescription string `json:"status_description"`
|
||||
// CreatedAt 加入时间(RFC3339)。
|
||||
CreatedAt string `json:"created_at"`
|
||||
// UpdatedAt 更新时间(RFC3339)。
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
type TenantInviteListFilter struct {
|
||||
// Pagination 分页参数(page/limit)。
|
||||
requests.Pagination
|
||||
// Status 邀请状态筛选(active/disabled/expired)。
|
||||
Status *consts.TenantInviteStatus `query:"status"`
|
||||
}
|
||||
|
||||
type TenantInviteListItem struct {
|
||||
// ID 邀请记录ID。
|
||||
ID int64 `json:"id"`
|
||||
// Code 邀请码。
|
||||
Code string `json:"code"`
|
||||
// Status 邀请状态(active/disabled/expired)。
|
||||
Status string `json:"status"`
|
||||
// StatusDescription 状态描述。
|
||||
StatusDescription string `json:"status_description"`
|
||||
// MaxUses 最大可使用次数。
|
||||
MaxUses int32 `json:"max_uses"`
|
||||
// UsedCount 已使用次数。
|
||||
UsedCount int32 `json:"used_count"`
|
||||
// ExpiresAt 过期时间(RFC3339,空字符串表示不限制)。
|
||||
ExpiresAt string `json:"expires_at"`
|
||||
// CreatedAt 创建时间(RFC3339)。
|
||||
CreatedAt string `json:"created_at"`
|
||||
// Remark 备注说明。
|
||||
Remark string `json:"remark"`
|
||||
// Creator 创建者信息(可选)。
|
||||
Creator *TenantMemberUserLite `json:"creator"`
|
||||
}
|
||||
|
||||
type TenantJoinRequestListFilter struct {
|
||||
// Pagination 分页参数(page/limit)。
|
||||
requests.Pagination
|
||||
// Status 申请状态筛选(pending/approved/rejected)。
|
||||
Status *consts.TenantJoinRequestStatus `query:"status"`
|
||||
// Keyword 关键词搜索(匹配用户名/昵称/手机号)。
|
||||
Keyword *string `query:"keyword"`
|
||||
}
|
||||
|
||||
type TenantJoinRequestItem struct {
|
||||
// ID 申请记录ID。
|
||||
ID int64 `json:"id"`
|
||||
// User 申请用户信息。
|
||||
User *TenantMemberUserLite `json:"user"`
|
||||
// Status 申请状态。
|
||||
Status string `json:"status"`
|
||||
// StatusDescription 状态描述。
|
||||
StatusDescription string `json:"status_description"`
|
||||
// Reason 申请说明。
|
||||
Reason string `json:"reason"`
|
||||
// DecidedAt 审核时间(RFC3339)。
|
||||
DecidedAt string `json:"decided_at"`
|
||||
// DecidedOperatorUserID 审核操作者ID。
|
||||
DecidedOperatorUserID int64 `json:"decided_operator_user_id"`
|
||||
// DecidedReason 审核备注/原因。
|
||||
DecidedReason string `json:"decided_reason"`
|
||||
// CreatedAt 申请时间(RFC3339)。
|
||||
CreatedAt string `json:"created_at"`
|
||||
// UpdatedAt 更新时间(RFC3339)。
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user