forked from wangziqi/gongxue-base
feat(task1): restructure directories for turborepo monorepo
- Move backend/ to apps/server/ via git mv - Move frontend/ to apps/admin/ via git mv - Create packages/typescript-config/ with base, nestjs, and react-vite presets
This commit is contained in:
53
apps/server/src/rooms/dto/room.dto.ts
Normal file
53
apps/server/src/rooms/dto/room.dto.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import { IsString, IsOptional, IsInt, IsEnum, Min } from 'class-validator';
|
||||
|
||||
export class CreateRoomDto {
|
||||
@IsString()
|
||||
roomNumber: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
building?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
floor?: number;
|
||||
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
capacity: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
roomType?: string;
|
||||
}
|
||||
|
||||
export class UpdateRoomDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
roomNumber?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
building?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
floor?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
capacity?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
roomType?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
gender?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(['available', 'full', 'maintenance'])
|
||||
status?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user