Adding all the tests and fixes to the passengers app

This commit is contained in:
Muluhabt
2026-07-21 13:45:49 +03:00
parent 8ce2d2d874
commit f2ae9c883f
3316 changed files with 15548 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
import { IsString, IsOptional, IsInt, IsBoolean } from 'class-validator';
import { IsString, IsOptional, IsInt, IsBoolean, Min, Max } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class CreatePromotionDto {
@@ -15,14 +15,17 @@ export class CreatePromotionDto {
@IsString()
subtitle?: string;
@ApiPropertyOptional({ example: 15 })
@ApiPropertyOptional({ example: 15, description: 'Percentage discount, bounded 0..100' })
@IsOptional()
@IsInt()
@Min(0)
@Max(100)
percentOff?: number;
@ApiPropertyOptional({ example: 5000 })
@IsOptional()
@IsInt()
@Min(0)
amountOffMinor?: number;
@ApiProperty({ example: '2026-12-31T23:59:59Z' })