attribute
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user