import { ApiProperty } from '@midwayjs/swagger'; import { ShippingDetailsDTO } from './freightcom.dto'; import { Rule, RuleType } from '@midwayjs/validate'; import { OrderSale } from '../entity/order_sale.entity'; export class ShipmentBookDTO { @ApiProperty({ type: OrderSale, isArray: true }) @Rule(RuleType.array()) sales: OrderSale[]; @ApiProperty({ type: ShippingDetailsDTO }) @Rule(RuleType.object()) details: ShippingDetailsDTO; @ApiProperty() @Rule(RuleType.number()) stockPointId: number; @ApiProperty({ type: 'number', isArray: true }) @Rule(RuleType.array().default([])) orderIds?: number[]; } export class PaymentMethodDTO { @ApiProperty() id: string; @ApiProperty() type: string; @ApiProperty() label: string; } export class QueryServiceDTO { @ApiProperty({ example: '1', description: '页码' }) @Rule(RuleType.number()) current: number; @ApiProperty({ example: '10', description: '每页大小' }) @Rule(RuleType.number()) pageSize: number; @ApiProperty() @Rule(RuleType.string()) carrier_name: string; @ApiProperty() @Rule(RuleType.bool()) isActive: boolean; }