add: add modules entity
This commit is contained in:
33
src/product/entities/product.entity.ts
Normal file
33
src/product/entities/product.entity.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
PrimaryGeneratedColumn,
|
||||
UpdateDateColumn,
|
||||
DeleteDateColumn,
|
||||
VersionColumn,
|
||||
CreateDateColumn,
|
||||
OneToMany,
|
||||
} from 'typeorm';
|
||||
import { ProductSubCategories } from './productSubCategory.entity';
|
||||
import { BaseModel } from '../../config/basemodel.entity';
|
||||
|
||||
@Entity()
|
||||
export class Product extends BaseModel{
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column()
|
||||
name: string;
|
||||
|
||||
@Column()
|
||||
code: string;
|
||||
|
||||
@Column()
|
||||
status: string;
|
||||
|
||||
@OneToMany(
|
||||
() => ProductSubCategories,
|
||||
(subCategories) => subCategories.category,
|
||||
)
|
||||
subCategories: ProductSubCategories;
|
||||
}
|
||||
Reference in New Issue
Block a user