Add Model for backend

This commit is contained in:
2025-02-22 15:20:35 +05:30
parent fe2cd31200
commit 1fdb739950
13 changed files with 115 additions and 153 deletions
+3 -29
View File
@@ -11,21 +11,9 @@ const userSchema = new mongoose.Schema(
maxLength: [30, "Please Enter the valid name"],
minLength: [2, "Name should have more than 5 characters"],
},
skills: [
{
type: String,
},
],
uniqueRole: {
type: String,
},
country: {
type: String,
},
description: {
type: String,
},
email: {
type: String,
required: true,
@@ -41,23 +29,9 @@ const userSchema = new mongoose.Schema(
type: String,
default: "/images/profile.jpeg",
},
role: {
type: String,
default: "user",
},
mainInterest: [
{
type: String,
},
],
documents: [
{
type: String,
},
],
meettingFees: {
type: Number,
},
role: { type: String, enum: ["farmer", "admin"], default: "farmer" },
farms: [{ type: mongoose.Schema.Types.ObjectId, ref: "Farm" }],
resetPasswordToken: String,
resetPasswordExpiry: Date,
},