82 lines
1.4 KiB
TypeScript
82 lines
1.4 KiB
TypeScript
import { ApiProperty } from '@midwayjs/swagger';
|
|
import { Exclude, Expose } from 'class-transformer';
|
|
import {
|
|
Column,
|
|
CreateDateColumn,
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
UpdateDateColumn,
|
|
} from 'typeorm';
|
|
|
|
@Entity('order_shipping')
|
|
@Exclude()
|
|
export class OrderShipping {
|
|
@ApiProperty()
|
|
@PrimaryGeneratedColumn()
|
|
@Expose()
|
|
id: number;
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
orderId: number; // 订单 ID
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
siteId: string;
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
externalOrderId: string; // WooCommerce 订单 ID
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
externalOrderShippingId: string; // WooCommerce 订单快递 ID
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
method_title: string;
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
method_id: string;
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
instance_id: string;
|
|
|
|
@ApiProperty()
|
|
@Column('decimal', { precision: 10, scale: 2 })
|
|
@Expose()
|
|
total: number;
|
|
|
|
@ApiProperty()
|
|
@Column('decimal', { precision: 10, scale: 2 })
|
|
@Expose()
|
|
total_tax: number;
|
|
|
|
@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;
|
|
}
|