fix: 归档删除改为软删除

This commit is contained in:
2026-07-17 14:13:17 +08:00
parent 3131d2e141
commit f7328d670d
49 changed files with 520 additions and 354 deletions

View File

@@ -28,6 +28,16 @@ describe('schedule attendance window validation', () => {
const errors = await validate(dto);
expect(errors.some((error) => error.property === 'attendanceAdvanceMinutes')).toBe(true);
});
it('accepts only supported schedule statuses when updating', async () => {
const inactive = Object.assign(new UpdateScheduleDto(), { status: 'inactive' });
const cancelled = Object.assign(new UpdateScheduleDto(), { status: 'cancelled' });
const paused = Object.assign(new UpdateScheduleDto(), { status: 'paused' });
expect((await validate(inactive)).some((error) => error.property === 'status')).toBe(false);
expect((await validate(cancelled)).some((error) => error.property === 'status')).toBe(false);
expect((await validate(paused)).some((error) => error.property === 'status')).toBe(true);
});
});
describe('schedule notes validation', () => {