text: const mongoose = require('../database/connection');
  
  const taskSchema = new mongoose.Schema({
   
      title: {
          type: String,
          required: true
      },
      completed: {
          type: Boolean,
          default: false,
          required: true
      },
  
      assignTo: {
          type: mongoose.Schema.Types.ObjectId,
          ref: 'User',
          required: true
      },
      project: {
          type: mongoose.Schema.Types.ObjectId,
          ref: 'Project',
          required: true
      },
  
      createdAt: {
          type: Date,
          default: Date.now
      }
  });
  
  const Task = mongoose.model('Task', taskSchema);
  
  module.exports = Task;