using System.Collections.Generic;
using System.Linq;
using CounterDrone.Core.Models;
using SQLite;

namespace CounterDrone.Core.Repository
{
    public class AmmunitionSpecRepository : BaseRepository<AmmunitionSpec>
    {
        public AmmunitionSpecRepository(SQLiteConnection db) : base(db) { }

        public List<AmmunitionSpec> GetByAerosolType(int aerosolType)
        {
            return Db.Table<AmmunitionSpec>()
                     .Where(a => a.AerosolType == aerosolType)
                     .ToList();
        }
    }
}
