Files
dmenu-api/src/modules/icons/entities/icon.entity.ts
T
2025-12-15 13:01:49 +03:30

21 lines
500 B
TypeScript

import { Entity, Index, Property, ManyToOne } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { Group } from './group.entity';
@Entity({ tableName: 'icons' })
@Index({ properties: ['isActive'] })
@Index({ properties: ['group', 'isActive'] })
export class Icon extends BaseEntity {
@Property()
name!: string;
@Property()
url!: string;
@Property({ default: true })
isActive: boolean = true;
@ManyToOne(() => Group)
group!: Group;
}