using CounterDrone.Core.Models;
using SQLite;

namespace CounterDrone.Core.Models
{
    /// <summary>无人机规格（基础数据模板）</summary>
    [Table("DroneSpec")]
    public class DroneSpec
    {
        [PrimaryKey]
        public string Id { get; set; } = "";
        public string Name { get; set; } = "";
        public int DroneType { get; set; }
        /// <summary>型号名称（非 3D 模型文件。3D 模型引用见 ModelId）</summary>
        public string Model { get; set; } = "";
        public string Description { get; set; } = "";
        public int PowerType { get; set; }
        public double Wingspan { get; set; }
        public double TypicalSpeed { get; set; }
        public double TypicalAltitude { get; set; }

        /// <summary>3D 模型 ID（FK → ModelInfo），Unity 可视化用</summary>
        public string ModelId { get; set; } = "";

        public ScenarioDrone ToScenarioDrone(string waveId = "default")
        {
            return new ScenarioDrone
            {
                DroneSpecId = Id,
                WaveId = waveId,
                Quantity = 1,
            };
        }
    }
}
