CounterDroneBackend/src/CounterDrone.Core/Repository/RoutePlanRepository.cs
tian ca0ce8aa52 重命名核心模型:TargetConfig→DroneProfile, SimTask→Scenario, TaskFullConfig→ScenarioConfig, TaskId→ScenarioId
- DroneType 枚举清理:移除 Electric/Piston,重编号 HighSpeed=2
- planner_config.json / defaults.json 同步迁移
- 238 单元测试全部通过
2026-06-18 15:02:58 +08:00

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);
}
}
}