Added Salvi's backend folder from backend branch to allow ombase to continue testing.

This commit is contained in:
K
2025-02-23 09:05:16 +05:30
parent 3f9e6d3dee
commit 7da2809399
28 changed files with 6979 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
const mongoose = require("mongoose");
const cropSchema = new mongoose.Schema(
{
name: { type: String, required: true },
farm: { type: mongoose.Schema.Types.ObjectId, ref: "Farm", required: true },
image: { type: String },
plantedDate: { type: Date, required: true, default: Date.now() },
harvestDate: { type: Date },
growthStage: {
type: String,
enum: ["Planted", "Growing", "Ready to Harvest"],
default: "Planted",
},
healthStatus: { type: String, default: "Healthy" },
},
{ timestamps: true }
);
const Crop = mongoose.model("Crop", cropSchema);
module.exports = Crop;