Project.js 406 B

12345678910111213
  1. const {Schema,model,ObjectId}= require("mongoose")
  2. const Project = new Schema({
  3. id:{type: ObjectId},
  4. title:{type: String , require:true},
  5. codeHTML:{type: String, require: true },
  6. codeCSS:{type: String, require: true },
  7. codeJS:{type: String, require: true },
  8. user:{type: ObjectId,ref:'User'},
  9. email: {type: String, require: true ,},
  10. })
  11. module.exports = model('Project',Project)