update schedule
This commit is contained in:
@@ -10,24 +10,17 @@ export class CreateScheduleDto {
|
|||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
weekDay!: number;
|
weekDay!: number;
|
||||||
|
|
||||||
@ApiProperty({ example: 900, description: 'زمان باز شدن (دقیقه از نیمه شب)' })
|
@ApiProperty({ example: '08:00', description: 'زمان باز شدن (دقیقه از نیمه شب)' })
|
||||||
@IsNumber()
|
@IsString()
|
||||||
@Min(0)
|
openTime!: string;
|
||||||
@Max(1440)
|
|
||||||
@Type(() => Number)
|
|
||||||
openTime!: number;
|
|
||||||
|
|
||||||
@ApiProperty({ example: 1380, description: 'زمان بستن (دقیقه از نیمه شب)' })
|
@ApiProperty({ example: '23:00', description: 'زمان بستن (دقیقه از نیمه شب)' })
|
||||||
@IsNumber()
|
@IsString()
|
||||||
@Min(0)
|
closeTime!: string;
|
||||||
@Max(1440)
|
|
||||||
@Type(() => Number)
|
|
||||||
closeTime!: number;
|
|
||||||
|
|
||||||
@ApiPropertyOptional({ example: true, description: 'آیا این برنامه فعال است؟' })
|
@ApiPropertyOptional({ example: true, description: 'آیا این برنامه فعال است؟' })
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
@Type(() => Boolean)
|
@Type(() => Boolean)
|
||||||
isActive?: boolean;
|
isActive?: boolean;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ export class Schedule extends BaseEntity {
|
|||||||
@Property({ type: 'int' })
|
@Property({ type: 'int' })
|
||||||
weekDay!: number;
|
weekDay!: number;
|
||||||
|
|
||||||
@Property({ type: 'int' })
|
@Property({ type: 'time' })
|
||||||
openTime!: number;
|
openTime!: string;
|
||||||
|
|
||||||
@Property({ type: 'int' })
|
@Property({ type: 'time' })
|
||||||
closeTime!: number;
|
closeTime!: string;
|
||||||
|
|
||||||
@Property({ default: true })
|
@Property({ default: true })
|
||||||
isActive: boolean = true;
|
isActive: boolean = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user