18 lines
591 B
JavaScript
18 lines
591 B
JavaScript
const mongoose = require("mongoose");
|
|
const Schema = mongoose.Schema;
|
|
|
|
const UserSchema = new Schema({
|
|
name: { type: String, required: true, max: 100 },
|
|
gender: { type: String, max: 20 },
|
|
birth: { type: Date },
|
|
avatar: { type: String, max: 100 },
|
|
account: { type: String, required: true, max: 100 },
|
|
password: { type: String, required: true, max: 100 },
|
|
email: { type: String, max: 20 },
|
|
phone: { type: String, max: 11 },
|
|
register_date: { type: Date },
|
|
last_login_date: { type: Date },
|
|
status: { type: String },
|
|
});
|
|
|
|
module.exports = mongoose.model("User", UserSchema); |