|
@@ -6,14 +6,15 @@ const { Secret } = require('naf-framework-mongoose-free/lib/model/schema');
|
|
|
|
|
|
// 顾客
|
|
// 顾客
|
|
const user = {
|
|
const user = {
|
|
- name: { type: String, required: false, zh: '用户名' }, //
|
|
|
|
- phone: { type: String, required: false, zh: '手机号' }, //
|
|
|
|
- password: { type: Secret, required: false, select: false, zh: '密码' }, //
|
|
|
|
- icon: { type: Array, required: false, zh: '头像' }, //
|
|
|
|
- birth: { type: String, required: false, zh: '生日' }, //
|
|
|
|
- gender: { type: String, required: false, zh: '性别' }, // 字典:gender
|
|
|
|
- openid: { type: String, required: false, zh: '微信小程序' }, //
|
|
|
|
- status: { type: String, required: false, default: '0', zh: '状态' }, // 字典statusr_status
|
|
|
|
|
|
+ name: { type: String, required: false, zh: "用户名" }, //
|
|
|
|
+ phone: { type: String, required: false, zh: "手机号" }, //
|
|
|
|
+ password: { type: Secret, required: false, select: false, zh: "密码" }, //
|
|
|
|
+ icon: { type: Array, required: false, zh: "头像" }, //
|
|
|
|
+ birth: { type: String, required: false, zh: "生日" }, //
|
|
|
|
+ gender: { type: String, required: false, zh: "性别" }, // 字典:gender
|
|
|
|
+ email: { type: String, required: false, zh: "电子邮箱" }, //
|
|
|
|
+ openid: { type: String, required: false, zh: "微信小程序" }, //
|
|
|
|
+ status: { type: String, required: false, default: "0", zh: "状态" }, // 字典statusr_status
|
|
};
|
|
};
|
|
const schema = new Schema(user, { toJSON: { getters: true, virtuals: true } });
|
|
const schema = new Schema(user, { toJSON: { getters: true, virtuals: true } });
|
|
schema.index({ id: 1 });
|
|
schema.index({ id: 1 });
|