fix: product
This commit is contained in:
@@ -23,5 +23,5 @@ export class ProductCategories extends BaseModel {
|
||||
() => ProductSubCategories,
|
||||
(subCategories) => subCategories.category,
|
||||
)
|
||||
subCategories: ProductSubCategories;
|
||||
sub_categories: ProductSubCategories;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
PrimaryGeneratedColumn,
|
||||
ManyToOne,
|
||||
} from 'typeorm';
|
||||
import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from 'typeorm';
|
||||
import { Product } from './product.entity';
|
||||
import { BaseModel } from '../../config/basemodel.entity';
|
||||
import { productType } from '../../helper/enum-list';
|
||||
@@ -20,14 +15,14 @@ export class ProductHistoryPrice extends BaseModel {
|
||||
price: number;
|
||||
|
||||
@Column()
|
||||
markUpPrice: number;
|
||||
mark_up_price: number;
|
||||
|
||||
@Column({ type: 'date' })
|
||||
startDate: Date;
|
||||
|
||||
@Column({
|
||||
@Column({
|
||||
type: 'date',
|
||||
nullable:true
|
||||
nullable: true,
|
||||
})
|
||||
endDate: Date;
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ export class ProductSubCategories extends BaseModel {
|
||||
@Column()
|
||||
name: string;
|
||||
|
||||
@ManyToOne(() => ProductCategories, (categories) => categories.subCategories)
|
||||
@ManyToOne(() => ProductCategories, (categories) => categories.sub_categories)
|
||||
category: ProductCategories;
|
||||
|
||||
@OneToMany(() => Product, (product) => product.subCategories)
|
||||
@OneToMany(() => Product, (product) => product.sub_categories)
|
||||
product: Product;
|
||||
}
|
||||
|
||||
@@ -42,5 +42,5 @@ export class Product extends BaseModel {
|
||||
return subCategories.product;
|
||||
},
|
||||
)
|
||||
subCategories: ProductSubCategories;
|
||||
sub_categories: ProductSubCategories;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user