oa_based/src/modules/materials_inventory/materials_inventory.dto.ts

32 lines
764 B
TypeScript
Raw Normal View History

2024-03-04 14:17:53 +08:00
import { ApiProperty, IntersectionType, PartialType } from '@nestjs/swagger';
import {
IsArray,
IsDate,
IsDateString,
IsIn,
IsInt,
IsNumber,
IsOptional,
IsString,
Matches,
MinLength
} from 'class-validator';
import { PagerDto } from '~/common/dto/pager.dto';
import { Storage } from '../tools/storage/storage.entity';
export class MaterialsInventoryDto {
@ApiProperty({ description: '附件' })
files: Storage[];
}
export class MaterialsInventoryUpdateDto extends PartialType(MaterialsInventoryDto) {
@ApiProperty({ description: '附件' })
@IsOptional()
@IsArray()
fileIds: number[];
}
export class MaterialsInventoryQueryDto extends IntersectionType(
PagerDto<MaterialsInventoryDto>,
PartialType(MaterialsInventoryDto)
) {}