-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add route and build dto object * create enity for side dish, get data from side dish table --------- Co-authored-by: NHT <[email protected]>
- Loading branch information
1 parent
2b5d46d
commit 3bf3e60
Showing
8 changed files
with
209 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Entity, CreateDateColumn, PrimaryColumn } from 'typeorm'; | ||
|
||
@Entity('Main_Side_Dish') | ||
export class MainSideDish { | ||
@PrimaryColumn() | ||
public main_dish_id: number; | ||
|
||
@PrimaryColumn() | ||
public side_dish_id: number; | ||
|
||
@CreateDateColumn({ | ||
type: 'datetime', | ||
nullable: false, | ||
unique: false, | ||
default: () => 'CURRENT_TIMESTAMP', | ||
}) | ||
public created_at: Date; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export enum Shift { | ||
MorningFrom = '06:00:00', | ||
MorningTo = '13:59:59', | ||
AfternoonFrom = '14:00:00', | ||
AfternoonTo = '21:59:59', | ||
NightFrom = '22:00:00', | ||
NightTo = '05:59:59', | ||
} | ||
|
||
export enum Day { | ||
Sunday = 'Sun', | ||
Monday = 'Mon', | ||
Tuesday = 'Tue', | ||
Wednesday = 'Wed', | ||
Thursday = 'Thu', | ||
Friday = 'Fri', | ||
Saturday = 'Sat', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export class GetSideDishRequest { | ||
menu_item_id: number; | ||
timestamp: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { GeneralResponse } from 'src/dto/general-response.dto'; | ||
import { TextByLang } from 'src/type'; | ||
|
||
export class GetSideDishResonse extends GeneralResponse { | ||
data: FoodDTO[]; | ||
} | ||
|
||
interface FoodDTO { | ||
id: number; | ||
image: string; | ||
top_label: string; | ||
bottom_label: string; | ||
name: TextByLang[]; | ||
restaurant_name: TextByLang[]; | ||
restaurant_id: number; | ||
calorie_kcal: number; | ||
rating: number; | ||
distance_km: number; | ||
delivery_time_s: number; | ||
main_cooking_method: TextByLang[]; | ||
ingredient_brief_vie: string; | ||
ingredient_brief_eng: string; | ||
price: number; | ||
price_after_discount: number; | ||
promotion: string; | ||
cutoff_time: string; | ||
preparing_time_s: number; | ||
cooking_time_s: number; | ||
quantity_available: number; | ||
is_vegetarian: boolean; | ||
cooking_schedule: string; | ||
units_sold: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters