diff options
Diffstat (limited to 'src/models')
-rw-r--r-- | src/models/waybill/waybill.schema.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/models/waybill/waybill.schema.ts b/src/models/waybill/waybill.schema.ts index bbebcd4..55d2127 100644 --- a/src/models/waybill/waybill.schema.ts +++ b/src/models/waybill/waybill.schema.ts @@ -1,6 +1,7 @@ import { Document, Schema, Types } from 'mongoose'; export interface WaybillSchema extends Document { + date: string; operation: 'in' | 'out'; records: [{ productId: string; @@ -28,6 +29,10 @@ const recordSchema = new Schema({ }); export const waybillSchema = new Schema({ + date: { + type: Date, + required: true, + }, operation: { type: String, required: true, |