feat: add creator member management
This commit is contained in:
@@ -4617,6 +4617,98 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members": {
|
||||
"get": {
|
||||
"description": "List tenant members with filters",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "List tenant members",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Keyword 关键词搜索(匹配用户名/昵称/手机号)。",
|
||||
"name": "keyword",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Limit is page size; only values in {10,20,50,100} are accepted (otherwise defaults to 10).",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Page is 1-based page index; values \u003c= 0 are normalized to 1.",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"member",
|
||||
"tenant_admin"
|
||||
],
|
||||
"type": "string",
|
||||
"x-enum-varnames": [
|
||||
"TenantUserRoleMember",
|
||||
"TenantUserRoleTenantAdmin"
|
||||
],
|
||||
"description": "Role 成员角色筛选(member/tenant_admin)。",
|
||||
"name": "role",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"active",
|
||||
"inactive",
|
||||
"pending_verify",
|
||||
"verified",
|
||||
"banned"
|
||||
],
|
||||
"type": "string",
|
||||
"x-enum-varnames": [
|
||||
"UserStatusActive",
|
||||
"UserStatusInactive",
|
||||
"UserStatusPendingVerify",
|
||||
"UserStatusVerified",
|
||||
"UserStatusBanned"
|
||||
],
|
||||
"description": "Status 成员状态筛选(active/verified/banned 等)。",
|
||||
"name": "status",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/requests.Pager"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.TenantMemberItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members/invite": {
|
||||
"post": {
|
||||
"description": "Create an invite for tenant members",
|
||||
@@ -4651,6 +4743,214 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members/invites": {
|
||||
"get": {
|
||||
"description": "List member invites with filters",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "List member invites",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Limit is page size; only values in {10,20,50,100} are accepted (otherwise defaults to 10).",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Page is 1-based page index; values \u003c= 0 are normalized to 1.",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"active",
|
||||
"disabled",
|
||||
"expired"
|
||||
],
|
||||
"type": "string",
|
||||
"x-enum-varnames": [
|
||||
"TenantInviteStatusActive",
|
||||
"TenantInviteStatusDisabled",
|
||||
"TenantInviteStatusExpired"
|
||||
],
|
||||
"description": "Status 邀请状态筛选(active/disabled/expired)。",
|
||||
"name": "status",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/requests.Pager"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.TenantInviteListItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members/invites/{id}": {
|
||||
"delete": {
|
||||
"description": "Disable a member invite by ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "Disable member invite",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Invite ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Disabled",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members/join-requests": {
|
||||
"get": {
|
||||
"description": "List tenant join requests",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "List member join requests",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Keyword 关键词搜索(匹配用户名/昵称/手机号)。",
|
||||
"name": "keyword",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Limit is page size; only values in {10,20,50,100} are accepted (otherwise defaults to 10).",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Page is 1-based page index; values \u003c= 0 are normalized to 1.",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"pending",
|
||||
"approved",
|
||||
"rejected"
|
||||
],
|
||||
"type": "string",
|
||||
"x-enum-varnames": [
|
||||
"TenantJoinRequestStatusPending",
|
||||
"TenantJoinRequestStatusApproved",
|
||||
"TenantJoinRequestStatusRejected"
|
||||
],
|
||||
"description": "Status 申请状态筛选(pending/approved/rejected)。",
|
||||
"name": "status",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/requests.Pager"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.TenantJoinRequestItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members/{id}": {
|
||||
"delete": {
|
||||
"description": "Remove a tenant member by relation ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "Remove tenant member",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Member ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Removed",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members/{id}/review": {
|
||||
"post": {
|
||||
"description": "Approve or reject a tenant join request",
|
||||
@@ -6666,6 +6966,32 @@ const docTemplate = `{
|
||||
"RoleCreator"
|
||||
]
|
||||
},
|
||||
"consts.TenantInviteStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"disabled",
|
||||
"expired"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"TenantInviteStatusActive",
|
||||
"TenantInviteStatusDisabled",
|
||||
"TenantInviteStatusExpired"
|
||||
]
|
||||
},
|
||||
"consts.TenantJoinRequestStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
"approved",
|
||||
"rejected"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"TenantJoinRequestStatusPending",
|
||||
"TenantJoinRequestStatusApproved",
|
||||
"TenantJoinRequestStatusRejected"
|
||||
]
|
||||
},
|
||||
"consts.TenantLedgerType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -10641,6 +10967,55 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantInviteListItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"description": "Code 邀请码。",
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"description": "CreatedAt 创建时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"creator": {
|
||||
"description": "Creator 创建者信息(可选)。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.TenantMemberUserLite"
|
||||
}
|
||||
]
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"status_description": {
|
||||
"description": "StatusDescription 状态描述。",
|
||||
"type": "string"
|
||||
},
|
||||
"used_count": {
|
||||
"description": "UsedCount 已使用次数。",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -10736,6 +11111,55 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantJoinRequestItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"description": "CreatedAt 申请时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"decided_at": {
|
||||
"description": "DecidedAt 审核时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"decided_operator_user_id": {
|
||||
"description": "DecidedOperatorUserID 审核操作者ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"decided_reason": {
|
||||
"description": "DecidedReason 审核备注/原因。",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "ID 申请记录ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"reason": {
|
||||
"description": "Reason 申请说明。",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "Status 申请状态。",
|
||||
"type": "string"
|
||||
},
|
||||
"status_description": {
|
||||
"description": "StatusDescription 状态描述。",
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"description": "UpdatedAt 更新时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"user": {
|
||||
"description": "User 申请用户信息。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.TenantMemberUserLite"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantJoinReviewForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -10749,6 +11173,86 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantMemberItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"description": "CreatedAt 加入时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "ID 成员关系记录ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"role": {
|
||||
"description": "Role 成员角色列表。",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/consts.TenantUserRole"
|
||||
}
|
||||
},
|
||||
"role_description": {
|
||||
"description": "RoleDescription 角色描述列表。",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"description": "Status 成员状态。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/consts.UserStatus"
|
||||
}
|
||||
]
|
||||
},
|
||||
"status_description": {
|
||||
"description": "StatusDescription 成员状态描述。",
|
||||
"type": "string"
|
||||
},
|
||||
"tenant_id": {
|
||||
"description": "TenantID 租户ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"updated_at": {
|
||||
"description": "UpdatedAt 更新时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"user": {
|
||||
"description": "User 成员用户信息。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.TenantMemberUserLite"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantMemberUserLite": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"avatar": {
|
||||
"description": "Avatar 头像URL。",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "ID 用户ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"nickname": {
|
||||
"description": "Nickname 昵称。",
|
||||
"type": "string"
|
||||
},
|
||||
"phone": {
|
||||
"description": "Phone 手机号。",
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"description": "Username 用户名。",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantOwnerUserLite": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -4611,6 +4611,98 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members": {
|
||||
"get": {
|
||||
"description": "List tenant members with filters",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "List tenant members",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Keyword 关键词搜索(匹配用户名/昵称/手机号)。",
|
||||
"name": "keyword",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Limit is page size; only values in {10,20,50,100} are accepted (otherwise defaults to 10).",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Page is 1-based page index; values \u003c= 0 are normalized to 1.",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"member",
|
||||
"tenant_admin"
|
||||
],
|
||||
"type": "string",
|
||||
"x-enum-varnames": [
|
||||
"TenantUserRoleMember",
|
||||
"TenantUserRoleTenantAdmin"
|
||||
],
|
||||
"description": "Role 成员角色筛选(member/tenant_admin)。",
|
||||
"name": "role",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"active",
|
||||
"inactive",
|
||||
"pending_verify",
|
||||
"verified",
|
||||
"banned"
|
||||
],
|
||||
"type": "string",
|
||||
"x-enum-varnames": [
|
||||
"UserStatusActive",
|
||||
"UserStatusInactive",
|
||||
"UserStatusPendingVerify",
|
||||
"UserStatusVerified",
|
||||
"UserStatusBanned"
|
||||
],
|
||||
"description": "Status 成员状态筛选(active/verified/banned 等)。",
|
||||
"name": "status",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/requests.Pager"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.TenantMemberItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members/invite": {
|
||||
"post": {
|
||||
"description": "Create an invite for tenant members",
|
||||
@@ -4645,6 +4737,214 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members/invites": {
|
||||
"get": {
|
||||
"description": "List member invites with filters",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "List member invites",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Limit is page size; only values in {10,20,50,100} are accepted (otherwise defaults to 10).",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Page is 1-based page index; values \u003c= 0 are normalized to 1.",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"active",
|
||||
"disabled",
|
||||
"expired"
|
||||
],
|
||||
"type": "string",
|
||||
"x-enum-varnames": [
|
||||
"TenantInviteStatusActive",
|
||||
"TenantInviteStatusDisabled",
|
||||
"TenantInviteStatusExpired"
|
||||
],
|
||||
"description": "Status 邀请状态筛选(active/disabled/expired)。",
|
||||
"name": "status",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/requests.Pager"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.TenantInviteListItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members/invites/{id}": {
|
||||
"delete": {
|
||||
"description": "Disable a member invite by ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "Disable member invite",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Invite ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Disabled",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members/join-requests": {
|
||||
"get": {
|
||||
"description": "List tenant join requests",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "List member join requests",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Keyword 关键词搜索(匹配用户名/昵称/手机号)。",
|
||||
"name": "keyword",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Limit is page size; only values in {10,20,50,100} are accepted (otherwise defaults to 10).",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Page is 1-based page index; values \u003c= 0 are normalized to 1.",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"pending",
|
||||
"approved",
|
||||
"rejected"
|
||||
],
|
||||
"type": "string",
|
||||
"x-enum-varnames": [
|
||||
"TenantJoinRequestStatusPending",
|
||||
"TenantJoinRequestStatusApproved",
|
||||
"TenantJoinRequestStatusRejected"
|
||||
],
|
||||
"description": "Status 申请状态筛选(pending/approved/rejected)。",
|
||||
"name": "status",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/requests.Pager"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.TenantJoinRequestItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members/{id}": {
|
||||
"delete": {
|
||||
"description": "Remove a tenant member by relation ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "Remove tenant member",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Member ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Removed",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/members/{id}/review": {
|
||||
"post": {
|
||||
"description": "Approve or reject a tenant join request",
|
||||
@@ -6660,6 +6960,32 @@
|
||||
"RoleCreator"
|
||||
]
|
||||
},
|
||||
"consts.TenantInviteStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"disabled",
|
||||
"expired"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"TenantInviteStatusActive",
|
||||
"TenantInviteStatusDisabled",
|
||||
"TenantInviteStatusExpired"
|
||||
]
|
||||
},
|
||||
"consts.TenantJoinRequestStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
"approved",
|
||||
"rejected"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"TenantJoinRequestStatusPending",
|
||||
"TenantJoinRequestStatusApproved",
|
||||
"TenantJoinRequestStatusRejected"
|
||||
]
|
||||
},
|
||||
"consts.TenantLedgerType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -10635,6 +10961,55 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantInviteListItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"description": "Code 邀请码。",
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"description": "CreatedAt 创建时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"creator": {
|
||||
"description": "Creator 创建者信息(可选)。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.TenantMemberUserLite"
|
||||
}
|
||||
]
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"status_description": {
|
||||
"description": "StatusDescription 状态描述。",
|
||||
"type": "string"
|
||||
},
|
||||
"used_count": {
|
||||
"description": "UsedCount 已使用次数。",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -10730,6 +11105,55 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantJoinRequestItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"description": "CreatedAt 申请时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"decided_at": {
|
||||
"description": "DecidedAt 审核时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"decided_operator_user_id": {
|
||||
"description": "DecidedOperatorUserID 审核操作者ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"decided_reason": {
|
||||
"description": "DecidedReason 审核备注/原因。",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "ID 申请记录ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"reason": {
|
||||
"description": "Reason 申请说明。",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "Status 申请状态。",
|
||||
"type": "string"
|
||||
},
|
||||
"status_description": {
|
||||
"description": "StatusDescription 状态描述。",
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"description": "UpdatedAt 更新时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"user": {
|
||||
"description": "User 申请用户信息。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.TenantMemberUserLite"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantJoinReviewForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -10743,6 +11167,86 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantMemberItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"description": "CreatedAt 加入时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "ID 成员关系记录ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"role": {
|
||||
"description": "Role 成员角色列表。",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/consts.TenantUserRole"
|
||||
}
|
||||
},
|
||||
"role_description": {
|
||||
"description": "RoleDescription 角色描述列表。",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"description": "Status 成员状态。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/consts.UserStatus"
|
||||
}
|
||||
]
|
||||
},
|
||||
"status_description": {
|
||||
"description": "StatusDescription 成员状态描述。",
|
||||
"type": "string"
|
||||
},
|
||||
"tenant_id": {
|
||||
"description": "TenantID 租户ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"updated_at": {
|
||||
"description": "UpdatedAt 更新时间(RFC3339)。",
|
||||
"type": "string"
|
||||
},
|
||||
"user": {
|
||||
"description": "User 成员用户信息。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.TenantMemberUserLite"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantMemberUserLite": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"avatar": {
|
||||
"description": "Avatar 头像URL。",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "ID 用户ID。",
|
||||
"type": "integer"
|
||||
},
|
||||
"nickname": {
|
||||
"description": "Nickname 昵称。",
|
||||
"type": "string"
|
||||
},
|
||||
"phone": {
|
||||
"description": "Phone 手机号。",
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"description": "Username 用户名。",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantOwnerUserLite": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -138,6 +138,26 @@ definitions:
|
||||
- RoleUser
|
||||
- RoleSuperAdmin
|
||||
- RoleCreator
|
||||
consts.TenantInviteStatus:
|
||||
enum:
|
||||
- active
|
||||
- disabled
|
||||
- expired
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- TenantInviteStatusActive
|
||||
- TenantInviteStatusDisabled
|
||||
- TenantInviteStatusExpired
|
||||
consts.TenantJoinRequestStatus:
|
||||
enum:
|
||||
- pending
|
||||
- approved
|
||||
- rejected
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- TenantJoinRequestStatusPending
|
||||
- TenantJoinRequestStatusApproved
|
||||
- TenantJoinRequestStatusRejected
|
||||
consts.TenantLedgerType:
|
||||
enum:
|
||||
- debit_purchase
|
||||
@@ -2929,6 +2949,40 @@ definitions:
|
||||
description: UsedCount 已使用次数。
|
||||
type: integer
|
||||
type: object
|
||||
dto.TenantInviteListItem:
|
||||
properties:
|
||||
code:
|
||||
description: Code 邀请码。
|
||||
type: string
|
||||
created_at:
|
||||
description: CreatedAt 创建时间(RFC3339)。
|
||||
type: string
|
||||
creator:
|
||||
allOf:
|
||||
- $ref: '#/definitions/dto.TenantMemberUserLite'
|
||||
description: Creator 创建者信息(可选)。
|
||||
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
|
||||
status_description:
|
||||
description: StatusDescription 状态描述。
|
||||
type: string
|
||||
used_count:
|
||||
description: UsedCount 已使用次数。
|
||||
type: integer
|
||||
type: object
|
||||
dto.TenantItem:
|
||||
properties:
|
||||
admin_users:
|
||||
@@ -2994,6 +3048,40 @@ definitions:
|
||||
description: Reason 申请加入原因(可选,空值会使用默认文案)。
|
||||
type: string
|
||||
type: object
|
||||
dto.TenantJoinRequestItem:
|
||||
properties:
|
||||
created_at:
|
||||
description: CreatedAt 申请时间(RFC3339)。
|
||||
type: string
|
||||
decided_at:
|
||||
description: DecidedAt 审核时间(RFC3339)。
|
||||
type: string
|
||||
decided_operator_user_id:
|
||||
description: DecidedOperatorUserID 审核操作者ID。
|
||||
type: integer
|
||||
decided_reason:
|
||||
description: DecidedReason 审核备注/原因。
|
||||
type: string
|
||||
id:
|
||||
description: ID 申请记录ID。
|
||||
type: integer
|
||||
reason:
|
||||
description: Reason 申请说明。
|
||||
type: string
|
||||
status:
|
||||
description: Status 申请状态。
|
||||
type: string
|
||||
status_description:
|
||||
description: StatusDescription 状态描述。
|
||||
type: string
|
||||
updated_at:
|
||||
description: UpdatedAt 更新时间(RFC3339)。
|
||||
type: string
|
||||
user:
|
||||
allOf:
|
||||
- $ref: '#/definitions/dto.TenantMemberUserLite'
|
||||
description: User 申请用户信息。
|
||||
type: object
|
||||
dto.TenantJoinReviewForm:
|
||||
properties:
|
||||
action:
|
||||
@@ -3003,6 +3091,60 @@ definitions:
|
||||
description: Reason 审核说明(可选,用于展示驳回原因或备注)。
|
||||
type: string
|
||||
type: object
|
||||
dto.TenantMemberItem:
|
||||
properties:
|
||||
created_at:
|
||||
description: CreatedAt 加入时间(RFC3339)。
|
||||
type: string
|
||||
id:
|
||||
description: ID 成员关系记录ID。
|
||||
type: integer
|
||||
role:
|
||||
description: Role 成员角色列表。
|
||||
items:
|
||||
$ref: '#/definitions/consts.TenantUserRole'
|
||||
type: array
|
||||
role_description:
|
||||
description: RoleDescription 角色描述列表。
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
status:
|
||||
allOf:
|
||||
- $ref: '#/definitions/consts.UserStatus'
|
||||
description: Status 成员状态。
|
||||
status_description:
|
||||
description: StatusDescription 成员状态描述。
|
||||
type: string
|
||||
tenant_id:
|
||||
description: TenantID 租户ID。
|
||||
type: integer
|
||||
updated_at:
|
||||
description: UpdatedAt 更新时间(RFC3339)。
|
||||
type: string
|
||||
user:
|
||||
allOf:
|
||||
- $ref: '#/definitions/dto.TenantMemberUserLite'
|
||||
description: User 成员用户信息。
|
||||
type: object
|
||||
dto.TenantMemberUserLite:
|
||||
properties:
|
||||
avatar:
|
||||
description: Avatar 头像URL。
|
||||
type: string
|
||||
id:
|
||||
description: ID 用户ID。
|
||||
type: integer
|
||||
nickname:
|
||||
description: Nickname 昵称。
|
||||
type: string
|
||||
phone:
|
||||
description: Phone 手机号。
|
||||
type: string
|
||||
username:
|
||||
description: Username 用户名。
|
||||
type: string
|
||||
type: object
|
||||
dto.TenantOwnerUserLite:
|
||||
properties:
|
||||
id:
|
||||
@@ -6503,6 +6645,90 @@ paths:
|
||||
summary: Dashboard stats
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/members:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: List tenant members with filters
|
||||
parameters:
|
||||
- description: Keyword 关键词搜索(匹配用户名/昵称/手机号)。
|
||||
in: query
|
||||
name: keyword
|
||||
type: string
|
||||
- description: Limit is page size; only values in {10,20,50,100} are accepted
|
||||
(otherwise defaults to 10).
|
||||
in: query
|
||||
name: limit
|
||||
type: integer
|
||||
- description: Page is 1-based page index; values <= 0 are normalized to 1.
|
||||
in: query
|
||||
name: page
|
||||
type: integer
|
||||
- description: Role 成员角色筛选(member/tenant_admin)。
|
||||
enum:
|
||||
- member
|
||||
- tenant_admin
|
||||
in: query
|
||||
name: role
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- TenantUserRoleMember
|
||||
- TenantUserRoleTenantAdmin
|
||||
- description: Status 成员状态筛选(active/verified/banned 等)。
|
||||
enum:
|
||||
- active
|
||||
- inactive
|
||||
- pending_verify
|
||||
- verified
|
||||
- banned
|
||||
in: query
|
||||
name: status
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- UserStatusActive
|
||||
- UserStatusInactive
|
||||
- UserStatusPendingVerify
|
||||
- UserStatusVerified
|
||||
- UserStatusBanned
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/requests.Pager'
|
||||
- properties:
|
||||
items:
|
||||
items:
|
||||
$ref: '#/definitions/dto.TenantMemberItem'
|
||||
type: array
|
||||
type: object
|
||||
summary: List tenant members
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/members/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Remove a tenant member by relation ID
|
||||
parameters:
|
||||
- description: Member ID
|
||||
format: int64
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Removed
|
||||
schema:
|
||||
type: string
|
||||
summary: Remove tenant member
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/members/{id}/review:
|
||||
post:
|
||||
consumes:
|
||||
@@ -6553,6 +6779,120 @@ paths:
|
||||
summary: Create member invite
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/members/invites:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: List member invites with filters
|
||||
parameters:
|
||||
- description: Limit is page size; only values in {10,20,50,100} are accepted
|
||||
(otherwise defaults to 10).
|
||||
in: query
|
||||
name: limit
|
||||
type: integer
|
||||
- description: Page is 1-based page index; values <= 0 are normalized to 1.
|
||||
in: query
|
||||
name: page
|
||||
type: integer
|
||||
- description: Status 邀请状态筛选(active/disabled/expired)。
|
||||
enum:
|
||||
- active
|
||||
- disabled
|
||||
- expired
|
||||
in: query
|
||||
name: status
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- TenantInviteStatusActive
|
||||
- TenantInviteStatusDisabled
|
||||
- TenantInviteStatusExpired
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/requests.Pager'
|
||||
- properties:
|
||||
items:
|
||||
items:
|
||||
$ref: '#/definitions/dto.TenantInviteListItem'
|
||||
type: array
|
||||
type: object
|
||||
summary: List member invites
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/members/invites/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Disable a member invite by ID
|
||||
parameters:
|
||||
- description: Invite ID
|
||||
format: int64
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Disabled
|
||||
schema:
|
||||
type: string
|
||||
summary: Disable member invite
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/members/join-requests:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: List tenant join requests
|
||||
parameters:
|
||||
- description: Keyword 关键词搜索(匹配用户名/昵称/手机号)。
|
||||
in: query
|
||||
name: keyword
|
||||
type: string
|
||||
- description: Limit is page size; only values in {10,20,50,100} are accepted
|
||||
(otherwise defaults to 10).
|
||||
in: query
|
||||
name: limit
|
||||
type: integer
|
||||
- description: Page is 1-based page index; values <= 0 are normalized to 1.
|
||||
in: query
|
||||
name: page
|
||||
type: integer
|
||||
- description: Status 申请状态筛选(pending/approved/rejected)。
|
||||
enum:
|
||||
- pending
|
||||
- approved
|
||||
- rejected
|
||||
in: query
|
||||
name: status
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- TenantJoinRequestStatusPending
|
||||
- TenantJoinRequestStatusApproved
|
||||
- TenantJoinRequestStatusRejected
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/requests.Pager'
|
||||
- properties:
|
||||
items:
|
||||
items:
|
||||
$ref: '#/definitions/dto.TenantJoinRequestItem'
|
||||
type: array
|
||||
type: object
|
||||
summary: List member join requests
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/orders:
|
||||
get:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user