update schedule

This commit is contained in:
2025-11-16 09:26:09 +03:30
parent 7663507394
commit 64ac2ead36
2 changed files with 10 additions and 17 deletions
@@ -10,24 +10,17 @@ export class CreateScheduleDto {
@Type(() => Number)
weekDay!: number;
@ApiProperty({ example: 900, description: 'زمان باز شدن (دقیقه از نیمه شب)' })
@IsNumber()
@Min(0)
@Max(1440)
@Type(() => Number)
openTime!: number;
@ApiProperty({ example: '08:00', description: 'زمان باز شدن (دقیقه از نیمه شب)' })
@IsString()
openTime!: string;
@ApiProperty({ example: 1380, description: 'زمان بستن (دقیقه از نیمه شب)' })
@IsNumber()
@Min(0)
@Max(1440)
@Type(() => Number)
closeTime!: number;
@ApiProperty({ example: '23:00', description: 'زمان بستن (دقیقه از نیمه شب)' })
@IsString()
closeTime!: string;
@ApiPropertyOptional({ example: true, description: 'آیا این برنامه فعال است؟' })
@IsOptional()
@IsBoolean()
@Type(() => Boolean)
isActive?: boolean;
}
@@ -7,11 +7,11 @@ export class Schedule extends BaseEntity {
@Property({ type: 'int' })
weekDay!: number;
@Property({ type: 'int' })
openTime!: number;
@Property({ type: 'time' })
openTime!: string;
@Property({ type: 'int' })
closeTime!: number;
@Property({ type: 'time' })
closeTime!: string;
@Property({ default: true })
isActive: boolean = true;