using Hotline.Repository.SqlSugar.DataPermissions;
using Hotline.Settings;
using Hotline.Settings.TimeLimitDomain.Repository;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XF.Domain.Dependency;

namespace Hotline.Repository.SqlSugar.ExpireTime;
public class TimeLimitSettingInventoryRepository : BaseRepository<TimeLimitSettingInventory>, ITimeLimitSettingInventoryRepository, IScopeDependency
{
    public TimeLimitSettingInventoryRepository(ISugarUnitOfWork<HotlineDbContext> uow, IDataPermissionFilterBuilder dataPermissionFilterBuilder, IServiceProvider serviceProvider) : base(uow, dataPermissionFilterBuilder, serviceProvider)
    {
    }

    public async Task<TimeLimitSettingInventory?> GetByCode(string code)
    {
        return await base.Queryable().Where(m => m.Code == code).FirstAsync();
    }
}

