65 lines
1.2 KiB
TypeScript
65 lines
1.2 KiB
TypeScript
import { ApiProperty } from '@midwayjs/swagger';
|
|
import {
|
|
BaseEntity,
|
|
Column,
|
|
CreateDateColumn,
|
|
DeleteDateColumn,
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
UpdateDateColumn,
|
|
} from 'typeorm';
|
|
|
|
@Entity('stock_point')
|
|
export class StockPoint extends BaseEntity {
|
|
@ApiProperty({ type: 'number' })
|
|
@PrimaryGeneratedColumn()
|
|
id: number;
|
|
|
|
@ApiProperty({ type: 'string' })
|
|
@Column()
|
|
name: string;
|
|
|
|
@ApiProperty({ type: 'string' })
|
|
@Column()
|
|
location: string;
|
|
|
|
@ApiProperty({ type: 'string' })
|
|
@Column()
|
|
contactPerson: string;
|
|
|
|
@ApiProperty({ type: 'string' })
|
|
@Column()
|
|
contactPhone: string;
|
|
|
|
@ApiProperty()
|
|
@Column({ default: false })
|
|
ignore: boolean;
|
|
|
|
@ApiProperty()
|
|
@Column({ default: false })
|
|
inCanada: boolean;
|
|
|
|
@ApiProperty()
|
|
@Column({ default: false })
|
|
isB: boolean;
|
|
|
|
@ApiProperty({
|
|
example: '2022-12-12 11:11:11',
|
|
description: '创建时间',
|
|
required: true,
|
|
})
|
|
@CreateDateColumn()
|
|
createdAt: Date;
|
|
|
|
@ApiProperty({
|
|
example: '2022-12-12 11:11:11',
|
|
description: '更新时间',
|
|
required: true,
|
|
})
|
|
@UpdateDateColumn()
|
|
updatedAt: Date;
|
|
|
|
@DeleteDateColumn()
|
|
deletedAt: Date; // 软删除时间
|
|
}
|