commit
This commit is contained in:
30
src/domain/entity/tables/pcprodut.entity.ts
Normal file
30
src/domain/entity/tables/pcprodut.entity.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
|
||||
import { Brand } from "./pcmarca.entity";
|
||||
|
||||
@Entity('PCPRODUT')
|
||||
export class Product {
|
||||
@PrimaryColumn({name: 'CODPROD'})
|
||||
id: number;
|
||||
@Column({name: 'DESCRICAO'})
|
||||
smallDescription: string;
|
||||
@Column({name: 'PESOBRUTO'})
|
||||
peso: number;
|
||||
@Column({name: 'PESOLIQ'})
|
||||
pesoLiquido: number;
|
||||
@Column({name: 'ALTURAM3'})
|
||||
altura: number;
|
||||
@Column({name: 'COMPRIMENTOM3'})
|
||||
comprimento: number;
|
||||
@Column({name: 'LARGURAM3'})
|
||||
largura: number;
|
||||
@Column({name: 'CODAUXILIAR'})
|
||||
ean: number;
|
||||
@Column({name: 'CODMARCA', select: false})
|
||||
idBrand: number;
|
||||
@ManyToOne(() => Brand, brand => brand.products)
|
||||
@JoinColumn({
|
||||
name: "CODMARCA",
|
||||
referencedColumnName: "id"
|
||||
})
|
||||
brand: Brand;
|
||||
}
|
||||
Reference in New Issue
Block a user