using System.Collections.Generic; using CounterDrone.Core.Models; using SQLite; namespace CounterDrone.Core.Models { /// 火力单元规格(基础数据模板) [Table("FireUnitSpec")] public class FireUnitSpec { [PrimaryKey] public string Id { get; set; } = ""; public string Name { get; set; } = ""; public int PlatformType { get; set; } public int GunCount { get; set; } = 1; public int ChannelsPerGun { get; set; } = 1; public double ChannelInterval { get; set; } = 1.0; public double Cooldown { get; set; } = 5.0; public double AmmoChangeTime { get; set; } = 30.0; public double MuzzleVelocity { get; set; } public double CruiseSpeed { get; set; } public double ReleaseAltitude { get; set; } /// 3D 模型 ID(FK → ModelInfo),Unity 可视化用 public string ModelId { get; set; } = ""; [Ignore] public List AmmoTypes { get; set; } = new(); public double RadarRange { get; set; } public double EORange { get; set; } public double IRRange { get; set; } public double? MinElevation { get; set; } public double? MaxElevation { get; set; } public double? MinDetectAlt { get; set; } public double? MaxDetectAlt { get; set; } public ScenarioUnit ToScenarioUnit(AerosolType ammoType, int quantity, double posX, double posY, double posZ) { return new ScenarioUnit { LaunchPlatformSpecId = Id, EquipmentRole = (int)Models.EquipmentRole.LaunchPlatform, Quantity = quantity, PositionX = posX, PositionY = posY, PositionZ = posZ, AerosolType = (int)ammoType, MunitionCount = GunCount * ChannelsPerGun * quantity, }; } } }