icons module

This commit is contained in:
2026-05-21 09:24:03 +03:30
parent 5087a3e977
commit c7b5c4dca5
17 changed files with 1228 additions and 277 deletions
@@ -0,0 +1,15 @@
import { Entity, Index, Property, Collection, OneToMany, Cascade } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { Icon } from './icon.entity';
@Entity({ tableName: 'icon_groups' })
export class Group extends BaseEntity {
@Property()
name!: string;
@OneToMany(() => Icon, icon => icon.group,{
cascade: [Cascade.ALL],
orphanRemoval: true,
})
icons = new Collection<Icon>(this);
}