Skip to content

Commit

Permalink
fixed order
Browse files Browse the repository at this point in the history
  • Loading branch information
ludvij committed Apr 2, 2022
1 parent 04fbe29 commit 528130d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion restapi/interfaces/OrderInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import IProduct from "./ProductInterface";
export default interface IOrder extends Document {
webId: string
addres: string
shipping: number
shippingPrice: number
totalPrice: number
products: Map<IProduct, Number>
}
13 changes: 7 additions & 6 deletions restapi/schemas/OrderSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ const Map = Schema.Types.Map;
const orderSchema = new Schema (
{
webId: {type: String, required: true},
address: String,
shipping: Number,
totalPrice: Number,
products: {type: Map, of: Number}

}
address: {type: String, required: true},
shippingPrice: {type: Number, required: true},
totalPrice: {type: Number, required: true},
products: {type: Map, of: Number, required: true}
}, {
timestamps: true
}
);


Expand Down

0 comments on commit 528130d

Please sign in to comment.