commit
This commit is contained in:
15
src/domain/entity/tables/pcmarca.entity.ts
Normal file
15
src/domain/entity/tables/pcmarca.entity.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { Product } from "./pcprodut.entity";
|
||||
|
||||
@Entity('PCMARCA')
|
||||
export class Brand {
|
||||
@PrimaryColumn({name: 'CODMARCA'})
|
||||
id: number;
|
||||
|
||||
@Column({name: "MARCA"})
|
||||
description: string;
|
||||
|
||||
@OneToMany(() => Product, product => product.brand)
|
||||
products: Product[];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user