Cleanup after initial plan
This commit is contained in:
parent
d2a7e652b3
commit
245520fb50
53 changed files with 6733 additions and 621 deletions
|
|
@ -20,6 +20,14 @@ const shoppingItemSchema = new mongoose.Schema(
|
|||
{ _id: false }
|
||||
);
|
||||
|
||||
const shoppingListSourceSchema = new mongoose.Schema(
|
||||
{
|
||||
type: { type: String, required: true }, // values from ShoppingListSourceType
|
||||
referenceId: { type: String },
|
||||
},
|
||||
{ _id: false }
|
||||
);
|
||||
|
||||
const shoppingListSchema = new mongoose.Schema(
|
||||
{
|
||||
householdId: { type: String, required: true },
|
||||
|
|
@ -27,12 +35,8 @@ const shoppingListSchema = new mongoose.Schema(
|
|||
items: { type: [shoppingItemSchema], required: true, default: [] },
|
||||
status: { type: String, required: true }, // values from ShoppingListStatus
|
||||
createdFrom: {
|
||||
type: {
|
||||
type: { type: String, required: true }, // values from ShoppingListSourceType
|
||||
referenceId: { type: String },
|
||||
},
|
||||
type: shoppingListSourceSchema,
|
||||
required: false,
|
||||
_id: false,
|
||||
},
|
||||
mealPlanId: { type: String },
|
||||
totalEstimatedCost: { type: Number },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue