-
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.
* create controller and service handling method * check if updated items are empty * verify sku_id --------- Co-authored-by: NHT <[email protected]>
- Loading branch information
1 parent
238807f
commit e50c38d
Showing
6 changed files
with
178 additions
and
2 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export class UpdateCartRequest { | ||
customer_id: number; | ||
updated_items: UpdatedCartItem[]; | ||
lang?: string; | ||
} | ||
|
||
interface UpdatedCartItem { | ||
item_id: number; | ||
sku_id: number; | ||
qty_ordered: number; | ||
advanced_taste_customization_obj: OptionSelection[]; | ||
basic_taste_customization_obj: BasicTasteSelection[]; | ||
notes: string; | ||
} | ||
|
||
interface OptionSelection { | ||
option_id: string; | ||
value_id: string; | ||
} | ||
|
||
interface BasicTasteSelection { | ||
no_adding_id: string; | ||
} |
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,25 @@ | ||
import { GeneralResponse } from 'src/dto/general-response.dto'; | ||
|
||
export class UpdateCartResponse extends GeneralResponse { | ||
data: CartDetail; | ||
} | ||
|
||
interface CartDetail { | ||
customer_id: number; | ||
cart_info: CartItem[]; | ||
} | ||
|
||
interface CartItem { | ||
item_id: number; | ||
sku_id: number; | ||
customer_id: number; | ||
qty_ordered: number; | ||
advanced_taste_customization: string; | ||
basic_taste_customization: string; | ||
portion_customization: string; | ||
advanced_taste_customization_obj: string; | ||
basic_taste_customization_obj: string; | ||
notes: string; | ||
restaurant_id: number; | ||
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
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