fix schedule

This commit is contained in:
2025-11-15 12:01:57 +03:30
parent e521e56f3e
commit 008351acd2
3 changed files with 22 additions and 12 deletions
@@ -1,11 +1,14 @@
import { IsString, IsNumber, IsBoolean, IsOptional, Min, Max } from 'class-validator';
import { IsNumber, IsBoolean, IsOptional, IsString, Min, Max } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { Type } from 'class-transformer';
export class CreateScheduleDto {
@ApiProperty({ example: '2024-01-15', description: 'تاریخ برای برنامه' })
@IsString()
date!: string;
@ApiProperty({ example: 1, description: 'روز هفته (۰=یکشنبه، ۶=شنبه)' })
@IsNumber()
@Min(0)
@Max(6)
@Type(() => Number)
weekDay!: number;
@ApiProperty({ example: 900, description: 'زمان باز شدن (دقیقه از نیمه شب)' })
@IsNumber()
@@ -26,5 +29,8 @@ export class CreateScheduleDto {
@IsBoolean()
@Type(() => Boolean)
isActive?: boolean;
@ApiProperty({ example: 'rest-ulid-123', description: 'شناسه رستوران' })
@IsString()
restId!: string;
}