|
@@ -15,7 +15,7 @@ const card = {
|
|
|
name: { type: String, required: true },
|
|
|
id_card: { type: String, required: true, lowercase: true },
|
|
|
level: { type: Number, required: true, default: 1 },
|
|
|
- points: { type: Number, default: 600 },
|
|
|
+ points: { type: Number, default: 0 },
|
|
|
recommend: { type: String },
|
|
|
r_mobile: { type: String },
|
|
|
car_show: { type: Boolean, default: false },
|
|
@@ -25,9 +25,13 @@ const card = {
|
|
|
type: String,
|
|
|
default: moment().format('YYYY-MM-DD HH:mm:ss'),
|
|
|
},
|
|
|
+ status: { type: String, default: '1' },
|
|
|
+ admin: { type: Boolean, default: false },
|
|
|
};
|
|
|
const schema = new Schema(card, { toJSON: { virtuals: true } });
|
|
|
schema.index({ id: 1 });
|
|
|
+schema.index({ status: 1 });
|
|
|
+schema.index({ 'meta.createdAt': 1 });
|
|
|
schema.plugin(metaPlugin);
|
|
|
module.exports = app => {
|
|
|
const { mongoose } = app;
|