forked from Yara724/api
55 lines
1.1 KiB
TypeScript
55 lines
1.1 KiB
TypeScript
import { ApiProperty } from "@nestjs/swagger";
|
|
import {
|
|
IsBoolean,
|
|
IsDateString,
|
|
IsNotEmpty,
|
|
IsOptional,
|
|
IsString,
|
|
} from "class-validator";
|
|
|
|
export class CreateBranchDto {
|
|
@ApiProperty({ example: "شهرک غرب" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
name: string;
|
|
|
|
@ApiProperty({ example: "1234" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
code: string;
|
|
|
|
@ApiProperty({ example: "استان" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
city: string;
|
|
|
|
@ApiProperty({ example: "شهر" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
state: string;
|
|
|
|
@ApiProperty({ example: "فلان آدرس" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
address: string;
|
|
|
|
@ApiProperty({ required: false, example: "0912345678" })
|
|
@IsOptional()
|
|
@IsString()
|
|
phoneNumber?: string;
|
|
|
|
@ApiProperty({ required: false, example: true, default: true })
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
isActive?: boolean;
|
|
|
|
@ApiProperty({
|
|
required: false,
|
|
example: "2025-01-01T00:00:00.000Z",
|
|
description: "Branch activity start datetime (ISO string)",
|
|
})
|
|
@IsOptional()
|
|
@IsDateString()
|
|
activityStartDate?: string;
|
|
}
|