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