feat: add Bed and Locker DTOs
This commit is contained in:
34
apps/server/src/rooms/dto/bed.dto.ts
Normal file
34
apps/server/src/rooms/dto/bed.dto.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { IsString, IsOptional, IsInt, Min, IsEnum, IsArray, ArrayMinSize } from 'class-validator';
|
||||
|
||||
export class CreateBedDto {
|
||||
@IsString()
|
||||
bedNumber: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
status?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
export class UpdateBedDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
bedNumber?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(['available', 'occupied', 'maintenance'])
|
||||
status?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
export class BatchCreateBedDto {
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
count: number;
|
||||
}
|
||||
34
apps/server/src/rooms/dto/locker.dto.ts
Normal file
34
apps/server/src/rooms/dto/locker.dto.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { IsString, IsOptional, IsInt, Min, IsEnum } from 'class-validator';
|
||||
|
||||
export class CreateLockerDto {
|
||||
@IsString()
|
||||
lockerNumber: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
status?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
export class UpdateLockerDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
lockerNumber?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(['available', 'occupied', 'maintenance'])
|
||||
status?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
export class BatchCreateLockerDto {
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
count: number;
|
||||
}
|
||||
Reference in New Issue
Block a user