---
title: 2023-04-19 修改需求
tags: pitl
description:
---
# AI藥師修改
此文件為2023/04/19由Bruce所提出的後端API修改需求整理
大致上需要改動API提供新的欄位,以及修改資料庫新增對應欄位
## TODO
- [ ] GET /api/ShelfPosition
- [ ] POST /api/ShelfPosition
- [ ] PUT /api/ShelfPosition
- [ ] 資料庫欄位新增
## 需求內容
### GET /api/ShelfPosition
- 目前response格式
```json
[
{
"id": 5,
"companyId": "53536349",
"shopId": "T050",
"shelfId": 5,
"shelfName": "止痛",
"mapX": 302,
"mapY": 745,
"createdUser": "Admin@pitl.com",
"createdAt": "2022-12-14T16:29:53",
"updatedUser": "Admin@pitl.com",
"updatedAt": "2022-12-20T09:55:45",
"deletedUser": null,
"deletedAt": null
},
{
"id": 6,
"companyId": "53536349",
"shopId": "T050",
"shelfId": 6,
"shelfName": "胃腸",
"mapX": 341,
"mapY": 747,
"createdUser": "Admin@pitl.com",
"createdAt": "2022-12-14T16:29:57",
"updatedUser": "Admin@pitl.com",
"updatedAt": "2022-12-20T09:55:51",
"deletedUser": null,
"deletedAt": null
}
]
```
- 目標新增五個欄位,分別為
- normalizedX: float
- normalizedY: float
- fontColor: string
- backgroundColor: string
- enable: boolean
### POST /api/ShelfPosition
- 目前的request格式
```json
{
"companyId": "string",
"shopId": "string",
"shelfId": 0,
"shelfName": "string",
"mapX": 0,
"mapY": 0
}
```
- 目標新增五個欄位,格式同上
### PUT /api/ShelfPosition
- 需求同POST
### 資料庫欄位新增
- 我這邊會先幫妳新增好