-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* get orders * unit test for order service * remove failing test * update create order service * user order status as a model not string * on create order, create order notes --------- Co-authored-by: Olasunkanmi Oyinlola <olasunkanmioyinlola@Olasunkanmis-MacBook-Air.local>
- Loading branch information
1 parent
889f38c
commit 5677469
Showing
7 changed files
with
61 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
import { Result } from 'src/domain'; | ||
import { CreateOrderDTO } from '../dto/create-order.dto'; | ||
import { Audit, Result } from 'src/domain'; | ||
import { CreateCartItemsDTO, CreateOrderDTO } from '../dto/create-order.dto'; | ||
import { IOrderResponseDTO } from '../order-response.dto'; | ||
import { Order } from '../order'; | ||
import { Types } from 'mongoose'; | ||
import { IOrderNoteResponseDTO } from 'src/order_notes/dto/order-note-response'; | ||
|
||
export interface IOrderService { | ||
createOrder(orderSummary: CreateOrderDTO): Promise<Result<IOrderResponseDTO>>; | ||
getOrders(): Promise<Result<Order[]>>; | ||
createOrderNotes( | ||
cartItems: CreateCartItemsDTO[], | ||
orderId: Types.ObjectId, | ||
audit: Audit, | ||
): Promise<IOrderNoteResponseDTO[]>; | ||
} |
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
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