56 lines
896 B
JavaScript
56 lines
896 B
JavaScript
'use strict';
|
|
|
|
const mongoose = require('mongoose');
|
|
|
|
const UserSchema = new mongoose.Schema({
|
|
phone: {
|
|
type: String,
|
|
required: true,
|
|
unique: true
|
|
},
|
|
password: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
fundPwd: {
|
|
type: String,
|
|
},
|
|
nickname: {
|
|
type: String,
|
|
required: false
|
|
},
|
|
inviter: {
|
|
type: String,
|
|
},
|
|
inviteCode: {
|
|
type: String
|
|
},
|
|
asset: {
|
|
type: {}
|
|
},
|
|
group: [],
|
|
avatar: {
|
|
type: String
|
|
},
|
|
verifyLevel: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
verifyData: {
|
|
type: {},
|
|
default: {}
|
|
},
|
|
option: {
|
|
type: {}
|
|
},
|
|
}, {
|
|
timestamps: {
|
|
createdAt: 'createdAt',
|
|
updatedAt: 'updatedAt'
|
|
}
|
|
});
|
|
|
|
|
|
const UserModel = mongoose.model('User', UserSchema);
|
|
|
|
module.exports = UserModel; |