feat: portal tenant apply flow

This commit is contained in:
2025-12-25 11:12:11 +08:00
parent 81240fa0d1
commit 03117b827b
15 changed files with 691 additions and 12 deletions

View File

@@ -4085,6 +4085,61 @@ const docTemplate = `{
}
}
}
},
"/v1/tenant/application": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Web"
],
"summary": "获取租户申请信息(申请创作者)",
"responses": {
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/dto.TenantApplicationResponse"
}
}
}
}
},
"/v1/tenant/apply": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Web"
],
"summary": "提交租户申请(申请创作者)",
"parameters": [
{
"description": "form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.TenantApplyForm"
}
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/dto.TenantApplicationResponse"
}
}
}
}
}
},
"definitions": {
@@ -5338,6 +5393,56 @@ const docTemplate = `{
}
}
},
"dto.TenantApplicationResponse": {
"type": "object",
"properties": {
"createdAt": {
"description": "CreatedAt 申请创建时间(租户记录创建时间)。",
"type": "string"
},
"hasApplication": {
"description": "HasApplication 是否已提交过申请(或已成为创作者)。",
"type": "boolean"
},
"status": {
"description": "Status 租户状态pending_verify/verified/banned。",
"allOf": [
{
"$ref": "#/definitions/consts.TenantStatus"
}
]
},
"statusDescription": {
"description": "StatusDescription 状态描述(便于前端展示)。",
"type": "string"
},
"tenantCode": {
"description": "TenantCode 租户 Code。",
"type": "string"
},
"tenantId": {
"description": "TenantID 租户ID。",
"type": "integer"
},
"tenantName": {
"description": "TenantName 租户名称。",
"type": "string"
}
}
},
"dto.TenantApplyForm": {
"type": "object",
"properties": {
"code": {
"description": "Code 租户 ID用于 URL/系统标识全局唯一tenants.code忽略大小写。",
"type": "string"
},
"name": {
"description": "Name 租户名称(展示用)。",
"type": "string"
}
}
},
"dto.TenantCreateForm": {
"type": "object",
"required": [