import mongoose from "mongoose"

const schema = new mongoose.Schema({
    title: {
        type: String,
        required: true,
        unique: true
    },
    completed: {
        type: Boolean,
        required: true
    },
    owner: {
        type: mongoose.Schema.Types.ObjectId,
        required: true,
        ref: "User"
    }
})
const Task = mongoose.model("Task", schema)
export default Task