attribute

This commit is contained in:
2026-01-15 20:37:28 +03:30
parent 7229931045
commit 17b4b30a3f
8 changed files with 226 additions and 5 deletions
@@ -1,4 +1,4 @@
import { Collection, Entity, ManyToOne, OneToMany, Property } from '@mikro-orm/core';
import { Collection, Entity, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { Category } from './category.entity';
import { Attribute } from './attribute.entity';
@@ -6,7 +6,7 @@ import { Attribute } from './attribute.entity';
@Entity({ tableName: 'products' })
export class Product extends BaseEntity {
@Property({ primary: true })
@PrimaryKey({ type: 'bigint', columnType: 'char(26)', autoincrement: true })
id: bigint
@ManyToOne(() => Category)