form builder module

This commit is contained in:
2026-01-28 14:59:25 +03:30
parent e44a239ef0
commit 8121b27248
27 changed files with 151 additions and 129 deletions
@@ -1,8 +1,8 @@
import { Collection, Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { Product } from './product.entity';
import { Product } from './product.entity';
import { AttributeValue } from './attribute-value.entity';
import { FieldType } from 'src/modules/print/interface/print';
import { FieldType } from 'src/modules/form-builder/interface/print';
@Entity({ tableName: 'attributes' })
export class Attribute extends BaseEntity {
@@ -13,10 +13,10 @@ export class Attribute extends BaseEntity {
parent?: Attribute | null
@OneToMany(() => Attribute, (c) => c.parent)
children=new Collection<Attribute>(this)
children = new Collection<Attribute>(this)
@OneToMany(() => AttributeValue, (attrValue) => attrValue.attribute)
values= new Collection<AttributeValue>(this)
values = new Collection<AttributeValue>(this)
@PrimaryKey({ type: 'bigint', autoincrement: true })
id: bigint;