YARA-1244

This commit is contained in:
SepehrYahyaee
2026-08-24 11:11:31 +03:30
parent 93edba412f
commit 2df7a889d3
4 changed files with 341 additions and 228 deletions

View File

@@ -2,6 +2,19 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
import { Types } from "mongoose";
import { RoleEnum } from "src/Types&Enums/role.enum";
@Schema({ _id: false, versionKey: false })
export class FileMakerLocationModel {
@Prop({ type: String, required: true })
id: string;
@Prop({ type: String, required: true })
name: string;
}
export const FileMakerLocationDbSchema = SchemaFactory.createForClass(
FileMakerLocationModel,
);
@Schema({
collection: "file-maker",
versionKey: false,
@@ -31,6 +44,9 @@ export class FileMakerModel {
@Prop({ type: Types.ObjectId, index: true })
branchId?: Types.ObjectId;
@Prop({ type: [FileMakerLocationDbSchema], default: [] })
locations?: FileMakerLocationModel[];
@Prop({ required: true })
password: string;
@@ -49,6 +65,12 @@ export class FileMakerModel {
@Prop({ type: "string", required: false })
expertCode?: string;
@Prop({ type: String, required: false })
ThirdPartyClaimExpertId?: string;
@Prop({ type: String, required: false })
CarBodyClaimExpertId?: string;
createdAt: Date;
}

View File

@@ -2,6 +2,19 @@ import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
import { Types } from "mongoose";
import { RoleEnum } from "src/Types&Enums/role.enum";
@Schema({ _id: false, versionKey: false })
export class FileReviewerLocationModel {
@Prop({ type: String, required: true })
id: string;
@Prop({ type: String, required: true })
name: string;
}
export const FileReviewerLocationDbSchema = SchemaFactory.createForClass(
FileReviewerLocationModel,
);
@Schema({
collection: "file-reviewer",
versionKey: false,
@@ -31,6 +44,9 @@ export class FileReviewerModel {
@Prop({ type: Types.ObjectId, index: true })
branchId?: Types.ObjectId;
@Prop({ type: [FileReviewerLocationDbSchema], default: [] })
locations?: FileReviewerLocationModel[];
@Prop({ required: true })
password: string;
@@ -49,6 +65,12 @@ export class FileReviewerModel {
@Prop({ type: "string", required: false })
expertCode?: string;
@Prop({ type: String, required: false })
ThirdPartyExpertiseClaim?: string;
@Prop({ type: String, required: false })
CarBodyExpertiseClaim?: string;
createdAt: Date;
}