This commit is contained in:
2026-03-10 11:54:16 +03:30
parent ee6af69eee
commit 4ead1cdaf6
6 changed files with 48 additions and 27 deletions
@@ -1,15 +1,11 @@
import { IsString, IsOptional, IsBoolean, IsInt, Min, IsEnum } from 'class-validator';
import { ApiPropertyOptional, ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import { IsNotEmpty, IsOptional, IsString, } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class CreateBusinessDto {
export class SetupBusinessDto {
@IsString()
@ApiProperty({ example: '01619684-aebc-47d4-acc4-2e912a3d9dce' })
danakSubscriptionId: string;
@IsString()
@ApiProperty()
name: string;
@@ -18,6 +14,19 @@ export class CreateBusinessDto {
@ApiProperty()
slug: string;
@ApiProperty({ description: 'Mobile phone number' })
@IsNotEmpty()
@IsString()
phone!: string;
@ApiProperty({ description: 'First name', required: false })
@IsOptional()
@IsString()
firstName?: string;
@ApiProperty({ description: 'Last name', required: false })
@IsOptional()
@IsString()
lastName?: string;
}
@@ -1,4 +1,4 @@
import { PartialType } from '@nestjs/swagger';
import { CreateBusinessDto } from './create-business.dto';
import { SetupBusinessDto } from './create-business.dto';
export class UpdateBusinessDto extends PartialType(CreateBusinessDto) {}
export class UpdateBusinessDto extends PartialType(SetupBusinessDto) { }