: Boolean
});
//使用创建集合 创建构造函数
const Course = mongoose.model('Course', courseSchema) //courses
//创建文档...name: String,
author: String,
isPublished: Boolean
});
//使用创建集合 创建构造函数
const Course = mongoose.model...({
name: String,
age: Number,
email: String,
password: String,
hobbies: [String]
});
// 使用规则创建集合...: String,
password: String,
hobbies: [String]
});
// 使用规则创建集合
const User = mongoose.model('User', userSchema...: String,
password: String,
hobbies: [String]
});
// 使用规则创建集合
const User = mongoose.model('User', userSchema