1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- /**
- * 平台申请接入表
- */
- var mongoose = require("./mongodb");
- var Schema = mongoose.Schema;
- var moment=require("moment");
- var platformApplySchema = new Schema(
- {
- applyName:{type: String,default:''},//申请人
- tel:{type: String,default:''},//联系电话
- mail:{type: String,default:''},//联系邮箱
- ENTERPRISE_CODE:{type: String,default:''},//社会信用代码证/身份证
- ENTERPRISE_NAME:{type: String,default:''},//申请单位名称
- request:{type: String,default:''},//申请需求
- applicationTime:{type: Date,default:Date.now()},//申请时间
- validName:{type: String,default:''},//审核人
- auditTime:{type: Date,default:Date.now()},//审核时间
- result:{type: Number,default:0},//审核结果 0待审核1通过2未通过
- memo:{type: String,default:''},//审核结果说明
- charger:{type: String,default:''},//指定负责人
- chargerMail:{type: String,default:''},//负责人联系邮箱
- Deleted:{type: Number,default:0}//是否已删除 默认0未删除 1已删除
- },{
- strict: true,
- toObject: {
- virtuals: true
- },
- toJSON: {
- virtuals: true
- }
- });
- platformApplySchema.virtual('applicationTime2').get(function () {
- if(this.applicationTime =="")//判断传入的参数
- {
- return "";
- };
- return moment(this.applicationTime).format('YYYY-MM-DD HH:mm:ss');
- });
- platformApplySchema.virtual('auditTime2').get(function () {
- if(this.auditTime =="")//判断传入的参数
- {
- return "";
- };
- return moment(this.auditTime).format('YYYY-MM-DD HH:mm:ss');
- });
- var platformApply = mongoose.model('platformApply',
- platformApplySchema,'t_platformApply');
- module.exports = platformApply;
|