105 lines
1.9 KiB
TypeScript
105 lines
1.9 KiB
TypeScript
import { ApiProperty } from '@midwayjs/swagger';
|
|
import { Exclude, Expose } from 'class-transformer';
|
|
import {
|
|
Column,
|
|
CreateDateColumn,
|
|
Entity,
|
|
PrimaryColumn,
|
|
UpdateDateColumn,
|
|
} from 'typeorm';
|
|
|
|
@Entity('shipment')
|
|
@Exclude()
|
|
export class Shipment {
|
|
@ApiProperty()
|
|
@PrimaryColumn()
|
|
@Expose()
|
|
id: string;
|
|
|
|
@ApiProperty()
|
|
@Column({ nullable: true })
|
|
@Expose()
|
|
tracking_provider?: string;
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
unique_id: string;
|
|
|
|
@Column({ nullable: true })
|
|
@Expose()
|
|
state?: string;
|
|
|
|
@Column({ nullable: true })
|
|
@Expose()
|
|
type?: string;
|
|
|
|
@ApiProperty()
|
|
@Column({ nullable: true })
|
|
@Expose()
|
|
transaction_number?: string;
|
|
|
|
@ApiProperty()
|
|
@Column({ nullable: true })
|
|
@Expose()
|
|
primary_tracking_number?: string;
|
|
|
|
@ApiProperty({ type: [String] })
|
|
@Column({ type: 'json', nullable: true })
|
|
@Expose()
|
|
tracking_numbers?: string[];
|
|
|
|
@ApiProperty()
|
|
@Column({ nullable: true })
|
|
@Expose()
|
|
tracking_url?: string;
|
|
|
|
@ApiProperty()
|
|
@Column({ nullable: true })
|
|
@Expose()
|
|
return_tracking_number?: string;
|
|
|
|
@ApiProperty()
|
|
@Column({ nullable: true })
|
|
@Expose()
|
|
bol_number?: string;
|
|
|
|
@ApiProperty()
|
|
@Column({ nullable: true })
|
|
@Expose()
|
|
pickup_confirmation_number?: string;
|
|
|
|
@ApiProperty()
|
|
@Column({ nullable: true })
|
|
@Expose()
|
|
customs_invoice_url?: string;
|
|
|
|
@ApiProperty({ type: Object })
|
|
@Column({ type: 'json', nullable: true })
|
|
@Expose()
|
|
rate?: Record<string, any>;
|
|
|
|
@ApiProperty()
|
|
@Column({ type: 'json', nullable: true })
|
|
@Expose()
|
|
labels?: Array<any>;
|
|
|
|
@ApiProperty({
|
|
example: '2022-12-12 11:11:11',
|
|
description: '创建时间',
|
|
required: true,
|
|
})
|
|
@CreateDateColumn()
|
|
@Expose()
|
|
createdAt?: Date;
|
|
|
|
@ApiProperty({
|
|
example: '2022-12-12 11:11:11',
|
|
description: '更新时间',
|
|
required: true,
|
|
})
|
|
@UpdateDateColumn()
|
|
@Expose()
|
|
updatedAt?: Date;
|
|
}
|