saksh-task-manager
Version:
A Node.js module for managing tasks with caching and event handling capabilities.
18 lines (14 loc) • 533 B
JavaScript
const mongoose = require('mongoose');
const taskSchema = new mongoose.Schema({
name: { type: String, required: true },
description: { type: String },
dueDate: { type: Date },
priority: { type: String, default: 'medium' },
status: { type: String, default: 'pending' },
assignedTo: { type: String },
tags: [String],
fileUrl: { type: String }, // New field for file URL
completed: { type: Boolean, default: false },
}, { timestamps: true });
const Task = mongoose.model('Task', taskSchema);
module.exports = Task;