Skip to content

Commit

Permalink
fix: updated type safety in order model for address
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthak-troopr committed Apr 2, 2024
1 parent 97f6149 commit 0821be7
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/models/apps/ecommerce/order.models.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,29 @@ const orderSchema = new Schema(
default: [],
},
address: {
type: Object,
addressLine1: {
required: true,
type: String,
},
addressLine2: {
type: String,
},
city: {
required: true,
type: String,
},
country: {
required: true,
type: String,
},
pincode: {
required: true,
type: String,
},
state: {
required: true,
type: String,
},
},
status: {
type: String,
Expand Down

0 comments on commit 0821be7

Please sign in to comment.