This commit is contained in:
Felipe Batista
2025-01-27 17:44:27 -03:00
commit 47e7f75720
238 changed files with 36425 additions and 0 deletions

View 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;
}