package service

import (
	"be.ems/src/modules/ne_data/model"
	"be.ems/src/modules/ne_data/repository"
)

// 实例化数据层 AlarmForwardLog 结构体
var NewAlarmForwardLog = &AlarmForwardLog{
	alarmForwardLogRepository: repository.NewAlarmForwardLog,
}

// AlarmForwardLog 告警转发记录表 服务层处理
type AlarmForwardLog struct {
	alarmForwardLogRepository *repository.AlarmForwardLog // 告警转发记录信息
}

// FindByPage 根据条件分页查询
func (r AlarmForwardLog) FindByPage(query model.AlarmForwardLogQuery) ([]model.AlarmForwardLog, int64) {
	return r.alarmForwardLogRepository.SelectByPage(query)
}

// Insert 插入数据
func (r AlarmForwardLog) Insert(item model.AlarmForwardLog) int64 {
	return r.alarmForwardLogRepository.Insert(item)
}
