feat: add new field for the danak services
This commit is contained in:
@@ -206,6 +206,9 @@ export const enum ServiceMessage {
|
|||||||
SLUG_STRING = "اسلاگ سرویس باید یک رشته باشد",
|
SLUG_STRING = "اسلاگ سرویس باید یک رشته باشد",
|
||||||
SLUG_LENGTH = "اسلاگ سرویس باید بین ۳ تا ۱۵۰ کاراکتر باشد",
|
SLUG_LENGTH = "اسلاگ سرویس باید بین ۳ تا ۱۵۰ کاراکتر باشد",
|
||||||
SERVICE_ALREADY_EXISTS_WITH_THIS_SLUG = "سرویسی با این اسلاگ قبلا ثبت شده است",
|
SERVICE_ALREADY_EXISTS_WITH_THIS_SLUG = "سرویسی با این اسلاگ قبلا ثبت شده است",
|
||||||
|
PAGE_TITLE_REQUIRED = "عنوان صفحه سرویس مورد نیاز است",
|
||||||
|
PAGE_TITLE_STRING = "عنوان صفحه سرویس باید یک رشته باشد",
|
||||||
|
PAGE_TITLE_LENGTH = "عنوان صفحه سرویس باید بین ۳ تا ۱۵۰۰ کاراکتر باشد",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum AnnouncementMessage {
|
export const enum AnnouncementMessage {
|
||||||
|
|||||||
@@ -34,6 +34,13 @@ export class CreateServiceDto {
|
|||||||
@ApiProperty({ description: "The TITLE of the service", example: "Service TITLE" })
|
@ApiProperty({ description: "The TITLE of the service", example: "Service TITLE" })
|
||||||
title: string;
|
title: string;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsNotEmpty({ message: ServiceMessage.PAGE_TITLE_REQUIRED })
|
||||||
|
@IsString({ message: ServiceMessage.PAGE_TITLE_STRING })
|
||||||
|
@Length(3, 1500, { message: ServiceMessage.PAGE_TITLE_LENGTH })
|
||||||
|
@ApiProperty({ description: "The page title of the service", example: "Service Page Title" })
|
||||||
|
pageTitle?: string;
|
||||||
|
|
||||||
@IsNotEmpty({ message: ServiceMessage.DESCRIPTION_REQUIRED })
|
@IsNotEmpty({ message: ServiceMessage.DESCRIPTION_REQUIRED })
|
||||||
@IsString({ message: ServiceMessage.DESCRIPTION_STRING })
|
@IsString({ message: ServiceMessage.DESCRIPTION_STRING })
|
||||||
@Length(10, 500, { message: ServiceMessage.DESCRIPTION_LENGTH })
|
@Length(10, 500, { message: ServiceMessage.DESCRIPTION_LENGTH })
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ export class DanakService extends BaseEntity {
|
|||||||
@Column({ type: "varchar", length: 150, nullable: true })
|
@Column({ type: "varchar", length: 150, nullable: true })
|
||||||
title: string | null;
|
title: string | null;
|
||||||
|
|
||||||
|
@Column({ type: "text", nullable: true })
|
||||||
|
pageTitle: string | null;
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 150, nullable: true, unique: true })
|
@Column({ type: "varchar", length: 150, nullable: true, unique: true })
|
||||||
@Index()
|
@Index()
|
||||||
slug: string | null;
|
slug: string | null;
|
||||||
|
|||||||
Reference in New Issue
Block a user