|
@@ -1,5 +1,6 @@
|
|
|
'use strict';
|
|
|
const Schema = require('mongoose').Schema;
|
|
|
+const moment = require('moment');
|
|
|
const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
|
|
|
|
|
|
const treaty = {
|
|
@@ -36,6 +37,7 @@ const treaty = {
|
|
|
maxLength: 200,
|
|
|
field: { label: '结算周期' },
|
|
|
},
|
|
|
+ expiry_date: { type: String, required: true, maxLength: 200, field: { label: '有效日期' } },
|
|
|
status: {
|
|
|
type: String,
|
|
|
maxLength: 200,
|
|
@@ -52,6 +54,8 @@ const treaty = {
|
|
|
},
|
|
|
},
|
|
|
owner: { type: String, required: true },
|
|
|
+
|
|
|
+ create_date: { type: String, default: moment().format('YYYY-MM-DD') },
|
|
|
};
|
|
|
|
|
|
const schema = new Schema(treaty, { toJSON: { virtuals: true } });
|