chore: import DH V2 D5.6.4 production baseline
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
import { Transform, Type } from 'class-transformer';
|
||||
import {
|
||||
IsEnum,
|
||||
IsInt,
|
||||
IsISO8601,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
Max,
|
||||
MaxLength,
|
||||
Min,
|
||||
} from 'class-validator';
|
||||
import { AssetInformationStatus } from '../../database/entities';
|
||||
|
||||
const trim = ({ value }: { value: unknown }) =>
|
||||
typeof value === 'string' ? value.trim() : value;
|
||||
|
||||
export class TemporalAtQueryDto {
|
||||
@IsISO8601({ strict: true })
|
||||
at!: string;
|
||||
}
|
||||
|
||||
export class ListTemporalAssetsQueryDto extends TemporalAtQueryDto {
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
page = 1;
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(100)
|
||||
pageSize = 25;
|
||||
|
||||
@Transform(trim)
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(200)
|
||||
search?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsUUID('4')
|
||||
typeId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(AssetInformationStatus)
|
||||
status?: AssetInformationStatus;
|
||||
}
|
||||
Reference in New Issue
Block a user