import { EventSubscriber } from 'typeorm'

import { HistoryEntitySubscriber } from '@operato/typeorm-history'

import { NotificationRule } from './notification-rule'
import { NotificationRuleHistory } from './notification-rule-history'

@EventSubscriber()
export class NotificationRuleHistoryEntitySubscriber extends HistoryEntitySubscriber<
  NotificationRule,
  NotificationRuleHistory
> {
  public get entity() {
    return NotificationRule
  }

  public get historyEntity() {
    return NotificationRuleHistory
  }
}
