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