-
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.
* update function name * rename dto * create new controller, service and dto * validate input data * complete the basic update logic --------- Co-authored-by: NHT <[email protected]>
- Loading branch information
1 parent
742999f
commit 7c069db
Showing
7 changed files
with
152 additions
and
10 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
2 changes: 1 addition & 1 deletion
2
...ature/cart/dto/update-cart-request.dto.ts → ...t/dto/update-cart-advanced-request.dto.ts
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,25 @@ | ||
import { GeneralResponse } from 'src/dto/general-response.dto'; | ||
|
||
export class UpdateCartAdvancedResponse 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export class UpdateCartBasicRequest { | ||
customer_id: number; | ||
updated_items: QuantityUpdatedItem[]; | ||
} | ||
interface QuantityUpdatedItem { | ||
item_id: number; | ||
qty_ordered: number; | ||
} |
2 changes: 1 addition & 1 deletion
2
...ture/cart/dto/update-cart-response.dto.ts → ...art/dto/update-cart-basic-response.dto.ts
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