feat: add creator member management
This commit is contained in:
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user