增加微信支付,商城逻辑,公告
This commit is contained in:
225
docs/schemas/announcement.js
Normal file
225
docs/schemas/announcement.js
Normal file
@@ -0,0 +1,225 @@
|
||||
/**
|
||||
* @swagger
|
||||
* components:
|
||||
* schemas:
|
||||
* Announcement:
|
||||
* type: object
|
||||
* required:
|
||||
* - title
|
||||
* - content
|
||||
* - type
|
||||
* - priority
|
||||
* properties:
|
||||
* id:
|
||||
* type: integer
|
||||
* description: 公告ID
|
||||
* example: 1
|
||||
* title:
|
||||
* type: string
|
||||
* description: 公告标题
|
||||
* example: "系统维护通知"
|
||||
* content:
|
||||
* type: string
|
||||
* description: 公告内容
|
||||
* example: "系统将于今晚进行维护,预计维护时间2小时,期间可能影响部分功能使用。"
|
||||
* type:
|
||||
* type: string
|
||||
* description: 公告类型
|
||||
* enum: [system, activity, maintenance, urgent]
|
||||
* example: "maintenance"
|
||||
* priority:
|
||||
* type: string
|
||||
* description: 优先级
|
||||
* enum: [high, medium, low]
|
||||
* example: "high"
|
||||
* status:
|
||||
* type: string
|
||||
* description: 公告状态
|
||||
* enum: [draft, published, expired]
|
||||
* example: "published"
|
||||
* isTop:
|
||||
* type: boolean
|
||||
* description: 是否置顶
|
||||
* example: false
|
||||
* publishTime:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 发布时间
|
||||
* example: "2024-01-15T10:00:00Z"
|
||||
* expireTime:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 过期时间
|
||||
* example: "2024-01-20T10:00:00Z"
|
||||
* createdBy:
|
||||
* type: integer
|
||||
* description: 创建者用户ID
|
||||
* example: 1
|
||||
* createdAt:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 创建时间
|
||||
* example: "2024-01-15T09:00:00Z"
|
||||
* updatedAt:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 更新时间
|
||||
* example: "2024-01-15T09:30:00Z"
|
||||
* creator:
|
||||
* type: object
|
||||
* description: 创建者信息
|
||||
* properties:
|
||||
* id:
|
||||
* type: integer
|
||||
* example: 1
|
||||
* username:
|
||||
* type: string
|
||||
* example: "admin"
|
||||
* email:
|
||||
* type: string
|
||||
* example: "admin@example.com"
|
||||
*
|
||||
* AnnouncementCreate:
|
||||
* type: object
|
||||
* required:
|
||||
* - title
|
||||
* - content
|
||||
* - type
|
||||
* - priority
|
||||
* properties:
|
||||
* title:
|
||||
* type: string
|
||||
* description: 公告标题
|
||||
* example: "系统维护通知"
|
||||
* content:
|
||||
* type: string
|
||||
* description: 公告内容
|
||||
* example: "系统将于今晚进行维护,预计维护时间2小时。"
|
||||
* type:
|
||||
* type: string
|
||||
* description: 公告类型
|
||||
* enum: [system, activity, maintenance, urgent]
|
||||
* example: "maintenance"
|
||||
* priority:
|
||||
* type: string
|
||||
* description: 优先级
|
||||
* enum: [high, medium, low]
|
||||
* example: "high"
|
||||
* status:
|
||||
* type: string
|
||||
* description: 公告状态
|
||||
* enum: [draft, published]
|
||||
* default: draft
|
||||
* example: "draft"
|
||||
* isTop:
|
||||
* type: boolean
|
||||
* description: 是否置顶
|
||||
* default: false
|
||||
* example: false
|
||||
* publishTime:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 发布时间
|
||||
* example: "2024-01-15T10:00:00Z"
|
||||
* expireTime:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 过期时间
|
||||
* example: "2024-01-20T10:00:00Z"
|
||||
*
|
||||
* AnnouncementUpdate:
|
||||
* type: object
|
||||
* properties:
|
||||
* title:
|
||||
* type: string
|
||||
* description: 公告标题
|
||||
* example: "系统维护通知(更新)"
|
||||
* content:
|
||||
* type: string
|
||||
* description: 公告内容
|
||||
* example: "系统维护时间调整为明晚进行。"
|
||||
* type:
|
||||
* type: string
|
||||
* description: 公告类型
|
||||
* enum: [system, activity, maintenance, urgent]
|
||||
* example: "maintenance"
|
||||
* priority:
|
||||
* type: string
|
||||
* description: 优先级
|
||||
* enum: [high, medium, low]
|
||||
* example: "medium"
|
||||
* status:
|
||||
* type: string
|
||||
* description: 公告状态
|
||||
* enum: [draft, published, expired]
|
||||
* example: "published"
|
||||
* isTop:
|
||||
* type: boolean
|
||||
* description: 是否置顶
|
||||
* example: true
|
||||
* publishTime:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 发布时间
|
||||
* example: "2024-01-16T10:00:00Z"
|
||||
* expireTime:
|
||||
* type: string
|
||||
* format: date-time
|
||||
* description: 过期时间
|
||||
* example: "2024-01-21T10:00:00Z"
|
||||
*
|
||||
* AnnouncementList:
|
||||
* type: object
|
||||
* properties:
|
||||
* success:
|
||||
* type: boolean
|
||||
* example: true
|
||||
* data:
|
||||
* type: object
|
||||
* properties:
|
||||
* announcements:
|
||||
* type: array
|
||||
* items:
|
||||
* $ref: '#/components/schemas/Announcement'
|
||||
* total:
|
||||
* type: integer
|
||||
* description: 总记录数
|
||||
* example: 50
|
||||
* page:
|
||||
* type: integer
|
||||
* description: 当前页码
|
||||
* example: 1
|
||||
* limit:
|
||||
* type: integer
|
||||
* description: 每页数量
|
||||
* example: 10
|
||||
* totalPages:
|
||||
* type: integer
|
||||
* description: 总页数
|
||||
* example: 5
|
||||
*
|
||||
* AnnouncementResponse:
|
||||
* type: object
|
||||
* properties:
|
||||
* success:
|
||||
* type: boolean
|
||||
* example: true
|
||||
* message:
|
||||
* type: string
|
||||
* example: "操作成功"
|
||||
* data:
|
||||
* $ref: '#/components/schemas/Announcement'
|
||||
*
|
||||
* AnnouncementError:
|
||||
* type: object
|
||||
* properties:
|
||||
* success:
|
||||
* type: boolean
|
||||
* example: false
|
||||
* message:
|
||||
* type: string
|
||||
* example: "操作失败"
|
||||
* error:
|
||||
* type: string
|
||||
* example: "公告不存在"
|
||||
*/
|
||||
Reference in New Issue
Block a user