feat: expand superadmin user detail views

This commit is contained in:
2026-01-15 12:29:52 +08:00
parent 8419ddede7
commit bec984b959
10 changed files with 2874 additions and 12 deletions

View File

@@ -520,6 +520,100 @@ const docTemplate = `{
}
}
},
"/super/v1/tenant-join-requests": {
"get": {
"description": "List tenant join requests across tenants",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tenant"
],
"summary": "List tenant join requests",
"parameters": [
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/requests.Pager"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SuperTenantJoinRequestItem"
}
}
}
}
]
}
}
}
}
},
"/super/v1/tenant-join-requests/{id}/review": {
"post": {
"description": "Approve or reject a tenant join request",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tenant"
],
"summary": "Review tenant join request",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Join request ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Review form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.TenantJoinReviewForm"
}
}
],
"responses": {
"200": {
"description": "Reviewed",
"schema": {
"type": "string"
}
}
}
}
},
"/super/v1/tenants": {
"get": {
"description": "List tenants",
@@ -913,6 +1007,229 @@ const docTemplate = `{
}
}
},
"/super/v1/tenants/{tenantID}/coupons": {
"post": {
"description": "Create coupon for tenant",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Coupon"
],
"summary": "Create coupon",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Tenant ID",
"name": "tenantID",
"in": "path",
"required": true
},
{
"description": "Create form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.CouponCreateForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.CouponItem"
}
}
}
}
},
"/super/v1/tenants/{tenantID}/coupons/{id}": {
"get": {
"description": "Get coupon detail",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Coupon"
],
"summary": "Get coupon",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Tenant ID",
"name": "tenantID",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "Coupon ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.CouponItem"
}
}
}
},
"put": {
"description": "Update coupon for tenant",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Coupon"
],
"summary": "Update coupon",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Tenant ID",
"name": "tenantID",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "Coupon ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.CouponUpdateForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.CouponItem"
}
}
}
}
},
"/super/v1/tenants/{tenantID}/coupons/{id}/grant": {
"post": {
"description": "Grant coupon to users",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Coupon"
],
"summary": "Grant coupon",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Tenant ID",
"name": "tenantID",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "Coupon ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Grant form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.CouponGrantForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.SuperCouponGrantResponse"
}
}
}
}
},
"/super/v1/tenants/{tenantID}/invites": {
"post": {
"description": "Create tenant invite code",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tenant"
],
"summary": "Create tenant invite",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Tenant ID",
"name": "tenantID",
"in": "path",
"required": true
},
{
"description": "Invite form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.TenantInviteCreateForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.TenantInviteItem"
}
}
}
}
},
"/super/v1/tenants/{tenantID}/users": {
"get": {
"description": "List tenant users",
@@ -1116,6 +1433,159 @@ const docTemplate = `{
}
}
},
"/super/v1/users/{id}/coupons": {
"get": {
"description": "List coupons of a user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "List user coupons",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/requests.Pager"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SuperUserCouponItem"
}
}
}
}
]
}
}
}
}
},
"/super/v1/users/{id}/notifications": {
"get": {
"description": "List notifications of a user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "List user notifications",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/requests.Pager"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SuperUserNotificationItem"
}
}
}
}
]
}
}
}
}
},
"/super/v1/users/{id}/realname": {
"get": {
"description": "Get real-name verification detail of a user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "Get user real-name verification detail",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.SuperUserRealNameResponse"
}
}
}
}
},
"/super/v1/users/{id}/roles": {
"patch": {
"description": "Update user roles",
@@ -4279,6 +4749,19 @@ const docTemplate = `{
"TenantUserRoleTenantAdmin"
]
},
"consts.UserCouponStatus": {
"type": "string",
"enum": [
"unused",
"used",
"expired"
],
"x-enum-varnames": [
"UserCouponStatusUnused",
"UserCouponStatusUsed",
"UserCouponStatusExpired"
]
},
"consts.UserStatus": {
"type": "string",
"enum": [
@@ -5635,6 +6118,15 @@ const docTemplate = `{
}
}
},
"dto.SuperCouponGrantResponse": {
"type": "object",
"properties": {
"granted": {
"description": "Granted 实际发放数量。",
"type": "integer"
}
}
},
"dto.SuperCouponItem": {
"type": "object",
"properties": {
@@ -5922,6 +6414,67 @@ const docTemplate = `{
}
}
},
"dto.SuperTenantJoinRequestItem": {
"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"
},
"tenant_code": {
"description": "TenantCode 租户编码。",
"type": "string"
},
"tenant_id": {
"description": "TenantID 租户ID。",
"type": "integer"
},
"tenant_name": {
"description": "TenantName 租户名称。",
"type": "string"
},
"updated_at": {
"description": "UpdatedAt 更新时间RFC3339。",
"type": "string"
},
"user_id": {
"description": "UserID 申请用户ID。",
"type": "integer"
},
"username": {
"description": "Username 申请用户名称。",
"type": "string"
}
}
},
"dto.SuperTenantUserItem": {
"type": "object",
"properties": {
@@ -5943,6 +6496,95 @@ const docTemplate = `{
}
}
},
"dto.SuperUserCouponItem": {
"type": "object",
"properties": {
"coupon_id": {
"description": "CouponID 券模板ID。",
"type": "integer"
},
"created_at": {
"description": "CreatedAt 领取时间RFC3339。",
"type": "string"
},
"description": {
"description": "Description 券描述。",
"type": "string"
},
"end_at": {
"description": "EndAt 过期时间RFC3339。",
"type": "string"
},
"id": {
"description": "ID 用户券ID。",
"type": "integer"
},
"max_discount": {
"description": "MaxDiscount 折扣券最高抵扣金额(分)。",
"type": "integer"
},
"min_order_amount": {
"description": "MinOrderAmount 使用门槛金额(分)。",
"type": "integer"
},
"order_id": {
"description": "OrderID 使用订单ID未使用为0。",
"type": "integer"
},
"start_at": {
"description": "StartAt 生效时间RFC3339。",
"type": "string"
},
"status": {
"description": "Status 用户券状态。",
"allOf": [
{
"$ref": "#/definitions/consts.UserCouponStatus"
}
]
},
"status_description": {
"description": "StatusDescription 用户券状态描述(用于展示)。",
"type": "string"
},
"tenant_code": {
"description": "TenantCode 券所属租户编码。",
"type": "string"
},
"tenant_id": {
"description": "TenantID 券所属租户ID。",
"type": "integer"
},
"tenant_name": {
"description": "TenantName 券所属租户名称。",
"type": "string"
},
"title": {
"description": "Title 券标题。",
"type": "string"
},
"type": {
"description": "Type 券类型。",
"allOf": [
{
"$ref": "#/definitions/consts.CouponType"
}
]
},
"type_description": {
"description": "TypeDescription 券类型描述(用于展示)。",
"type": "string"
},
"used_at": {
"description": "UsedAt 使用时间RFC3339。",
"type": "string"
},
"value": {
"description": "Value 券面值/折扣值。",
"type": "integer"
}
}
},
"dto.SuperUserLite": {
"type": "object",
"properties": {
@@ -5987,6 +6629,68 @@ const docTemplate = `{
}
}
},
"dto.SuperUserNotificationItem": {
"type": "object",
"properties": {
"content": {
"description": "Content 通知内容。",
"type": "string"
},
"created_at": {
"description": "CreatedAt 发送时间RFC3339。",
"type": "string"
},
"id": {
"description": "ID 通知ID。",
"type": "integer"
},
"read": {
"description": "Read 是否已读。",
"type": "boolean"
},
"tenant_code": {
"description": "TenantCode 通知所属租户编码。",
"type": "string"
},
"tenant_id": {
"description": "TenantID 通知所属租户ID。",
"type": "integer"
},
"tenant_name": {
"description": "TenantName 通知所属租户名称。",
"type": "string"
},
"title": {
"description": "Title 通知标题。",
"type": "string"
},
"type": {
"description": "Type 通知类型。",
"type": "string"
}
}
},
"dto.SuperUserRealNameResponse": {
"type": "object",
"properties": {
"id_card_masked": {
"description": "IDCardMasked 身份证号脱敏展示。",
"type": "string"
},
"is_real_name_verified": {
"description": "IsRealNameVerified 是否已实名认证。",
"type": "boolean"
},
"real_name": {
"description": "RealName 真实姓名(来自用户元数据)。",
"type": "string"
},
"verified_at": {
"description": "VerifiedAt 实名认证时间RFC3339。",
"type": "string"
}
}
},
"dto.SuperWalletResponse": {
"type": "object",
"properties": {

View File

@@ -514,6 +514,100 @@
}
}
},
"/super/v1/tenant-join-requests": {
"get": {
"description": "List tenant join requests across tenants",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tenant"
],
"summary": "List tenant join requests",
"parameters": [
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/requests.Pager"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SuperTenantJoinRequestItem"
}
}
}
}
]
}
}
}
}
},
"/super/v1/tenant-join-requests/{id}/review": {
"post": {
"description": "Approve or reject a tenant join request",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tenant"
],
"summary": "Review tenant join request",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Join request ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Review form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.TenantJoinReviewForm"
}
}
],
"responses": {
"200": {
"description": "Reviewed",
"schema": {
"type": "string"
}
}
}
}
},
"/super/v1/tenants": {
"get": {
"description": "List tenants",
@@ -907,6 +1001,229 @@
}
}
},
"/super/v1/tenants/{tenantID}/coupons": {
"post": {
"description": "Create coupon for tenant",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Coupon"
],
"summary": "Create coupon",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Tenant ID",
"name": "tenantID",
"in": "path",
"required": true
},
{
"description": "Create form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.CouponCreateForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.CouponItem"
}
}
}
}
},
"/super/v1/tenants/{tenantID}/coupons/{id}": {
"get": {
"description": "Get coupon detail",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Coupon"
],
"summary": "Get coupon",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Tenant ID",
"name": "tenantID",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "Coupon ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.CouponItem"
}
}
}
},
"put": {
"description": "Update coupon for tenant",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Coupon"
],
"summary": "Update coupon",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Tenant ID",
"name": "tenantID",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "Coupon ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.CouponUpdateForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.CouponItem"
}
}
}
}
},
"/super/v1/tenants/{tenantID}/coupons/{id}/grant": {
"post": {
"description": "Grant coupon to users",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Coupon"
],
"summary": "Grant coupon",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Tenant ID",
"name": "tenantID",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "Coupon ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Grant form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.CouponGrantForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.SuperCouponGrantResponse"
}
}
}
}
},
"/super/v1/tenants/{tenantID}/invites": {
"post": {
"description": "Create tenant invite code",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tenant"
],
"summary": "Create tenant invite",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Tenant ID",
"name": "tenantID",
"in": "path",
"required": true
},
{
"description": "Invite form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.TenantInviteCreateForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.TenantInviteItem"
}
}
}
}
},
"/super/v1/tenants/{tenantID}/users": {
"get": {
"description": "List tenant users",
@@ -1110,6 +1427,159 @@
}
}
},
"/super/v1/users/{id}/coupons": {
"get": {
"description": "List coupons of a user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "List user coupons",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/requests.Pager"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SuperUserCouponItem"
}
}
}
}
]
}
}
}
}
},
"/super/v1/users/{id}/notifications": {
"get": {
"description": "List notifications of a user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "List user notifications",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/requests.Pager"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SuperUserNotificationItem"
}
}
}
}
]
}
}
}
}
},
"/super/v1/users/{id}/realname": {
"get": {
"description": "Get real-name verification detail of a user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"summary": "Get user real-name verification detail",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.SuperUserRealNameResponse"
}
}
}
}
},
"/super/v1/users/{id}/roles": {
"patch": {
"description": "Update user roles",
@@ -4273,6 +4743,19 @@
"TenantUserRoleTenantAdmin"
]
},
"consts.UserCouponStatus": {
"type": "string",
"enum": [
"unused",
"used",
"expired"
],
"x-enum-varnames": [
"UserCouponStatusUnused",
"UserCouponStatusUsed",
"UserCouponStatusExpired"
]
},
"consts.UserStatus": {
"type": "string",
"enum": [
@@ -5629,6 +6112,15 @@
}
}
},
"dto.SuperCouponGrantResponse": {
"type": "object",
"properties": {
"granted": {
"description": "Granted 实际发放数量。",
"type": "integer"
}
}
},
"dto.SuperCouponItem": {
"type": "object",
"properties": {
@@ -5916,6 +6408,67 @@
}
}
},
"dto.SuperTenantJoinRequestItem": {
"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"
},
"tenant_code": {
"description": "TenantCode 租户编码。",
"type": "string"
},
"tenant_id": {
"description": "TenantID 租户ID。",
"type": "integer"
},
"tenant_name": {
"description": "TenantName 租户名称。",
"type": "string"
},
"updated_at": {
"description": "UpdatedAt 更新时间RFC3339。",
"type": "string"
},
"user_id": {
"description": "UserID 申请用户ID。",
"type": "integer"
},
"username": {
"description": "Username 申请用户名称。",
"type": "string"
}
}
},
"dto.SuperTenantUserItem": {
"type": "object",
"properties": {
@@ -5937,6 +6490,95 @@
}
}
},
"dto.SuperUserCouponItem": {
"type": "object",
"properties": {
"coupon_id": {
"description": "CouponID 券模板ID。",
"type": "integer"
},
"created_at": {
"description": "CreatedAt 领取时间RFC3339。",
"type": "string"
},
"description": {
"description": "Description 券描述。",
"type": "string"
},
"end_at": {
"description": "EndAt 过期时间RFC3339。",
"type": "string"
},
"id": {
"description": "ID 用户券ID。",
"type": "integer"
},
"max_discount": {
"description": "MaxDiscount 折扣券最高抵扣金额(分)。",
"type": "integer"
},
"min_order_amount": {
"description": "MinOrderAmount 使用门槛金额(分)。",
"type": "integer"
},
"order_id": {
"description": "OrderID 使用订单ID未使用为0。",
"type": "integer"
},
"start_at": {
"description": "StartAt 生效时间RFC3339。",
"type": "string"
},
"status": {
"description": "Status 用户券状态。",
"allOf": [
{
"$ref": "#/definitions/consts.UserCouponStatus"
}
]
},
"status_description": {
"description": "StatusDescription 用户券状态描述(用于展示)。",
"type": "string"
},
"tenant_code": {
"description": "TenantCode 券所属租户编码。",
"type": "string"
},
"tenant_id": {
"description": "TenantID 券所属租户ID。",
"type": "integer"
},
"tenant_name": {
"description": "TenantName 券所属租户名称。",
"type": "string"
},
"title": {
"description": "Title 券标题。",
"type": "string"
},
"type": {
"description": "Type 券类型。",
"allOf": [
{
"$ref": "#/definitions/consts.CouponType"
}
]
},
"type_description": {
"description": "TypeDescription 券类型描述(用于展示)。",
"type": "string"
},
"used_at": {
"description": "UsedAt 使用时间RFC3339。",
"type": "string"
},
"value": {
"description": "Value 券面值/折扣值。",
"type": "integer"
}
}
},
"dto.SuperUserLite": {
"type": "object",
"properties": {
@@ -5981,6 +6623,68 @@
}
}
},
"dto.SuperUserNotificationItem": {
"type": "object",
"properties": {
"content": {
"description": "Content 通知内容。",
"type": "string"
},
"created_at": {
"description": "CreatedAt 发送时间RFC3339。",
"type": "string"
},
"id": {
"description": "ID 通知ID。",
"type": "integer"
},
"read": {
"description": "Read 是否已读。",
"type": "boolean"
},
"tenant_code": {
"description": "TenantCode 通知所属租户编码。",
"type": "string"
},
"tenant_id": {
"description": "TenantID 通知所属租户ID。",
"type": "integer"
},
"tenant_name": {
"description": "TenantName 通知所属租户名称。",
"type": "string"
},
"title": {
"description": "Title 通知标题。",
"type": "string"
},
"type": {
"description": "Type 通知类型。",
"type": "string"
}
}
},
"dto.SuperUserRealNameResponse": {
"type": "object",
"properties": {
"id_card_masked": {
"description": "IDCardMasked 身份证号脱敏展示。",
"type": "string"
},
"is_real_name_verified": {
"description": "IsRealNameVerified 是否已实名认证。",
"type": "boolean"
},
"real_name": {
"description": "RealName 真实姓名(来自用户元数据)。",
"type": "string"
},
"verified_at": {
"description": "VerifiedAt 实名认证时间RFC3339。",
"type": "string"
}
}
},
"dto.SuperWalletResponse": {
"type": "object",
"properties": {

View File

@@ -92,6 +92,16 @@ definitions:
x-enum-varnames:
- TenantUserRoleMember
- TenantUserRoleTenantAdmin
consts.UserCouponStatus:
enum:
- unused
- used
- expired
type: string
x-enum-varnames:
- UserCouponStatusUnused
- UserCouponStatusUsed
- UserCouponStatusExpired
consts.UserStatus:
enum:
- active
@@ -1050,6 +1060,12 @@ definitions:
description: Name 租户名称。
type: string
type: object
dto.SuperCouponGrantResponse:
properties:
granted:
description: Granted 实际发放数量。
type: integer
type: object
dto.SuperCouponItem:
properties:
created_at:
@@ -1239,6 +1255,51 @@ definitions:
required:
- status
type: object
dto.SuperTenantJoinRequestItem:
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
tenant_code:
description: TenantCode 租户编码。
type: string
tenant_id:
description: TenantID 租户ID。
type: integer
tenant_name:
description: TenantName 租户名称。
type: string
updated_at:
description: UpdatedAt 更新时间RFC3339
type: string
user_id:
description: UserID 申请用户ID。
type: integer
username:
description: Username 申请用户名称。
type: string
type: object
dto.SuperTenantUserItem:
properties:
tenant_user:
@@ -1250,6 +1311,68 @@ definitions:
- $ref: '#/definitions/dto.SuperUserLite'
description: User 用户信息。
type: object
dto.SuperUserCouponItem:
properties:
coupon_id:
description: CouponID 券模板ID。
type: integer
created_at:
description: CreatedAt 领取时间RFC3339
type: string
description:
description: Description 券描述。
type: string
end_at:
description: EndAt 过期时间RFC3339
type: string
id:
description: ID 用户券ID。
type: integer
max_discount:
description: MaxDiscount 折扣券最高抵扣金额(分)。
type: integer
min_order_amount:
description: MinOrderAmount 使用门槛金额(分)。
type: integer
order_id:
description: OrderID 使用订单ID未使用为0
type: integer
start_at:
description: StartAt 生效时间RFC3339
type: string
status:
allOf:
- $ref: '#/definitions/consts.UserCouponStatus'
description: Status 用户券状态。
status_description:
description: StatusDescription 用户券状态描述(用于展示)。
type: string
tenant_code:
description: TenantCode 券所属租户编码。
type: string
tenant_id:
description: TenantID 券所属租户ID。
type: integer
tenant_name:
description: TenantName 券所属租户名称。
type: string
title:
description: Title 券标题。
type: string
type:
allOf:
- $ref: '#/definitions/consts.CouponType'
description: Type 券类型。
type_description:
description: TypeDescription 券类型描述(用于展示)。
type: string
used_at:
description: UsedAt 使用时间RFC3339
type: string
value:
description: Value 券面值/折扣值。
type: integer
type: object
dto.SuperUserLite:
properties:
created_at:
@@ -1280,6 +1403,51 @@ definitions:
description: VerifiedAt 实名认证时间RFC3339
type: string
type: object
dto.SuperUserNotificationItem:
properties:
content:
description: Content 通知内容。
type: string
created_at:
description: CreatedAt 发送时间RFC3339
type: string
id:
description: ID 通知ID。
type: integer
read:
description: Read 是否已读。
type: boolean
tenant_code:
description: TenantCode 通知所属租户编码。
type: string
tenant_id:
description: TenantID 通知所属租户ID。
type: integer
tenant_name:
description: TenantName 通知所属租户名称。
type: string
title:
description: Title 通知标题。
type: string
type:
description: Type 通知类型。
type: string
type: object
dto.SuperUserRealNameResponse:
properties:
id_card_masked:
description: IDCardMasked 身份证号脱敏展示。
type: string
is_real_name_verified:
description: IsRealNameVerified 是否已实名认证。
type: boolean
real_name:
description: RealName 真实姓名(来自用户元数据)。
type: string
verified_at:
description: VerifiedAt 实名认证时间RFC3339
type: string
type: object
dto.SuperWalletResponse:
properties:
balance:
@@ -2421,6 +2589,65 @@ paths:
summary: Report overview
tags:
- Report
/super/v1/tenant-join-requests:
get:
consumes:
- application/json
description: List tenant join requests across tenants
parameters:
- description: Page number
in: query
name: page
type: integer
- description: Page size
in: query
name: limit
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/requests.Pager'
- properties:
items:
items:
$ref: '#/definitions/dto.SuperTenantJoinRequestItem'
type: array
type: object
summary: List tenant join requests
tags:
- Tenant
/super/v1/tenant-join-requests/{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 tenant join request
tags:
- Tenant
/super/v1/tenants:
get:
consumes:
@@ -2625,6 +2852,157 @@ paths:
summary: Update content status
tags:
- Content
/super/v1/tenants/{tenantID}/coupons:
post:
consumes:
- application/json
description: Create coupon for tenant
parameters:
- description: Tenant ID
format: int64
in: path
name: tenantID
required: true
type: integer
- description: Create form
in: body
name: form
required: true
schema:
$ref: '#/definitions/dto.CouponCreateForm'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.CouponItem'
summary: Create coupon
tags:
- Coupon
/super/v1/tenants/{tenantID}/coupons/{id}:
get:
consumes:
- application/json
description: Get coupon detail
parameters:
- description: Tenant ID
format: int64
in: path
name: tenantID
required: true
type: integer
- description: Coupon ID
format: int64
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.CouponItem'
summary: Get coupon
tags:
- Coupon
put:
consumes:
- application/json
description: Update coupon for tenant
parameters:
- description: Tenant ID
format: int64
in: path
name: tenantID
required: true
type: integer
- description: Coupon ID
format: int64
in: path
name: id
required: true
type: integer
- description: Update form
in: body
name: form
required: true
schema:
$ref: '#/definitions/dto.CouponUpdateForm'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.CouponItem'
summary: Update coupon
tags:
- Coupon
/super/v1/tenants/{tenantID}/coupons/{id}/grant:
post:
consumes:
- application/json
description: Grant coupon to users
parameters:
- description: Tenant ID
format: int64
in: path
name: tenantID
required: true
type: integer
- description: Coupon ID
format: int64
in: path
name: id
required: true
type: integer
- description: Grant form
in: body
name: form
required: true
schema:
$ref: '#/definitions/dto.CouponGrantForm'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.SuperCouponGrantResponse'
summary: Grant coupon
tags:
- Coupon
/super/v1/tenants/{tenantID}/invites:
post:
consumes:
- application/json
description: Create tenant invite code
parameters:
- description: Tenant ID
format: int64
in: path
name: tenantID
required: true
type: integer
- 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 tenant invite
tags:
- Tenant
/super/v1/tenants/{tenantID}/users:
get:
consumes:
@@ -2767,6 +3145,102 @@ paths:
summary: Get user
tags:
- User
/super/v1/users/{id}/coupons:
get:
consumes:
- application/json
description: List coupons of a user
parameters:
- description: User ID
format: int64
in: path
name: id
required: true
type: integer
- description: Page number
in: query
name: page
type: integer
- description: Page size
in: query
name: limit
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/requests.Pager'
- properties:
items:
items:
$ref: '#/definitions/dto.SuperUserCouponItem'
type: array
type: object
summary: List user coupons
tags:
- User
/super/v1/users/{id}/notifications:
get:
consumes:
- application/json
description: List notifications of a user
parameters:
- description: User ID
format: int64
in: path
name: id
required: true
type: integer
- description: Page number
in: query
name: page
type: integer
- description: Page size
in: query
name: limit
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/requests.Pager'
- properties:
items:
items:
$ref: '#/definitions/dto.SuperUserNotificationItem'
type: array
type: object
summary: List user notifications
tags:
- User
/super/v1/users/{id}/realname:
get:
consumes:
- application/json
description: Get real-name verification detail of a user
parameters:
- description: User ID
format: int64
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.SuperUserRealNameResponse'
summary: Get user real-name verification detail
tags:
- User
/super/v1/users/{id}/roles:
patch:
consumes: