attribute

This commit is contained in:
2026-01-16 19:11:57 +03:30
parent 17b4b30a3f
commit d9bc1fa0b2
10 changed files with 30 additions and 25 deletions
@@ -6,15 +6,15 @@ import { Attribute } from './attribute.entity';
@Entity({ tableName: 'products' })
export class Product extends BaseEntity {
@PrimaryKey({ type: 'bigint', columnType: 'char(26)', autoincrement: true })
id: bigint
@ManyToOne(() => Category)
category: Category
@OneToMany(() => Attribute, (attr) => attr.product)
attributes = new Collection<Attribute>(this)
@PrimaryKey({ type: 'bigint', autoincrement: true })
id: bigint
@Property()
title: string;