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:
69
apps/server/src/occupancies/dto/occupancy.dto.ts
Normal file
69
apps/server/src/occupancies/dto/occupancy.dto.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
import { IsInt, IsString, IsOptional, IsArray } from 'class-validator';
|
||||
|
||||
export class CheckInDto {
|
||||
@IsInt()
|
||||
studentId: number;
|
||||
|
||||
@IsInt()
|
||||
roomId: number;
|
||||
|
||||
@IsString()
|
||||
checkInDate: string; // YYYY-MM-DD
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
billingStartDate?: string; // 默认=checkInDate,可调整
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
export class CheckOutDto {
|
||||
@IsString()
|
||||
checkOutDate: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
billingEndDate?: string; // 默认=checkOutDate
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
checkOutReason?: string;
|
||||
}
|
||||
|
||||
export class TransferRoomDto {
|
||||
@IsInt()
|
||||
newRoomId: number;
|
||||
|
||||
@IsString()
|
||||
transferDate: string; // YYYY-MM-DD
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
oldBillingEndDate?: string; // 旧房计费截止日,默认=transferDate
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
newBillingStartDate?: string; // 新房计费起始日,默认=transferDate次日
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
export class BatchCheckOutDto {
|
||||
@IsArray()
|
||||
ids: number[];
|
||||
|
||||
@IsString()
|
||||
checkOutDate: string; // YYYY-MM-DD
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
billingEndDate?: string; // 默认=checkOutDate
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
checkOutReason?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user