update module icon
This commit is contained in:
@@ -3,14 +3,10 @@ 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);
|
||||
}
|
||||
|
||||
@@ -3,18 +3,11 @@ import { BaseEntity } from '../../../common/entities/base.entity';
|
||||
import { Group } from './group.entity';
|
||||
|
||||
@Entity({ tableName: 'icons' })
|
||||
@Index({ properties: ['isActive'] })
|
||||
@Index({ properties: ['group', 'isActive'] })
|
||||
@Index({ properties: ['group'] })
|
||||
export class Icon extends BaseEntity {
|
||||
@Property()
|
||||
name!: string;
|
||||
|
||||
@Property()
|
||||
url!: string;
|
||||
|
||||
@Property({ default: true })
|
||||
isActive: boolean = true;
|
||||
|
||||
@ManyToOne(() => Group)
|
||||
group!: Group;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user