From 3109e25f2cabb85bbccf4ba509e112e49f5c0120 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 18 Mar 2021 22:10:29 +0300 Subject: feat: add date to Waybill --- src/models/waybill/waybill.schema.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/models/waybill') 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, -- cgit v1.2.3