commit
This commit is contained in:
25
src/domain/entity/tables/pccategoria.entity.ts
Normal file
25
src/domain/entity/tables/pccategoria.entity.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Column, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { Esttipoproduto } from './esttipoproduto.entity';
|
||||
import { Pcsecao } from './pcsecao.entity';
|
||||
|
||||
@Entity("PCCATEGORIA")
|
||||
export class Pccategoria {
|
||||
|
||||
@PrimaryColumn({name: "CODSEC"})
|
||||
codigoSecao: number;
|
||||
|
||||
@PrimaryColumn({name: "CODCATEGORIA"})
|
||||
codigoCategoria: number;
|
||||
|
||||
@Column({name: "CATEGORIA"})
|
||||
descricao: string;
|
||||
|
||||
@ManyToOne(() => Pcsecao, secao => secao.categorias)
|
||||
@JoinColumn({name: 'CODSEC'})
|
||||
secao: Pcsecao;
|
||||
|
||||
@OneToMany(() => Esttipoproduto, tipoProduto => tipoProduto.categoria)
|
||||
tiposProduto: Esttipoproduto[];
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user