using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XPrintServer.Business.Services.Interface;
using XPrintServer.DataModel;
using XPrintServer.DataModel.Models;

namespace XPrintServer.Business.Services
{
    public class ActionLogService : SqlSugarRepository<ActionLog>, IBusinessService
    {
        public ActionLogService(ConnectionConfig config) : base(config)
        {
        }

        public async Task AddActionLog(ActionLog log)
        {
            log.DateTime = DateTime.Now;
            log.CreateTime = DateTime.Now;
            await Context.Insertable(log).SplitTable().ExecuteCommandAsync().ConfigureAwait(false);
        }
    }
}
