using Edu.Model.Entity.Log;
using Edu.Model.ViewModel.Log;
using Edu.Repository.Log;
using System;
using System.Collections.Generic;
using System.Text;

namespace Edu.Module.Log
{
    /// <summary>
    /// 流程修改日志处理类
    /// </summary>
    public class FlowLogModule
    {
        /// <summary>
        /// 流程修改日志仓储层对象
        /// </summary>
        private readonly RB_Flow_LogRepository flow_LogRepository = new RB_Flow_LogRepository();

        /// <summary>
        /// 获取流程修改日志列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public List<RB_Flow_Log_ViewModel> GetFlowLogListModule(RB_Flow_Log_ViewModel query)
        {
            return flow_LogRepository.GetFlowLogListRepository(query);
        }

        /// <summary>
        /// 获取流程修改日志分页列表
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="rowsCount"></param>
        /// <param name="query"></param>
        /// <returns></returns>
        public List<RB_Flow_Log_ViewModel> GetFlowLogPageListModule(int pageIndex, int pageSize, out long rowsCount, RB_Flow_Log_ViewModel query)
        {
            return flow_LogRepository.GetFlowLogPageListRepository(pageIndex, pageSize, out rowsCount, query);
        }

        /// <summary>
        /// 新增流程修改日志
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool AddFlowLog(RB_Flow_Log model)
        {
            return flow_LogRepository.AddFlowLogRepository(model);
        }
    }
}
