feat: add tenant membership flow
This commit is contained in:
@@ -1015,6 +1015,51 @@ definitions:
|
||||
required:
|
||||
- duration
|
||||
type: object
|
||||
dto.TenantInviteAcceptForm:
|
||||
properties:
|
||||
code:
|
||||
description: Code 邀请码(必填)。
|
||||
type: string
|
||||
type: object
|
||||
dto.TenantInviteCreateForm:
|
||||
properties:
|
||||
expires_at:
|
||||
description: ExpiresAt 过期时间(RFC3339,可选,空值使用默认过期时间)。
|
||||
type: string
|
||||
max_uses:
|
||||
description: MaxUses 最大可使用次数(<=0 默认 1)。
|
||||
type: integer
|
||||
remark:
|
||||
description: Remark 备注说明(可选)。
|
||||
type: string
|
||||
type: object
|
||||
dto.TenantInviteItem:
|
||||
properties:
|
||||
code:
|
||||
description: Code 邀请码。
|
||||
type: string
|
||||
created_at:
|
||||
description: CreatedAt 创建时间(RFC3339)。
|
||||
type: string
|
||||
expires_at:
|
||||
description: ExpiresAt 过期时间(RFC3339,空字符串表示不限制)。
|
||||
type: string
|
||||
id:
|
||||
description: ID 邀请记录ID。
|
||||
type: integer
|
||||
max_uses:
|
||||
description: MaxUses 最大可使用次数。
|
||||
type: integer
|
||||
remark:
|
||||
description: Remark 备注说明。
|
||||
type: string
|
||||
status:
|
||||
description: Status 邀请状态(active/disabled/expired)。
|
||||
type: string
|
||||
used_count:
|
||||
description: UsedCount 已使用次数。
|
||||
type: integer
|
||||
type: object
|
||||
dto.TenantItem:
|
||||
properties:
|
||||
admin_users:
|
||||
@@ -1074,6 +1119,21 @@ definitions:
|
||||
description: UUID 租户UUID。
|
||||
type: string
|
||||
type: object
|
||||
dto.TenantJoinApplyForm:
|
||||
properties:
|
||||
reason:
|
||||
description: Reason 申请加入原因(可选,空值会使用默认文案)。
|
||||
type: string
|
||||
type: object
|
||||
dto.TenantJoinReviewForm:
|
||||
properties:
|
||||
action:
|
||||
description: Action 审核动作(approve/reject)。
|
||||
type: string
|
||||
reason:
|
||||
description: Reason 审核说明(可选,用于展示驳回原因或备注)。
|
||||
type: string
|
||||
type: object
|
||||
dto.TenantOwnerUserLite:
|
||||
properties:
|
||||
id:
|
||||
@@ -2662,6 +2722,56 @@ paths:
|
||||
summary: Dashboard stats
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/members/{id}/review:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Approve or reject a tenant join request
|
||||
parameters:
|
||||
- description: Join request ID
|
||||
format: int64
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: Review form
|
||||
in: body
|
||||
name: form
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.TenantJoinReviewForm'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Reviewed
|
||||
schema:
|
||||
type: string
|
||||
summary: Review join request
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/members/invite:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Create an invite for tenant members
|
||||
parameters:
|
||||
- description: Invite form
|
||||
in: body
|
||||
name: form
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.TenantInviteCreateForm'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/dto.TenantInviteItem'
|
||||
summary: Create member invite
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/orders:
|
||||
get:
|
||||
consumes:
|
||||
@@ -3488,6 +3598,83 @@ paths:
|
||||
summary: Follow tenant
|
||||
tags:
|
||||
- TenantPublic
|
||||
/t/{tenantCode}/v1/tenants/{id}/invites/accept:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Accept a tenant invite by code
|
||||
parameters:
|
||||
- description: Tenant ID
|
||||
format: int64
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: Invite form
|
||||
in: body
|
||||
name: form
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.TenantInviteAcceptForm'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Accepted
|
||||
schema:
|
||||
type: string
|
||||
summary: Accept tenant invite
|
||||
tags:
|
||||
- TenantPublic
|
||||
/t/{tenantCode}/v1/tenants/{id}/join:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Cancel join request for a tenant
|
||||
parameters:
|
||||
- description: Tenant ID
|
||||
format: int64
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Canceled
|
||||
schema:
|
||||
type: string
|
||||
summary: Cancel join request
|
||||
tags:
|
||||
- TenantPublic
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Submit join request for a tenant
|
||||
parameters:
|
||||
- description: Tenant ID
|
||||
format: int64
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: Join form
|
||||
in: body
|
||||
name: form
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.TenantJoinApplyForm'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Applied
|
||||
schema:
|
||||
type: string
|
||||
summary: Apply to join tenant
|
||||
tags:
|
||||
- TenantPublic
|
||||
/t/{tenantCode}/v1/topics:
|
||||
get:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user