后端:公告√
注意数据库新建notice表
This commit is contained in:
67
doc/openapi.yaml
Normal file
67
doc/openapi.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: PartsInquiry API
|
||||
version: 0.1.0
|
||||
description: >-
|
||||
所有接口定义集中于此文件。每个 path 在 summary/description 中标注实现状态。
|
||||
servers:
|
||||
- url: /
|
||||
paths:
|
||||
/api/notices:
|
||||
get:
|
||||
summary: 公告列表(✅ Fully Implemented)
|
||||
description: 返回当前店铺可见的公告列表。后端与前端均已接入。
|
||||
parameters:
|
||||
- in: header
|
||||
name: X-Shop-Id
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
description: 店铺ID,缺省为 1
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Notice'
|
||||
components:
|
||||
schemas:
|
||||
Notice:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
shopId:
|
||||
type: integer
|
||||
format: int64
|
||||
userId:
|
||||
type: integer
|
||||
format: int64
|
||||
title:
|
||||
type: string
|
||||
content:
|
||||
type: string
|
||||
tag:
|
||||
type: string
|
||||
pinned:
|
||||
type: boolean
|
||||
startsAt:
|
||||
type: string
|
||||
format: date-time
|
||||
endsAt:
|
||||
type: string
|
||||
format: date-time
|
||||
status:
|
||||
type: string
|
||||
enum: [DRAFT, PUBLISHED, OFFLINE]
|
||||
createdAt:
|
||||
type: string
|
||||
format: date-time
|
||||
updatedAt:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
Reference in New Issue
Block a user