entity bugs
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { Entity, Enum, Property } from '@mikro-orm/core';
|
||||
import { Entity, Enum, ManyToOne, Property } from '@mikro-orm/core';
|
||||
import { BaseEntity } from '../../../common/entities/base.entity';
|
||||
import { AttributeType } from '../interface/product.interface';
|
||||
import { Product } from './product.entity';
|
||||
|
||||
@Entity({ tableName: 'attributes' })
|
||||
export class Attribute extends BaseEntity {
|
||||
@Property({ type: 'bigint' })
|
||||
productId: string
|
||||
@ManyToOne(()=>Product)
|
||||
product: Product
|
||||
|
||||
@Property({ primary: true })
|
||||
id: bigint;
|
||||
|
||||
Reference in New Issue
Block a user