diff --git a/restapi/interfaces/OrderInterface.ts b/restapi/interfaces/OrderInterface.ts index 8b95162..2095099 100644 --- a/restapi/interfaces/OrderInterface.ts +++ b/restapi/interfaces/OrderInterface.ts @@ -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 } \ No newline at end of file diff --git a/restapi/schemas/OrderSchema.ts b/restapi/schemas/OrderSchema.ts index 6a43880..9a916e3 100644 --- a/restapi/schemas/OrderSchema.ts +++ b/restapi/schemas/OrderSchema.ts @@ -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 + } );