mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 08:48:11 +00:00
Initial commit of edr-passenger-api alpha version
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { IsString, IsEnum, IsOptional } from 'class-validator';
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
|
||||
export enum NotificationCategoryEnum {
|
||||
BOOKING = 'BOOKING',
|
||||
PAYMENT = 'PAYMENT',
|
||||
DISRUPTION = 'DISRUPTION',
|
||||
PROMOTION = 'PROMOTION',
|
||||
SYSTEM = 'SYSTEM',
|
||||
}
|
||||
|
||||
export class SendNotificationDto {
|
||||
@ApiProperty() @IsString() passengerId: string;
|
||||
@ApiProperty({ example: 'Platform Change' }) @IsString() title: string;
|
||||
@ApiProperty({ example: 'Your train departs from Platform 3' }) @IsString() body: string;
|
||||
@ApiProperty({ enum: NotificationCategoryEnum }) @IsEnum(NotificationCategoryEnum) category: NotificationCategoryEnum;
|
||||
@ApiPropertyOptional({ example: 'edr://tickets/tkt_01' }) @IsOptional() @IsString() deepLink?: string;
|
||||
@ApiPropertyOptional() @IsOptional() metadata?: Record<string, any>;
|
||||
}
|
||||
Reference in New Issue
Block a user