68 lines
1.1 KiB
TypeScript
68 lines
1.1 KiB
TypeScript
import { ApiProperty } from '@midwayjs/swagger';
|
|
import { Exclude, Expose } from 'class-transformer';
|
|
import {
|
|
Column,
|
|
CreateDateColumn,
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
UpdateDateColumn,
|
|
} from 'typeorm';
|
|
import { Address } from '../dto/freightcom.dto';
|
|
|
|
@Entity()
|
|
@Exclude()
|
|
export class ShippingAddress {
|
|
@ApiProperty()
|
|
@PrimaryGeneratedColumn()
|
|
@Expose()
|
|
id?: number;
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
name: string;
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
stockPointId: number;
|
|
|
|
@ApiProperty({ type: Address })
|
|
@Column({ type: 'json', nullable: true })
|
|
@Expose()
|
|
address: Address;
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
phone_number: string;
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
phone_number_extension: string;
|
|
|
|
@ApiProperty()
|
|
@Column()
|
|
@Expose()
|
|
phone_number_country: string;
|
|
|
|
@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;
|
|
}
|