40 lines
985 B
TypeScript
40 lines
985 B
TypeScript
import { ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { Type } from 'class-transformer';
|
|
import { IsDateString, IsInt, IsOptional, IsString, MaxLength, Min } from 'class-validator';
|
|
|
|
export class OutboundDto {
|
|
@ApiPropertyOptional({ description: '出库时间' })
|
|
@IsOptional()
|
|
@IsDateString()
|
|
outTime?: string;
|
|
|
|
@ApiPropertyOptional({ description: '出库实况图存储 key' })
|
|
@IsOptional()
|
|
@IsString()
|
|
outImageKey?: string;
|
|
|
|
@ApiPropertyOptional({ description: '上链哈希值(填写则记录上链结果)' })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(255)
|
|
txHash?: string;
|
|
|
|
@ApiPropertyOptional({ description: '上链时间' })
|
|
@IsOptional()
|
|
@IsDateString()
|
|
onchainAt?: string;
|
|
|
|
@ApiPropertyOptional({ description: '区块高度' })
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@IsInt()
|
|
@Min(0)
|
|
blockHeight?: number;
|
|
|
|
@ApiPropertyOptional({ description: '备注' })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(255)
|
|
remark?: string;
|
|
}
|