小飞侠接口
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
import {
|
||||
IsArray,
|
||||
IsIn,
|
||||
IsNotEmpty,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
Min,
|
||||
} from 'class-validator';
|
||||
|
||||
export class XiaofeixiaEstimateFreightDto {
|
||||
@IsNumber()
|
||||
@Min(0.01)
|
||||
weight: number;
|
||||
}
|
||||
|
||||
export class XiaofeixiaCheckCoverageDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
toAddress: string;
|
||||
}
|
||||
|
||||
export class XiaofeixiaShipmentQueryDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
trackingNumber?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
outNumber?: string;
|
||||
}
|
||||
|
||||
export class XiaofeixiaBatchShipmentQueryDto {
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@IsString({ each: true })
|
||||
trackingNumbers?: string[];
|
||||
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@IsString({ each: true })
|
||||
outNumbers?: string[];
|
||||
}
|
||||
|
||||
export class XiaofeixiaCreateShipmentDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
outNumber: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
customerId?: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
fromName: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
fromMobile: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
fromAddress: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
fromAddressDetail: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
fromLng?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
fromLat?: number;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
toName: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
toMobile: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
toAddress: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
toAddressDetail: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
toLng?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
toLat?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
goodsName?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
goodsNum?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
weight?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
insuredSumPrice?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
collectionPrice?: number;
|
||||
|
||||
@IsIn(['1', '2'])
|
||||
payMode: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
remark?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user