diff options
author | eug-vs <eug-vs@keemail.me> | 2021-03-18 22:10:29 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2021-03-18 22:10:29 +0300 |
commit | 3109e25f2cabb85bbccf4ba509e112e49f5c0120 (patch) | |
tree | 32dc6d10575debbd970a9936e196638f3a1354f1 /src/models | |
parent | 93e5f7eda2f9bf0d274d793f7e823e35502f4763 (diff) | |
download | commercel-api-3109e25f2cabb85bbccf4ba509e112e49f5c0120.tar.gz |
feat: add date to Waybill
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, |