15 lines
502 B
TypeScript
15 lines
502 B
TypeScript
import { Entity, Property, ManyToOne, Unique } from '@mikro-orm/core';
|
|
import { BaseEntity } from '../../../common/entities/base.entity';
|
|
import { NotifTitleEnum } from '../interfaces/notification.interface';
|
|
import { NotifChannelEnum } from '../interfaces/notification.interface';
|
|
|
|
@Entity({ tableName: 'notification_preferences' })
|
|
export class NotificationPreference extends BaseEntity {
|
|
|
|
@Property()
|
|
title!: NotifTitleEnum;
|
|
|
|
@Property({ type: 'json' })
|
|
channels: NotifChannelEnum[] = [];
|
|
}
|