import mongoose from "mongoose";

const borrowSchema = new mongoose.Schema({
    bookId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "Book",
        required: true
    },
    clientId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "User",
        required: true
    },
    dueDate: {
        type: Date,
        required: true
    }
}, { timestamps: true });

const Borrow = mongoose.model("Borrow", borrowSchema);

export default Borrow;
