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

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

        public List<Group> GetByType(int groupType)
        {
            return Db.Table<Group>()
                     .Where(g => g.GroupType == groupType)
                     .ToList();
        }
    }
}
