feat: add tenant membership flow

This commit is contained in:
2026-01-13 10:26:11 +08:00
parent fa43c0355f
commit 2a670b3a78
11 changed files with 1719 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
package dto
type TenantJoinApplyForm struct {
// Reason 申请加入原因(可选,空值会使用默认文案)。
Reason string `json:"reason"`
}
type TenantJoinReviewForm struct {
// Action 审核动作approve/reject
Action string `json:"action"`
// Reason 审核说明(可选,用于展示驳回原因或备注)。
Reason string `json:"reason"`
}
type TenantInviteCreateForm struct {
// MaxUses 最大可使用次数(<=0 默认 1
MaxUses int32 `json:"max_uses"`
// ExpiresAt 过期时间RFC3339可选空值使用默认过期时间
ExpiresAt *string `json:"expires_at"`
// Remark 备注说明(可选)。
Remark string `json:"remark"`
}
type TenantInviteAcceptForm struct {
// Code 邀请码(必填)。
Code string `json:"code"`
}
type TenantInviteItem struct {
// ID 邀请记录ID。
ID int64 `json:"id"`
// Code 邀请码。
Code string `json:"code"`
// Status 邀请状态active/disabled/expired
Status string `json:"status"`
// 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"`
}