59 lines
1.5 KiB
TypeScript
59 lines
1.5 KiB
TypeScript
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
import { IsString, IsOptional, IsObject } from "class-validator";
|
|
|
|
export class CreateApprovalRequestDto {
|
|
@ApiProperty({ description: "دپارتمان مبدا (DEV, SUPPLY, FINANCE, SEO, CRM, CONTENT)" })
|
|
@IsString()
|
|
department: string;
|
|
|
|
@ApiProperty({ description: "دستهبندی (PRICING, PURCHASE_ORDER, CAMPAIGN, DEPLOY, etc)" })
|
|
@IsString()
|
|
category: string;
|
|
|
|
@ApiProperty({ description: "عنوان مورد تایید" })
|
|
@IsString()
|
|
title: string;
|
|
|
|
@ApiProperty({ description: "دادههای تغییرات پیشنهادی" })
|
|
@IsObject()
|
|
payload: Record<string, any>;
|
|
|
|
@ApiPropertyOptional({ description: "دادههای سناریوی تست و ارزیابی" })
|
|
@IsOptional()
|
|
@IsObject()
|
|
testContext?: Record<string, any>;
|
|
}
|
|
|
|
export class DecideApprovalDto {
|
|
@ApiProperty({ description: "تصمیم: APPROVED یا REJECTED" })
|
|
@IsString()
|
|
decision: "APPROVED" | "REJECTED";
|
|
|
|
@ApiPropertyOptional({ description: "توضیحات و یادداشت مدیرعامل" })
|
|
@IsOptional()
|
|
@IsString()
|
|
ceoNotes?: string;
|
|
}
|
|
|
|
export class QueryApprovalDto {
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
department?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
category?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
status?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
page?: number;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
limit?: number;
|
|
}
|