251123:0200 T6.1 to DO

This commit is contained in:
2025-11-23 02:23:38 +07:00
parent 17d9f172d4
commit 23006898d9
58 changed files with 3221 additions and 502 deletions
@@ -0,0 +1,39 @@
import {
IsString,
IsInt,
IsOptional,
IsEnum,
IsNotEmpty,
IsUrl,
} from 'class-validator';
import { NotificationType } from '../entities/notification.entity';
export class CreateNotificationDto {
@IsInt()
@IsNotEmpty()
userId!: number; // ผู้รับ
@IsString()
@IsNotEmpty()
title!: string; // หัวข้อ
@IsString()
@IsNotEmpty()
message!: string; // ข้อความ
@IsEnum(NotificationType)
@IsNotEmpty()
type!: NotificationType; // ประเภท: EMAIL, LINE, SYSTEM
@IsString()
@IsOptional()
entityType?: string; // e.g., 'rfa', 'correspondence'
@IsInt()
@IsOptional()
entityId?: number; // e.g., rfa_id
@IsString()
@IsOptional()
link?: string; // Link ไปยังหน้าเว็บ (Frontend)
}