Initial commit after migration to gitea

This commit is contained in:
2026-01-18 11:27:43 +03:30
parent a21039410c
commit ea4b8eb543
196 changed files with 45567 additions and 9 deletions

View File

@@ -0,0 +1,98 @@
import { ApiProperty, ApiSchema } from "@nestjs/swagger";
import { IsMobilePhone, IsString, Length } from "class-validator";
import { DamageExpertModel } from "src/users/entities/schema/damage-expert.schema";
export class ProfileActor {
public email: string;
public fullName: string;
public nationalCode: string;
public insuActivityCo: string;
public userType: string;
public mobile: string;
public address: string;
public state: string;
public city: string;
constructor(Profile: DamageExpertModel) {
this.email = Profile?.email;
this.fullName = Profile?.firstName + " " + Profile?.lastName;
this.nationalCode = Profile?.nationalCode;
this.insuActivityCo = Profile?.insuActivityCo;
this.userType = Profile?.userType;
this.mobile = Profile?.mobile;
this.address = Profile?.address;
this.state = Profile?.state;
this.city = Profile?.city;
}
}
@ApiSchema({
name: "Edit Actor Profile",
description: "Body of the request to edit the actor's profile",
})
export class ActorEditUserProfileDto {
@ApiProperty({
type: "string",
description: "First name of the actor",
example: "heshmat",
nullable: true,
})
@IsString()
@Length(2, 40)
firstName?: string;
@ApiProperty({
type: "string",
description: "Last name of the actor",
example: "Heshmati",
nullable: true,
})
@IsString()
@Length(1, 10)
lastName?: string;
@ApiProperty({
type: "string",
description: "Mobile phone of the actor",
example: "09123456789",
nullable: true,
})
@IsMobilePhone("fa-IR")
mobile?: string;
@ApiProperty({
type: "string",
description: "تلفن خط ثابت",
example: "02122222222",
nullable: true,
})
@IsString()
phone?: string;
@ApiProperty({
type: "string",
description: "City of the user",
example: "استان",
nullable: true,
})
@IsString()
city?: string;
@ApiProperty({
type: "string",
description: "State of the user",
example: "شهر",
nullable: true,
})
@IsString()
state?: string;
@ApiProperty({
type: "string",
description: "Address of the user",
example: "آدرس",
nullable: true,
})
@IsString()
address?: string;
}