31 lines
661 B
TypeScript
31 lines
661 B
TypeScript
// src/entity/PurchaseOrderItem.ts
|
|
import { ApiProperty } from '@midwayjs/swagger';
|
|
import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
|
|
|
|
@Entity('purchase_order_item')
|
|
export class PurchaseOrderItem {
|
|
@ApiProperty({ type: Number })
|
|
@PrimaryGeneratedColumn()
|
|
id: number;
|
|
|
|
@ApiProperty({ type: String })
|
|
@Column()
|
|
sku: string;
|
|
|
|
@ApiProperty({ type: String })
|
|
@Column()
|
|
name: string;
|
|
|
|
@ApiProperty({ type: Number })
|
|
@Column()
|
|
quantity: number;
|
|
|
|
@ApiProperty({ type: Number })
|
|
@Column({ type: 'decimal', precision: 10, scale: 2 })
|
|
price: number;
|
|
|
|
@ApiProperty({ type: Number })
|
|
@Column()
|
|
purchaseOrderId: number;
|
|
}
|