import { Column, Entity, Index, OneToMany } from "typeorm"; import { Product } from "./Product"; @Index("PK_product_group", ["id"], { unique: true }) @Entity("product_group", { schema: "core" }) export class ProductGroup { @Column("integer", { primary: true, name: "id" }) id: number; @Column("timestamp without time zone", { name: "created_date" }) createdDate: Date; @Column("integer", { name: "created_by" }) createdBy: number; @Column("smallint", { name: "state" }) state: number; @Column("character varying", { name: "name", length: 255 }) name: string; @Column("smallint", { name: "os_type" }) osType: number; @OneToMany(() => Product, (product) => product.productGroup) products: Product[]; }