add: create crud product

This commit is contained in:
ilham
2021-12-06 00:07:22 +07:00
parent 1fc5706e47
commit 682b973329
16 changed files with 404 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ import {
CreateDateColumn,
OneToMany,
} from 'typeorm';
import { ProductSubCategories } from './productSubCategory.entity';
import { ProductSubCategories } from './product-sub-category.entity';
import { BaseModel } from '../../config/basemodel.entity';
@Entity()

View File

@@ -8,7 +8,7 @@ import {
CreateDateColumn,
ManyToOne,
} from 'typeorm';
import { ProductCategories } from './productCategory.entity';
import { ProductCategories } from './product-category.entity';
import { BaseModel } from '../../config/basemodel.entity';
@Entity()

View File

@@ -7,8 +7,9 @@ import {
VersionColumn,
CreateDateColumn,
OneToMany,
ManyToOne,
} from 'typeorm';
import { ProductSubCategories } from './productSubCategory.entity';
import { ProductSubCategories } from './product-sub-category.entity';
import { BaseModel } from '../../config/basemodel.entity';
@Entity()
@@ -25,7 +26,7 @@ export class Product extends BaseModel{
@Column()
status: string;
@OneToMany(
@ManyToOne(
() => ProductSubCategories,
(subCategories) => subCategories.category,
)