chore: first commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { IsNotEmpty, IsString } from "class-validator";
|
||||
|
||||
import { BusinessMessage } from "../../../common/enums/message.enum";
|
||||
|
||||
export class BusinessSlugParamDto {
|
||||
@IsNotEmpty({ message: BusinessMessage.SLUG_REQUIRED })
|
||||
@IsString({ message: BusinessMessage.SLUG_MUST_BE_STRING })
|
||||
@ApiProperty({ description: "The slug of the business", example: "example-business" })
|
||||
slug: string;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { IsNotEmpty, IsOptional, IsString, IsUrl } from "class-validator";
|
||||
|
||||
import { BusinessMessage } from "../../../common/enums/message.enum";
|
||||
|
||||
export class UpdateBusinessSettingsDto {
|
||||
@IsOptional()
|
||||
@IsNotEmpty({ message: BusinessMessage.ZARINPAL_MERCHANT_ID_REQUIRED })
|
||||
@IsString({ message: BusinessMessage.ZARINPAL_MERCHANT_ID_STRING })
|
||||
@ApiProperty({ description: "Zarinpal merchant id", example: "1234567890" })
|
||||
zarinpalMerchantId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsNotEmpty({ message: BusinessMessage.LOGO_URL_REQUIRED })
|
||||
@IsString({ message: BusinessMessage.LOGO_URL_STRING })
|
||||
@IsUrl({ protocols: ["https"] }, { message: BusinessMessage.LOGO_URL_INVALID })
|
||||
@ApiProperty({ description: "Logo url", example: "https://example.com/logo.png" })
|
||||
logoUrl?: string;
|
||||
|
||||
// @IsOptional()
|
||||
// @IsNotEmpty({ message: BusinessMessage.NAME_REQUIRED })
|
||||
// @IsString({ message: BusinessMessage.NAME_STRING })
|
||||
// @ApiProperty({ description: "Name", example: "Example" })
|
||||
// name?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user