using Hotline.Repository.SqlSugar.DataPermissions;
using Hotline.Share.Dtos.FlowEngine.Workflow;
using Hotline.Snapshot;
using Hotline.Snapshot.IRepository;
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 RedPackAuditRepository : BaseRepository<RedPackAudit>, IRedPackAuditRepository, IScopeDependency
{
    public RedPackAuditRepository(ISugarUnitOfWork<HotlineDbContext> uow, IDataPermissionFilterBuilder dataPermissionFilterBuilder, IServiceProvider serviceProvider) : base(uow, dataPermissionFilterBuilder, serviceProvider)
    {
    }

    public async Task<RedPackAudit> GetByOrderIdAsync(string orderId, CancellationToken cancellationToken)
    {
        return await base.Queryable().Where(m => m.OrderId == orderId).FirstAsync(cancellationToken);
    }
}
