business
This commit is contained in:
@@ -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) { }
|
||||
|
||||
Reference in New Issue
Block a user