first commit

This commit is contained in:
2026-01-26 10:54:31 +03:30
commit 1db3038221
20 changed files with 4026 additions and 0 deletions

36
models/peopleInfo.js Normal file
View File

@@ -0,0 +1,36 @@
const mongoose = require("mongoose");
const peopleInfoSchema = new mongoose.Schema(
{
mobile: { type: String, required: false, index: true },
name: { type: String, required: false, index: true },
family: { type: String, required: false, index: true },
birthdate: { type: String, required: false },
nationalcode: { type: String, required: false, index: true },
mellicard: { type: String, required: false },
info1: { type: String, required: false },
info2: { type: String, required: false },
info3: { type: String, required: false },
info4: { type: String, required: false },
},
{ timestamps: false }
);
peopleInfoSchema.index({ nationalcode: 1 });
peopleInfoSchema.index({ mobile: 1 });
peopleInfoSchema.index({ name: 1, family: 1 });
peopleInfoSchema.index(
{ name: "text", family: "text" },
{
default_language: "none",
weights: { name: 10, family: 10 },
}
);
peopleInfoSchema.index({ name: 1 });
peopleInfoSchema.index({ family: 1 });
const PeopleInfo = mongoose.model("PeopleInfo", peopleInfoSchema);
module.exports = PeopleInfo;