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

View File

@@ -0,0 +1,51 @@
import { ApiProperty } from "@nestjs/swagger";
import { PlatesDto } from "src/plates/dto/plate.dto";
import { Plates } from "src/Types&Enums/plate.interface";
export class AddPlateDto {
plateId: string;
@ApiProperty({ type: String, required: true })
nationalCodeOfInsurer: string;
@ApiProperty({ type: String, required: true })
nationalCodeOfDriver: string;
@ApiProperty({ type: String, required: true })
insurerLicense: string;
@ApiProperty({ type: String, required: true })
driverLicense: string;
@ApiProperty({ type: PlatesDto, required: true })
plate: Plates;
@ApiProperty({ type: Boolean, required: true })
driverIsInsurer: boolean;
@ApiProperty({ type: Boolean, required: true, default: false })
isNewCar: boolean;
@ApiProperty({ type: Boolean, required: true })
userNoCertificate: boolean;
@ApiProperty({
type: Number,
required: true,
})
insurerBirthday: number;
@ApiProperty({
type: String,
required: false,
})
driverBirthday: string | null;
}
export class AddPlateProfileDto {
plateId: string;
@ApiProperty({ type: PlatesDto, required: true })
plate: Plates;
@ApiProperty({ type: String, required: true })
nationalCodeOfInsurer: string;
}

View File

@@ -0,0 +1,25 @@
import { ApiProperty } from "@nestjs/swagger";
import { UserModel } from "src/users/entities/schema/user.schema";
export class ProfileUserRq {
@ApiProperty({ required: true })
id: string;
}
export class ProfileUserRs extends UserModel {
userId: string;
fullName: string;
constructor(profile: UserModel, carDetail) {
super();
this.userId = profile["_id"];
this.fullName = profile.fullName;
this.mobile = profile.mobile;
this.plates = profile.plates || null;
this.nationalCode = profile.nationalCode;
this.birthDay = profile.birthDay;
this.gender = profile.gender;
this.plates = profile.plates;
this.city = profile.city;
// this.carDetail
}
}

View File

@@ -0,0 +1,31 @@
import { ApiProperty, ApiSchema } from "@nestjs/swagger";
import { IsDateString } from "class-validator";
@ApiSchema({
name: "Update user profile",
description: "Users updates their profile via this API.",
})
export class UpdateUserProfileDtoRq {
// @ApiProperty({})
// mobile: string;
@ApiProperty({
type: "string",
description: "Birth date of the user",
example: "1999-03-05",
nullable: true,
})
@IsDateString()
birthDay: string;
@ApiProperty()
gender?: "male" | "female";
@ApiProperty()
city: string;
@ApiProperty()
state: string;
@ApiProperty()
address: string;
}