15 lines
366 B
TypeScript
15 lines
366 B
TypeScript
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[];
|
|
|
|
} |