summaryrefslogtreecommitdiff
path: root/src/models
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-18 22:10:29 +0300
committereug-vs <eug-vs@keemail.me>2021-03-18 22:10:29 +0300
commit3109e25f2cabb85bbccf4ba509e112e49f5c0120 (patch)
tree32dc6d10575debbd970a9936e196638f3a1354f1 /src/models
parent93e5f7eda2f9bf0d274d793f7e823e35502f4763 (diff)
downloadcommercel-api-3109e25f2cabb85bbccf4ba509e112e49f5c0120.tar.gz
feat: add date to Waybill
Diffstat (limited to 'src/models')
-rw-r--r--src/models/waybill/waybill.schema.ts5
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,