- DroneType 枚举清理:移除 Electric/Piston,重编号 HighSpeed=2 - planner_config.json / defaults.json 同步迁移 - 238 单元测试全部通过
24 lines
694 B
C#
24 lines
694 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using CounterDrone.Core.Models;
|
|
using SQLite;
|
|
|
|
namespace CounterDrone.Core.Repository
|
|
{
|
|
public class RoutePlanRepository : BaseRepository<RoutePlan>
|
|
{
|
|
public RoutePlanRepository(SQLiteConnection db) : base(db) { }
|
|
|
|
public List<RoutePlan> GetByScenarioId(string scenarioId)
|
|
{
|
|
return Db.Table<RoutePlan>().Where(r => r.ScenarioId == scenarioId).ToList();
|
|
}
|
|
|
|
public RoutePlan GetByTaskAndWave(string scenarioId, string waveId)
|
|
{
|
|
return Db.Table<RoutePlan>()
|
|
.FirstOrDefault(r => r.ScenarioId == scenarioId && r.WaveId == waveId);
|
|
}
|
|
}
|
|
}
|