|
@@ -13,22 +13,22 @@ const zf = new Schema({
|
|
|
|
|
|
// 办卡表
|
|
|
const card = {
|
|
|
- mobile: { type: String, required: true, maxLength: 11, unique: true }, //
|
|
|
- password: { type: Secret, required: true, select: false }, //
|
|
|
- province: { type: String, required: true }, //
|
|
|
- set: { type: String, required: true }, // 169/129
|
|
|
- pay_type: { type: String }, //
|
|
|
- name: { type: String, required: true }, //
|
|
|
- id_card: { type: String, required: true }, //
|
|
|
- level: { type: String, required: true }, //
|
|
|
- points: { type: String, required: true }, //
|
|
|
- recommend: { type: String, required: true }, //
|
|
|
- r_mobile: { type: String, required: true }, //
|
|
|
- zf: { type: zf },
|
|
|
+ mobile: { type: String, required: true, maxLength: 11, unique: true }, // 电话
|
|
|
+ password: { type: Secret, required: true, select: false }, // 密码
|
|
|
+ province: { type: String, required: true }, // 省份
|
|
|
+ set: { type: String, required: true }, // 169/129 套餐
|
|
|
+ pay_type: { type: String }, // 支付方式
|
|
|
+ name: { type: String, required: true }, // 姓名
|
|
|
+ id_card: { type: String, required: true }, // 身份证
|
|
|
+ level: { type: String, required: true }, // 等级
|
|
|
+ points: { type: String, required: true }, // 积分
|
|
|
+ recommend: { type: String, required: true }, // 推荐人
|
|
|
+ r_mobile: { type: String, required: true }, // 推荐人电话
|
|
|
+ zf: { type: zf }, // 支付设置
|
|
|
create_time: {
|
|
|
type: String,
|
|
|
default: moment().format('YYYY-MM-DD HH:mm:ss'),
|
|
|
- }, // chuangjian/banka
|
|
|
+ }, // 创建/办卡 时间
|
|
|
};
|
|
|
const schema = new Schema(card, { toJSON: { virtuals: true } });
|
|
|
schema.index({ id: 1 });
|