问题描述
用户架构
const userSchema = new mongoose.Schema({
name : type: String,email : type : String,password: type: String,address : [{type: mongoose.Schema.Types.ObjectId,ref: "Address"}],});
module.exports = mongoose.model('User',userSchema);
地址架构
addressSchema = new mongoose.Schema({
name : type: String,phone_number : type : Number,address1: type: String,address2: type: String,landmark: type: String,coordinates: [Number],created_at: { type: Date,default: Date.Now()}
});
module.exports = mongoose.model('Address',addressSchema);
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)