using Sugar.Enties;
using System;


public class AlarmInfoPlateLogManager : DbContext<AlarmInfoPlateLog>
{
    private NLog.Logger logger;


    public AlarmInfoPlateLogManager()
    {
        logger = NLog.LogManager.GetCurrentClassLogger();
    }

    /// <summary>
    /// 添加推送信息
    /// </summary>
    /// <param name="dto">需要插入的数据</param>
    /// <returns></returns>
    public string InsertAlarmInfoPlateLog(string request_msg)
    {
        Db.BeginTran();
        try
        {
            AlarmInfoPlateLog alarmInfoPlateLoginfo = new AlarmInfoPlateLog();
            alarmInfoPlateLoginfo.PlateInfo = request_msg;
            alarmInfoPlateLoginfo.date = DateTime.Now;

            Db.Insertable(alarmInfoPlateLoginfo).ExecuteReturnEntity();


            Db.CommitTran();
            return "success";
        }
        catch (Exception ex)
        {
            Db.RollbackTran();
            throw;
        }
    }
}
