Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kyosu-1/sushi-order-system
https://github.com/kyosu-1/sushi-order-system
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kyosu-1/sushi-order-system
- Owner: kyosu-1
- Created: 2023-09-14T01:44:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-21T06:30:21.000Z (over 1 year ago)
- Last Synced: 2024-04-28T04:54:35.771Z (9 months ago)
- Language: Kotlin
- Size: 111 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 寿司オーダーシステム
ゆめみサーバーサイドインターンシップ2023の課題
## Requirements
- Go 1.18以上(for sql-migrate)
- Docker## SetUp
1: envファイルを作成する
```bash
cp .env.example .env
```2: DBを起動する
```bash
make up
```3: DBにテーブルを作成する
```bash
make migrate-up
```4: アプリケーションサーバーを起動する
5: OpenAPIを確認する
http://localhost:8080/swagger-ui/index.html
## テーブルの追加・変更
1: Migration Fileを作成する
```bash
make create-migration name={migration_name}
```2: 生成されたMigration Fileを編集する
3: Run Migration
```bash
make migrate-up
```## ER図
```mermaid
erDiagramtables {
string id
string name
}customers {
string id
string table_id
datetime checked_in_at
datetime checked_out_at
}categories {
string id
string name
}items {
string id
string name
string category_id
int price
bool available
}available_options {
string item_id
string item_option_id
}item_options {
string id
string name
}order_items {
string id
string customer_id
string item_id
int price
datetime ordered_at
datetime delivered_at
datetime cancelled_at
}order_item_options {
string order_item_id
string item_option_id
}tables ||--o{ customers: ""
categories ||--o{ items: ""
customers ||--o{ order_items: ""
items ||--o{ available_options: ""
item_options ||--o{ available_options: ""
order_items ||--o{ order_item_options: ""
items ||--o{ order_items: ""
item_options ||--o{ order_item_options: ""
```