fix schedule
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user