forked from wangziqi/gongxue-base
- 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
70 lines
1.2 KiB
TypeScript
70 lines
1.2 KiB
TypeScript
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;
|
||
}
|