This commit is contained in:
2025-12-15 13:01:49 +03:30
parent 6bcfda19c9
commit a09fa468f2
14 changed files with 392 additions and 0 deletions
@@ -0,0 +1,16 @@
import { Entity, Index, Property, Collection, OneToMany } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { Icon } from './icon.entity';
@Entity({ tableName: 'icon_groups' })
@Index({ properties: ['isActive'] })
export class Group extends BaseEntity {
@Property()
name!: string;
@Property({ default: true })
isActive: boolean = true;
@OneToMany(() => Icon, icon => icon.group)
icons = new Collection<Icon>(this);
}