add:product price
This commit is contained in:
		| @@ -2,11 +2,6 @@ import { | ||||
|   Entity, | ||||
|   Column, | ||||
|   PrimaryGeneratedColumn, | ||||
|   UpdateDateColumn, | ||||
|   DeleteDateColumn, | ||||
|   VersionColumn, | ||||
|   CreateDateColumn, | ||||
|   OneToMany, | ||||
|   ManyToOne, | ||||
| } from 'typeorm'; | ||||
| import { Product } from './product.entity'; | ||||
| @@ -23,13 +18,16 @@ export class ProductHistoryPrice extends BaseModel { | ||||
|   id: string; | ||||
|  | ||||
|   @ManyToOne(() => Product, (product) => product.id) | ||||
|   productId: string; | ||||
|   product: Product; | ||||
|  | ||||
|   @Column() | ||||
|   price: number; | ||||
|  | ||||
|   @Column({ type: 'date' }) | ||||
|   startDate: string; | ||||
|   startDate: Date; | ||||
|  | ||||
|   @Column({ type: 'date' }) | ||||
|   endDate: string; | ||||
|   endDate: Date; | ||||
|  | ||||
|   @Column('text') | ||||
|   type: Type; | ||||
|   | ||||
| @@ -26,6 +26,9 @@ export class Product extends BaseModel{ | ||||
|   @Column() | ||||
|   status: string; | ||||
|  | ||||
|   @Column() | ||||
|   price: number; | ||||
|  | ||||
|   @ManyToOne( | ||||
|     () => ProductSubCategories, | ||||
|     (subCategories) => subCategories.category, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user