代理后端出版
This commit is contained in:
32
docs/schemas/agent.js
Normal file
32
docs/schemas/agent.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @swagger
|
||||
* components:
|
||||
* schemas:
|
||||
* Agent:
|
||||
* type: object
|
||||
* required:
|
||||
* - id
|
||||
* - phone
|
||||
* - name
|
||||
* properties:
|
||||
* id:
|
||||
* type: integer
|
||||
* description: 代理ID
|
||||
* phone:
|
||||
* type: string
|
||||
* description: 代理手机号
|
||||
* name:
|
||||
* type: string
|
||||
* description: 代理名称
|
||||
* status:
|
||||
* type: integer
|
||||
* description: 代理状态 (1-正常, 0-禁用)
|
||||
* created_at:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 创建时间
|
||||
* updated_at:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 更新时间
|
||||
*/
|
||||
59
docs/schemas/commission.js
Normal file
59
docs/schemas/commission.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* @swagger
|
||||
* components:
|
||||
* schemas:
|
||||
* Commission:
|
||||
* type: object
|
||||
* required:
|
||||
* - id
|
||||
* - agent_id
|
||||
* - user_id
|
||||
* - amount
|
||||
* - commission_type
|
||||
* - status
|
||||
* properties:
|
||||
* id:
|
||||
* type: integer
|
||||
* description: 佣金记录ID
|
||||
* agent_id:
|
||||
* type: integer
|
||||
* description: 代理ID
|
||||
* user_id:
|
||||
* type: integer
|
||||
* description: 用户ID
|
||||
* amount:
|
||||
* type: number
|
||||
* format: decimal
|
||||
* description: 佣金金额
|
||||
* commission_type:
|
||||
* type: string
|
||||
* description: 佣金类型
|
||||
* status:
|
||||
* type: string
|
||||
* enum: [pending, paid, cancelled]
|
||||
* description: 佣金状态
|
||||
* description:
|
||||
* type: string
|
||||
* description: 佣金描述
|
||||
* order_id:
|
||||
* type: string
|
||||
* description: 关联订单ID
|
||||
* payment_method:
|
||||
* type: string
|
||||
* description: 支付方式
|
||||
* payment_time:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 支付时间
|
||||
* created_at:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 创建时间
|
||||
* updated_at:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 更新时间
|
||||
* user:
|
||||
* $ref: '#/components/schemas/User'
|
||||
* description: 关联用户信息
|
||||
*/
|
||||
10
docs/schemas/security.js
Normal file
10
docs/schemas/security.js
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @swagger
|
||||
* components:
|
||||
* securitySchemes:
|
||||
* bearerAuth:
|
||||
* type: http
|
||||
* scheme: bearer
|
||||
* bearerFormat: JWT
|
||||
* description: "JWT认证,请在请求头中添加 Authorization: Bearer <token>"
|
||||
*/
|
||||
77
docs/schemas/transfer.js
Normal file
77
docs/schemas/transfer.js
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* @swagger
|
||||
* components:
|
||||
* schemas:
|
||||
* Transfer:
|
||||
* type: object
|
||||
* required:
|
||||
* - id
|
||||
* - user_id
|
||||
* - amount
|
||||
* - type
|
||||
* - status
|
||||
* properties:
|
||||
* id:
|
||||
* type: integer
|
||||
* description: 转账记录ID
|
||||
* user_id:
|
||||
* type: integer
|
||||
* description: 用户ID
|
||||
* amount:
|
||||
* type: number
|
||||
* format: decimal
|
||||
* description: 转账金额
|
||||
* type:
|
||||
* type: string
|
||||
* enum: [deposit, withdraw, transfer]
|
||||
* description: 转账类型
|
||||
* status:
|
||||
* type: string
|
||||
* enum: [pending, success, failed, cancelled]
|
||||
* description: 转账状态
|
||||
* transaction_id:
|
||||
* type: string
|
||||
* description: 交易单号
|
||||
* payment_method:
|
||||
* type: string
|
||||
* description: 支付方式
|
||||
* bank_info:
|
||||
* type: object
|
||||
* properties:
|
||||
* bank_name:
|
||||
* type: string
|
||||
* description: 银行名称
|
||||
* account_number:
|
||||
* type: string
|
||||
* description: 账户号码
|
||||
* account_name:
|
||||
* type: string
|
||||
* description: 账户名称
|
||||
* description: 银行信息
|
||||
* description:
|
||||
* type: string
|
||||
* description: 转账描述
|
||||
* fee:
|
||||
* type: number
|
||||
* format: decimal
|
||||
* description: 手续费
|
||||
* actual_amount:
|
||||
* type: number
|
||||
* format: decimal
|
||||
* description: 实际到账金额
|
||||
* processed_at:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 处理时间
|
||||
* created_at:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 创建时间
|
||||
* updated_at:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 更新时间
|
||||
* user:
|
||||
* $ref: '#/components/schemas/User'
|
||||
* description: 关联用户信息
|
||||
*/
|
||||
51
docs/schemas/user.js
Normal file
51
docs/schemas/user.js
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @swagger
|
||||
* components:
|
||||
* schemas:
|
||||
* User:
|
||||
* type: object
|
||||
* required:
|
||||
* - id
|
||||
* - phone
|
||||
* - username
|
||||
* properties:
|
||||
* id:
|
||||
* type: integer
|
||||
* description: 用户ID
|
||||
* phone:
|
||||
* type: string
|
||||
* description: 用户手机号
|
||||
* username:
|
||||
* type: string
|
||||
* description: 用户名
|
||||
* email:
|
||||
* type: string
|
||||
* format: email
|
||||
* description: 用户邮箱
|
||||
* avatar:
|
||||
* type: string
|
||||
* description: 用户头像URL
|
||||
* role:
|
||||
* type: string
|
||||
* description: 用户角色
|
||||
* status:
|
||||
* type: integer
|
||||
* description: 用户状态 (1-正常, 0-禁用)
|
||||
* city:
|
||||
* type: string
|
||||
* description: 所在城市
|
||||
* area:
|
||||
* type: string
|
||||
* description: 所在区域
|
||||
* agent_id:
|
||||
* type: integer
|
||||
* description: 所属代理ID
|
||||
* created_at:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 创建时间
|
||||
* updated_at:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 更新时间
|
||||
*/
|
||||
Reference in New Issue
Block a user