chore: contact us module
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { IsNotEmpty, IsString } from "class-validator";
|
||||
|
||||
import { ContactUsMessage } from "../../../common/enums/message.enum";
|
||||
|
||||
export class CreateContactUsDto {
|
||||
@IsNotEmpty({ message: ContactUsMessage.TITLE_IS_REQUIRED })
|
||||
@IsString({ message: ContactUsMessage.TITLE_STRING })
|
||||
@ApiProperty({ description: "title of contact us", example: "عنوان پیام" })
|
||||
title: string;
|
||||
|
||||
@IsNotEmpty({ message: ContactUsMessage.CONTENT_IS_REQUIRED })
|
||||
@IsString({ message: ContactUsMessage.CONTENT_STRING })
|
||||
@ApiProperty({ description: "content of contact us", example: "متن پیام" })
|
||||
content: string;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { ApiPropertyOptional } from "@nestjs/swagger";
|
||||
import { IsDateString, IsOptional, IsString } from "class-validator";
|
||||
|
||||
import { PaginationDto } from "../../../common/DTO/pagination.dto";
|
||||
import { CriticismMessage } from "../../../common/enums/message.enum";
|
||||
|
||||
export class SearchContactUsQueryDto extends PaginationDto {
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
@ApiPropertyOptional({ description: "since query", example: "2025-01-27" })
|
||||
since?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString({ message: CriticismMessage.SEARCH_QUERY_STRING })
|
||||
@ApiPropertyOptional({ description: "Search query", example: "search query" })
|
||||
q?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user