87 lines
1.9 KiB
TypeScript
87 lines
1.9 KiB
TypeScript
import { ApiProperty } from '@midwayjs/swagger';
|
|
import { Exclude, Expose } from 'class-transformer';
|
|
import {
|
|
Column,
|
|
CreateDateColumn,
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
UpdateDateColumn,
|
|
} from 'typeorm';
|
|
|
|
@Entity('order_fulfillment')
|
|
@Exclude()
|
|
export class OrderFulfillment {
|
|
@ApiProperty()
|
|
@PrimaryGeneratedColumn()
|
|
@Expose()
|
|
id: number;
|
|
|
|
@ApiProperty()
|
|
@Column({ name: 'order_id', nullable: true })
|
|
@Expose()
|
|
order_id: number; // 订单 ID
|
|
|
|
@ApiProperty()
|
|
@Column({ name: 'site_id', nullable: true })
|
|
@Expose()
|
|
site_id: number; // 站点ID
|
|
|
|
@ApiProperty()
|
|
@Column({ name: 'external_order_id', nullable: true })
|
|
@Expose()
|
|
external_order_id: string; // 外部订单 ID
|
|
|
|
@ApiProperty()
|
|
@Column({ name: 'external_fulfillment_id', nullable: true })
|
|
@Expose()
|
|
external_fulfillment_id: string; // 外部履约 ID
|
|
|
|
@ApiProperty()
|
|
@Column({ name: 'tracking_number' })
|
|
@Expose()
|
|
tracking_number: string; // 物流单号
|
|
|
|
@ApiProperty()
|
|
@Column({ name: 'shipping_provider', nullable: true })
|
|
@Expose()
|
|
shipping_provider: string; // 物流公司
|
|
|
|
@ApiProperty()
|
|
@Column({ name: 'shipping_method', nullable: true })
|
|
@Expose()
|
|
shipping_method: string; // 发货方式
|
|
|
|
@ApiProperty()
|
|
@Column({ nullable: true })
|
|
@Expose()
|
|
status: string; // 状态
|
|
|
|
@ApiProperty()
|
|
@Column({ name: 'date_created', type: 'timestamp', nullable: true })
|
|
@Expose()
|
|
date_created: Date; // 创建时间
|
|
|
|
@ApiProperty()
|
|
@Column({ type: 'json', nullable: true })
|
|
@Expose()
|
|
items: any[]; // 发货商品项
|
|
|
|
@ApiProperty({
|
|
example: '2022-12-12 11:11:11',
|
|
description: '创建时间',
|
|
required: true,
|
|
})
|
|
@CreateDateColumn({ name: 'created_at' })
|
|
@Expose()
|
|
created_at: Date;
|
|
|
|
@ApiProperty({
|
|
example: '2022-12-12 11:11:11',
|
|
description: '更新时间',
|
|
required: true,
|
|
})
|
|
@UpdateDateColumn({ name: 'updated_at' })
|
|
@Expose()
|
|
updated_at: Date;
|
|
}
|