using Microsoft.EntityFrameworkCore;
using SportsDivision.Domain.Entities;
using SportsDivision.Domain.Interfaces;
using SportsDivision.Infrastructure.Data;

namespace SportsDivision.Infrastructure.Repositories;

public class PlacementPointConfigRepository : Repository<PlacementPointConfig>, IPlacementPointConfigRepository
{
    public PlacementPointConfigRepository(ApplicationDbContext context) : base(context) { }

    public async Task<PlacementPointConfig?> GetByPlacementAsync(int placement) =>
        await _dbSet.FirstOrDefaultAsync(p => p.Placement == placement);
}
