// models.js
import mongoose from 'mongoose';
const bookSchema = new mongoose.Schema({
title: String,
author: String,
genre: String,
// Other book properties...
});
const userSchema = new mongoose.Schema({
username: String,
email: String,
// Other user properties...
});
// Book and user are MODELS
// model is a in program memory data representation of an entity in the business domain that you are writing the software application to automate.
const Book = mongoose.model('Book', bookSchema);
const User = mongoose.model('User', userSchema);
export { Book, User };