Skip to content

Commit 22478da

Browse files
refactoring
1 parent 68b91a4 commit 22478da

27 files changed

+1011
-33
lines changed

.env.development

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
DSN = mongodb://192.168.64.7:27017/thelibrarian
1+
DSN = mongodb://192.168.64.7:27017/thelibrarian
2+
3+
JWT_SECRET = secretM0dpaldfEdfEECDKEMDFO234
4+
JWT_EXPIRATION_TIME = 1d

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $ yarn run start:dev NODE_ENV=development
4343

4444
```
4545

46-
## GUI API
46+
## API Member Section
4747

4848
```bash
4949
#Add Member
@@ -63,7 +63,8 @@ POST => /api/member/login
6363
}
6464

6565
#Show All Member filtering by pagination and keywords
66-
GET => /api/member?keyword=<Full Name, Username>&page=1&pageSize=10
66+
GET => /api/member?keyword=<name||username||memberNo>&page=1&pageSize=10
67+
#possible to searh all of Fullname, Username and Member Number
6768

6869
#Get Profile by ID
6970
GET => /api/member/<id>
@@ -100,6 +101,27 @@ PATCH => /api/member/<id>/profile-image
100101

101102
```
102103

104+
## API Books Section
105+
106+
```bash
107+
#Get All books by conditions
108+
GET =>/api/books/keyword=<title|isbn|author>?page=1&pageSize=10&orderby=stock&sorting=desc
109+
110+
#Add New Book
111+
POST =>/api/books/add
112+
{
113+
"title": "Harry Potter",
114+
"author": "JK Rowling",
115+
"isbn": "ISB123123123",
116+
"qrCode": "asdfasdfasdfasdf",
117+
"barcode": "123123123123",
118+
"price": 590.00,
119+
"stock": 10,
120+
"category": "novel"
121+
}
122+
123+
```
124+
103125
## Requirement
104126

105127
- NestJS Microservice ✅
@@ -127,8 +149,8 @@ PATCH => /api/member/<id>/profile-image
127149

128150
#1.3 ออกแบบ Features ของ Book Service ดังนี้
129151

130-
- เพิ่ม / ลบ / แก้ไขข้อมูล Book
131-
- แสดงหนังสือ ( filter ตามหมวดหมู่ , เรียงลำดับหนังสือที่เหลือมาก - น้อย , ราคาต่ำ - สูง )
152+
- เพิ่ม / ลบ / แก้ไขข้อมูล Book
153+
- แสดงหนังสือ ( filter ตามหมวดหมู่ , เรียงลำดับหนังสือที่เหลือมาก - น้อย , ราคาต่ำ - สูง )
132154
- ระบบบันทึกการซื้อหนังสือของ user
133155
- ระบบรายงานหนังสือที่ถูกขายในแต่ละหมวดหมู่ ,จัดอันดับหนังสือที่ถูกขายเยอะที่สุด , หนังสือที่ใกล้จะหมด
134156
- ระบบจัดอันดับผู้ที่ซื้อหนังสือ จำนวนกี่เล่ม แบ่งเป็นหมวดหมู่ละกี่เล่ม ราคาเท่าไหร่

0 commit comments

Comments
 (0)