entity bugs

This commit is contained in:
2026-01-14 15:19:18 +03:30
parent 209a4fc723
commit aed4a1b333
12 changed files with 35 additions and 24 deletions
@@ -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;