Skip to content

Commit

Permalink
feat(type/com): order schema
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm authored and AliMD committed Mar 7, 2023
1 parent b632a7a commit d1aacdb
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions core/type/src/customer-order-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,29 @@ export interface OrderShippingInfo extends StringifyableRecord {

// -- Schema --

export const orderShippingInfoSchema = {
recipientName: String,
recipientNationalCode: String,
address: String,
carType: String,
ladingType: String,
timePeriod: String,
export const orderInfoSchema = {
id: String,
status: String,
itemList: [{
productId: String,
price: Number,
finalPrice: Number,
qty: Number,
}],
shippingInfo: {
recipientName: String,
recipientNationalCode: String,
address: String,
carType: String,
ladingType: String,
timePeriod: String,
},
discount: Number,
discountType: String,
totalPrice: Number,
ladingPrice: Number,
finalTotalPrice: Number,
};

export const orderShippingInfoSchema = orderInfoSchema.shippingInfo;

0 comments on commit d1aacdb

Please sign in to comment.