{"size": 669, "ext": "js", "max_stars_repo_path": "models/books.model.js", "max_stars_repo_name": "latifaghassan/can-of-books-backend", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "models/books.model.js", "max_issues_repo_name": "latifaghassan/can-of-books-backend", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "models/books.model.js", "max_forks_repo_name": "latifaghassan/can-of-books-backend", "max_forks_repo_forks_event_min_datetime": "2021-06-21T13:24:22.000Z", "max_forks_repo_forks_event_max_datetime": "2021-06-21T13:24:22.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 26.76, "max_line_length": 91, "alphanum_fraction": 0.7010463378}
"use strict";

const mongoose = require("mongoose");
/*
 We are going to use mongoose, to do two things:
    - Create the schema
    - generate the model
*/

// Here we are creating a new schema obj, which will be used later on to generate the model
const booksSchema = new mongoose.Schema({
  name: { type: String },
  description: { type: String },
  status: { type: String },
});

// schema have preporities abd behaviors
// describe how the model look like
// it describe how the data look like when we model them .
// we can make their type pf data : string , Number

// const myBookModel = new mongoose.model ('books', booksSchema)

module.exports = booksSchema;
