📜  猫鼬用户模型示例 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:38.928000             🧑  作者: Mango

代码示例1
var mongoose = require('mongoose');

var UserSchema = new mongoose.Schema({
  username: String,
  email: String,
  bio: String,
  image: String,
  hash: String,
  salt: String
}, {timestamps: true});

mongoose.model('User', UserSchema);