You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

50 lines
874 B

'use strict';
const { uniq } = require("lodash");
module.exports = app => {
const mongoose = app.mongoose;
const Schema = mongoose.Schema;
const UserSchema = new Schema({
// 创建时间
create_at: {
type: Date,
default: Date.now
},
// 更新时间
update_at: {
type: Date,
default: Date.now
},
// 客户编号
usercode: {
type: String,
default: "",
index: true,
unique: true
},
// 简称
username: {
type: String,
default: ""
},
// 业务员
salesman: {
type: String,
default: ""
},
// 地址
address: {
type: String,
default: ""
},
//数据是否删除
isExit: {
type: Number,
default: 1,
index: true
},
}, { strict: false });
return mongoose.model('User', UserSchema);
};