using CounterDrone.Core.Models;
using SQLite;

namespace CounterDrone.Core.Models
{
    /// <summary>环境规格（基础数据模板）</summary>
    [Table("EnvironmentSpec")]
    public class EnvironmentSpec
    {
        [PrimaryKey]
        public string Id { get; set; } = "";
        public string Name { get; set; } = "";
        public int WeatherType { get; set; }
        public double WindSpeed { get; set; }
        public int WindDirection { get; set; }
        public double Temperature { get; set; } = 20.0;
        public double Humidity { get; set; } = 60.0;
        public double Pressure { get; set; } = 1013.0;
        public double Visibility { get; set; } = 5000.0;

        public CombatScene ToCombatScene()
        {
            return new CombatScene
            {
                WeatherType = WeatherType,
                WindSpeed = WindSpeed,
                WindDirection = WindDirection,
                Temperature = Temperature,
                Humidity = Humidity,
                Pressure = Pressure,
                Visibility = Visibility,
            };
        }
    }
}
