using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using JuSNS.Model;

namespace JuSNS.SQLServer
{
    public interface ICommon
    {
        /// <summary>
        /// 写用户操作日志
        /// </summary>
        /// <param name="Trans"></param>
        /// <param name="action"></param>
        /// <returns></returns>
        int UserDyn(SqlTransaction trans, int ID, int appID, string dynType, int UserID, int bUserID,int cID, string Descript, string infoarr);
        /// <summary>
        /// 写管理员操作日志
        /// </summary>
        /// <param name="Trans"></param>
        /// <param name="action"></param>
        /// <returns></returns>
        int AdminLog(SqlTransaction trans, EnumAdminAction action);
        /// <summary>
        /// 发送一个请求
        /// </summary>
        /// <param name="trans"></param>
        /// <param name="reqtype"></param>
        /// <param name="sender"></param>
        /// <param name="receiver"></param>
        /// <param name="correspondid"></param>
        /// <returns></returns>
        int SendRequest(SqlTransaction trans, EnumRequestType reqtype, int sender, int receiver, params int[] correspondid);
        /// <summary>
        /// 发送一个通知
        /// </summary>
        /// <param name="trans"></param>
        /// <param name="notifytype"></param>
        /// <param name="sender">和通知相关的人</param>
        /// <param name="receiver"></param>
        /// <param name="notice"></param>
        /// <param name="correspondid"></param>
        /// <returns></returns>
        int Notify(SqlTransaction trans, EnumNotifyType notifytype, int sender, int receiver, string notice, params int[] correspondid);
    }
}
