using System;
using SQLite;

namespace CounterDrone.Core.Models
{
    /// <summary>步骤3：装备部署</summary>
    [Table("EquipmentDeployment")]
    public class EquipmentDeployment
    {
        [PrimaryKey]
        public string Id { get; set; } = Guid.NewGuid().ToString();

        [Indexed]
        public string TaskId { get; set; } = string.Empty;

        public int EquipmentRole { get; set; } = (int)Models.EquipmentRole.LaunchPlatform;

        public int Quantity { get; set; } = 1;

        public string GroupId { get; set; } = string.Empty;

        // 发射平台专用
        public int? PlatformType { get; set; }

        public double PositionX { get; set; }
        public double PositionY { get; set; }
        public double PositionZ { get; set; }

        public int? AerosolType { get; set; }

        public int? MunitionCount { get; set; }

        /// <summary>火炮/发射器数量（null=1）</summary>
        public int? GunCount { get; set; }

        /// <summary>每门炮的火力通道数（null=1）</summary>
        public int? ChannelsPerGun { get; set; }

        /// <summary>同一通道连发最小间隔秒（null=1）</summary>
        public double? ChannelInterval { get; set; }

        public int Source { get; set; } = (int)ConfigSource.Manual;

        public double? MuzzleVelocity { get; set; }

        public double? ReleaseAltitude { get; set; }

        public double Cooldown { get; set; } = 5.0;

        /// <summary>空基平台巡航速度 m/s（地基为 NULL）</summary>
        public double? CruiseSpeed { get; set; }

        // 探测设备专用
        public double? DetectionRadius { get; set; }
    }
}
