feat: add user_list
This commit is contained in:
@@ -151,9 +151,8 @@ const docTemplate = `{
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/v1/medias/{id}": {
|
||||
"post": {
|
||||
"description": "Test",
|
||||
"/super/v1/tenants/{tenantID}/status": {
|
||||
"patch": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -161,27 +160,52 @@ const docTemplate = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Test"
|
||||
"Super"
|
||||
],
|
||||
"summary": "Test",
|
||||
"summary": "更新租户状态",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "ID",
|
||||
"name": "id",
|
||||
"format": "int64",
|
||||
"description": "TenantID",
|
||||
"name": "tenantID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "年龄",
|
||||
"name": "age",
|
||||
"description": "Form",
|
||||
"name": "form",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.TenantStatusUpdateForm"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/super/v1/users": {
|
||||
"get": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Super"
|
||||
],
|
||||
"summary": "租户列表",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "asc",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "名称",
|
||||
"name": "name",
|
||||
"name": "desc",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
@@ -193,11 +217,21 @@ const docTemplate = `{
|
||||
"type": "integer",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "tenantID",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "username",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "成功",
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
@@ -206,8 +240,8 @@ const docTemplate = `{
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"list": {
|
||||
"$ref": "#/definitions/v1.ResponseItem"
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.UserItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -320,16 +354,17 @@ const docTemplate = `{
|
||||
"status": {
|
||||
"$ref": "#/definitions/consts.TenantStatus"
|
||||
},
|
||||
"status_description": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"userBalance": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
"user_balance": {
|
||||
"type": "integer"
|
||||
},
|
||||
"userCount": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
"user_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
@@ -345,6 +380,78 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantStatusUpdateForm": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"status": {
|
||||
"enum": [
|
||||
"normal",
|
||||
"disabled"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/consts.TenantStatus"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.UserItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"deleted_at": {
|
||||
"$ref": "#/definitions/gorm.DeletedAt"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"metas": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"owned": {
|
||||
"$ref": "#/definitions/models.Tenant"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/consts.Role"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/consts.UserStatus"
|
||||
},
|
||||
"status_description": {
|
||||
"type": "string"
|
||||
},
|
||||
"tenants": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Tenant"
|
||||
}
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"verified_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"gorm.DeletedAt": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -465,9 +572,6 @@ const docTemplate = `{
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.ResponseItem": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
|
||||
@@ -145,9 +145,8 @@
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/v1/medias/{id}": {
|
||||
"post": {
|
||||
"description": "Test",
|
||||
"/super/v1/tenants/{tenantID}/status": {
|
||||
"patch": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -155,27 +154,52 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Test"
|
||||
"Super"
|
||||
],
|
||||
"summary": "Test",
|
||||
"summary": "更新租户状态",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "ID",
|
||||
"name": "id",
|
||||
"format": "int64",
|
||||
"description": "TenantID",
|
||||
"name": "tenantID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "年龄",
|
||||
"name": "age",
|
||||
"description": "Form",
|
||||
"name": "form",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.TenantStatusUpdateForm"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/super/v1/users": {
|
||||
"get": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Super"
|
||||
],
|
||||
"summary": "租户列表",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "asc",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "名称",
|
||||
"name": "name",
|
||||
"name": "desc",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
@@ -187,11 +211,21 @@
|
||||
"type": "integer",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "tenantID",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "username",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "成功",
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
@@ -200,8 +234,8 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"list": {
|
||||
"$ref": "#/definitions/v1.ResponseItem"
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.UserItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -314,16 +348,17 @@
|
||||
"status": {
|
||||
"$ref": "#/definitions/consts.TenantStatus"
|
||||
},
|
||||
"status_description": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"userBalance": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
"user_balance": {
|
||||
"type": "integer"
|
||||
},
|
||||
"userCount": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
"user_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
@@ -339,6 +374,78 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.TenantStatusUpdateForm": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"status": {
|
||||
"enum": [
|
||||
"normal",
|
||||
"disabled"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/consts.TenantStatus"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.UserItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"deleted_at": {
|
||||
"$ref": "#/definitions/gorm.DeletedAt"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"metas": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"owned": {
|
||||
"$ref": "#/definitions/models.Tenant"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/consts.Role"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/consts.UserStatus"
|
||||
},
|
||||
"status_description": {
|
||||
"type": "string"
|
||||
},
|
||||
"tenants": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Tenant"
|
||||
}
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"verified_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"gorm.DeletedAt": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -459,9 +566,6 @@
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.ResponseItem": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
|
||||
@@ -71,16 +71,16 @@ definitions:
|
||||
type: string
|
||||
status:
|
||||
$ref: '#/definitions/consts.TenantStatus'
|
||||
status_description:
|
||||
type: string
|
||||
updated_at:
|
||||
type: string
|
||||
user_balance:
|
||||
type: integer
|
||||
user_count:
|
||||
type: integer
|
||||
user_id:
|
||||
type: integer
|
||||
userBalance:
|
||||
format: int64
|
||||
type: integer
|
||||
userCount:
|
||||
format: int64
|
||||
type: integer
|
||||
users:
|
||||
items:
|
||||
$ref: '#/definitions/models.User'
|
||||
@@ -88,6 +88,52 @@ definitions:
|
||||
uuid:
|
||||
type: string
|
||||
type: object
|
||||
dto.TenantStatusUpdateForm:
|
||||
properties:
|
||||
status:
|
||||
allOf:
|
||||
- $ref: '#/definitions/consts.TenantStatus'
|
||||
enum:
|
||||
- normal
|
||||
- disabled
|
||||
required:
|
||||
- status
|
||||
type: object
|
||||
dto.UserItem:
|
||||
properties:
|
||||
created_at:
|
||||
type: string
|
||||
deleted_at:
|
||||
$ref: '#/definitions/gorm.DeletedAt'
|
||||
id:
|
||||
type: integer
|
||||
metas:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
owned:
|
||||
$ref: '#/definitions/models.Tenant'
|
||||
password:
|
||||
type: string
|
||||
roles:
|
||||
items:
|
||||
$ref: '#/definitions/consts.Role'
|
||||
type: array
|
||||
status:
|
||||
$ref: '#/definitions/consts.UserStatus'
|
||||
status_description:
|
||||
type: string
|
||||
tenants:
|
||||
items:
|
||||
$ref: '#/definitions/models.Tenant'
|
||||
type: array
|
||||
updated_at:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
verified_at:
|
||||
type: string
|
||||
type: object
|
||||
gorm.DeletedAt:
|
||||
properties:
|
||||
time:
|
||||
@@ -168,8 +214,6 @@ definitions:
|
||||
total:
|
||||
type: integer
|
||||
type: object
|
||||
v1.ResponseItem:
|
||||
type: object
|
||||
externalDocs:
|
||||
description: OpenAPI
|
||||
url: https://swagger.io/resources/open-api/
|
||||
@@ -265,24 +309,39 @@ paths:
|
||||
summary: 更新过期时间
|
||||
tags:
|
||||
- Super
|
||||
/v1/medias/{id}:
|
||||
post:
|
||||
/super/v1/tenants/{tenantID}/status:
|
||||
patch:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Test
|
||||
parameters:
|
||||
- description: ID
|
||||
- description: TenantID
|
||||
format: int64
|
||||
in: path
|
||||
name: id
|
||||
name: tenantID
|
||||
required: true
|
||||
type: integer
|
||||
- description: 年龄
|
||||
in: query
|
||||
name: age
|
||||
type: integer
|
||||
- description: 名称
|
||||
in: query
|
||||
name: name
|
||||
- description: Form
|
||||
in: body
|
||||
name: form
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.TenantStatusUpdateForm'
|
||||
produces:
|
||||
- application/json
|
||||
responses: {}
|
||||
summary: 更新租户状态
|
||||
tags:
|
||||
- Super
|
||||
/super/v1/users:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- in: query
|
||||
name: asc
|
||||
type: string
|
||||
- in: query
|
||||
name: desc
|
||||
type: string
|
||||
- in: query
|
||||
name: limit
|
||||
@@ -290,21 +349,27 @@ paths:
|
||||
- in: query
|
||||
name: page
|
||||
type: integer
|
||||
- in: query
|
||||
name: tenantID
|
||||
type: integer
|
||||
- in: query
|
||||
name: username
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 成功
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/requests.Pager'
|
||||
- properties:
|
||||
list:
|
||||
$ref: '#/definitions/v1.ResponseItem'
|
||||
items:
|
||||
$ref: '#/definitions/dto.UserItem'
|
||||
type: object
|
||||
summary: Test
|
||||
summary: 租户列表
|
||||
tags:
|
||||
- Test
|
||||
- Super
|
||||
securityDefinitions:
|
||||
BasicAuth:
|
||||
type: basic
|
||||
|
||||
Reference in New Issue
Block a user