tenant: add member management APIs
This commit is contained in:
@@ -185,6 +185,19 @@ definitions:
|
||||
退款原因:建议必填(由业务侧校验);用于审计与追责。
|
||||
type: string
|
||||
type: object
|
||||
dto.AdminTenantUserJoinResponse:
|
||||
properties:
|
||||
tenant_user:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.TenantUser'
|
||||
description: TenantUser 租户成员关系记录。
|
||||
type: object
|
||||
dto.AdminTenantUserRoleUpdateForm:
|
||||
properties:
|
||||
role:
|
||||
description: Role 角色:member/tenant_admin。
|
||||
type: string
|
||||
type: object
|
||||
dto.AdminTopupForm:
|
||||
properties:
|
||||
amount:
|
||||
@@ -1511,6 +1524,102 @@ paths:
|
||||
summary: 订单退款(租户管理)
|
||||
tags:
|
||||
- Tenant
|
||||
/t/{tenantCode}/v1/admin/users:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: Tenant Code
|
||||
in: path
|
||||
name: tenantCode
|
||||
required: true
|
||||
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: UserID 按用户ID过滤(可选)。
|
||||
in: query
|
||||
name: user_id
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/requests.Pager'
|
||||
- properties:
|
||||
items:
|
||||
$ref: '#/definitions/models.TenantUser'
|
||||
type: object
|
||||
summary: 成员列表(租户管理)
|
||||
tags:
|
||||
- Tenant
|
||||
/t/{tenantCode}/v1/admin/users/{userID}/join:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: Tenant Code
|
||||
in: path
|
||||
name: tenantCode
|
||||
required: true
|
||||
type: string
|
||||
- description: UserID
|
||||
format: int64
|
||||
in: path
|
||||
name: userID
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/dto.AdminTenantUserJoinResponse'
|
||||
summary: 添加租户成员(租户管理)
|
||||
tags:
|
||||
- Tenant
|
||||
/t/{tenantCode}/v1/admin/users/{userID}/role:
|
||||
patch:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: Tenant Code
|
||||
in: path
|
||||
name: tenantCode
|
||||
required: true
|
||||
type: string
|
||||
- description: UserID
|
||||
format: int64
|
||||
in: path
|
||||
name: userID
|
||||
required: true
|
||||
type: integer
|
||||
- description: Form
|
||||
in: body
|
||||
name: form
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.AdminTenantUserRoleUpdateForm'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/dto.AdminTenantUserJoinResponse'
|
||||
summary: 设置成员角色(租户管理)
|
||||
tags:
|
||||
- Tenant
|
||||
/t/{tenantCode}/v1/admin/users/{userID}/topup:
|
||||
post:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user