using Hotline.Repository.SqlSugar.DataPermissions;
using Hotline.Snapshot;
using Hotline.Snapshot.Interfaces;
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.Snapshot;
public class GuiderInfoRepository : BaseRepository<GuiderInfo>, IGuiderInfoRepository, IScopeDependency
{
    public GuiderInfoRepository(ISugarUnitOfWork<HotlineDbContext> uow, IDataPermissionFilterBuilder dataPermissionFilterBuilder, IServiceProvider serviceProvider) : base(uow, dataPermissionFilterBuilder, serviceProvider)
    {
    }

    public async Task<GuiderInfo> GetByPhoneNumberAsync(string phoneNumber)
    {
        return await Queryable().Where(m => m.PhoneNumber == phoneNumber).FirstAsync();
    }
}
