feat: Initial commit of backend services and AGENTS.md
This commit is contained in:
29
backend/models/Task.js
Normal file
29
backend/models/Task.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const mongoose = require("mongoose");
|
||||
|
||||
const TaskSchema = new mongoose.Schema(
|
||||
{
|
||||
street: {
|
||||
type: mongoose.Schema.Types.ObjectId,
|
||||
ref: "Street",
|
||||
required: true,
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
completedBy: {
|
||||
type: mongoose.Schema.Types.ObjectId,
|
||||
ref: "User",
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
enum: ["pending", "completed"],
|
||||
default: "pending",
|
||||
},
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
},
|
||||
);
|
||||
|
||||
module.exports = mongoose.model("Task", TaskSchema);
|
||||
Reference in New Issue
Block a user