feat: refine deposit room type workflows

This commit is contained in:
2026-07-17 17:36:04 +08:00
parent a5bda6f093
commit b3d0bafc22
11 changed files with 724 additions and 140 deletions

View File

@@ -1,4 +1,4 @@
import { IsDateString, IsIn, IsInt, IsNumber, IsString, IsOptional, Min } from 'class-validator';
import { ArrayNotEmpty, IsArray, IsDateString, IsIn, IsInt, IsNumber, IsString, IsOptional, Min } from 'class-validator';
export class CreateDepositDto {
@IsInt()
@@ -16,6 +16,28 @@ export class CreateDepositDto {
notes?: string;
}
export class BatchCreateDepositDto {
@IsArray()
@ArrayNotEmpty()
@IsInt({ each: true })
studentIds: number[];
@IsNumber({ maxDecimalPlaces: 2 })
@Min(0.01)
amount: number;
@IsDateString()
paidDate: string;
@IsOptional()
@IsString()
notes?: string;
@IsOptional()
@IsString()
roomType?: string;
}
export class RefundDepositDto {
@IsDateString()
refundDate: string;