remove restId

This commit is contained in:
2025-11-15 16:50:33 +03:30
parent c4a16df7d5
commit 7663507394
2 changed files with 4 additions and 7 deletions
@@ -30,7 +30,4 @@ export class CreateScheduleDto {
@Type(() => Boolean)
isActive?: boolean;
@ApiProperty({ example: 'rest-ulid-123', description: 'شناسه رستوران' })
@IsString()
restId!: string;
}
@@ -21,7 +21,7 @@ export class ScheduleService {
openTime: createScheduleDto.openTime,
closeTime: createScheduleDto.closeTime,
isActive: createScheduleDto.isActive ?? true,
restId: createScheduleDto.restId,
restId: '01KA35CFFN0F6VA04DF0W6KCE3',
};
const schedule = this.scheduleRepository.create(data);
@@ -61,9 +61,9 @@ export class ScheduleService {
if (updateScheduleDto.isActive !== undefined) {
updateData.isActive = updateScheduleDto.isActive;
}
if (updateScheduleDto.restId) {
updateData.restId = updateScheduleDto.restId;
}
// if (updateScheduleDto.restId) {
// updateData.restId = updateScheduleDto.restId;
// }
this.em.assign(schedule, updateData);
await this.em.persistAndFlush(schedule);