25 lines
540 B
TypeScript
25 lines
540 B
TypeScript
import {
|
|
Entity,
|
|
Column,
|
|
PrimaryGeneratedColumn,
|
|
UpdateDateColumn,
|
|
DeleteDateColumn,
|
|
VersionColumn,
|
|
CreateDateColumn,
|
|
ManyToOne,
|
|
} from 'typeorm';
|
|
import { ProductCategories } from './product-category.entity';
|
|
import { BaseModel } from '../../config/basemodel.entity';
|
|
|
|
@Entity()
|
|
export class ProductSubCategories extends BaseModel{
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string;
|
|
|
|
@Column()
|
|
name: string;
|
|
|
|
@ManyToOne(() => ProductCategories, (categories) => categories.subCategories)
|
|
category: ProductCategories;
|
|
}
|