Git Product home page Git Product logo

reserve.utsa's People

Contributors

barney9211 avatar chun-cheng avatar dependabot[bot] avatar jeff92316046 avatar terchang avatar yiyu0501 avatar

Stargazers

 avatar

reserve.utsa's Issues

Auto generate API docs

Is your feature request related to a problem? Please describe.
有點懶得維護文件😆

Describe the solution you'd like
使用 OpenAPI 及 Swagger 自動生成 API 文件(希望達到像是 FastAPI 一樣的效果)

Describe alternatives you've considered
不能自動生成的話也還可以接受

Additional context
參考資源:https://www.npmjs.com/package/swagger-ui-express

統一程式風格

  • 從 CommonJS 改用 ES6 語法
  • 使用 ESLint 統一程式撰寫風格

寄送 Email: 新增預約紀錄

於新增預約紀錄至資料庫後, 寄送 Email 至預約者的電子信箱

檔案:

  • /server/routes/reserve/POST_reservation.js

功能:

  • 新增預約紀錄至資料庫並取得資料 ID
  • 將資料 ID 放入信件內容(連結)當中
  • 寄出 Email
  • 回傳結果

查詢預約紀錄

檔案: /server/routes/reserve/GET_reservation.js

資料庫:

  • reservations
  • items_reserved_time
  • spaces_reserved_time

寄送 Email: 編輯預約紀錄

於新版預約紀錄更新至資料庫後, 寄送 Email 至預約者的電子信箱

檔案:

  • /server/routes/reserve/PUT_reservation.js

功能:

  • 將資料 ID 及更新的資料放入信件內容(連結)當中
  • 寄出 Email
  • 回傳結果

新增預約紀錄

檔案:

  • /server/routes/reserve/POST_reservation.js

功能:

  • Receive data from the request body
  • Check data format
  • Insert data into the database and get a data ID

接收 / 輸入資料說明: 請見 localhost:3000/docs

相關的資料庫集合(collections):

  • reservations: 預約紀錄資料
    (1 份文件 = 1 筆預約紀錄)
  • space_reserved_time: 場地預約時段資料
    (1 份文件 = 1 個特定場地被預約 1 小時)
  • item_reserved_time: 物品預約數量時段資料
    (1 份文件 = 特定數量的 1 種物品被預約 1 天)

註:

  • MongoDB 的 1 份文件就是 1 筆資料,很多份同類型的文件組成一個 collection
    (collection 類似於表格, document 類似於表格中的一列)

刪除預約紀錄

檔案:

  • /server/routes/reserve/DELETE_reservation.js

資料庫 collection:

  • reservations
  • items_reserved_time
  • spaces_reserved_time

物品列表查詢

功能: 回傳物品 ID、種類、數量列表

檔案:

  • /server/routes/reserve/GET_items.js

資料庫 collection:

  • items

編輯預約紀錄

檔案:

  • /server/routes/reserve/PUT_reservation.js

資料庫 collection:

  • reservations
  • items_reserved_time
  • spaces_reserved_time

Make a reserve-availability timetable

Make a page shows spaces/items availability in specific time slots.

Example:

Date 08:00~12:00 13:00~17:00 18:00~22:00
yyyy/mm/dd day Available Available
......

Additional task:

  • search specific dates or time slots: a date or an interval.

Item reservation check

Add a check mechanism to ensure the item reservation's quantity is not over when the item reservation is on the same date and the total is more than the quantity that can be reserved.

Front-end can reject the user's answer when ze fills in the same date and the same item.

場地列表查詢

功能: 回傳場地 ID、場地列表

檔案:

  • /server/routes/reserve/GET_spaces.js

資料庫 collection:

  • spaces

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.