using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OpenAuth.Repository.Domain
{
    /// <summary>
    /// 任务表
    /// </summary>
    [SugarTable("lasa_task")]
    public class LasaTask
    {
        /// <summary>
        /// id
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, ColumnName = "Id")]
        public string Id { get; set; }

        /// <summary>
        /// 任务名称
        /// </summary>
        public string TaskName { get; set; }
        
        public string CreateUserName { get; set; }

        /// <summary>
        /// 任务类型  "0":"立即任务","1":"定时任务" 2 条件任务
        /// </summary>
        public int? TaskType { get; set; }

        
        public string TaskAirLineName { get; set; }
        
        public string TaskDronePortName { get; set; }
        
        /// <summary>
        /// 执行机场
        /// </summary>
        public string TaskDronePort { get; set; }

        /// <summary>
        /// 机场航线
        /// </summary>
        public string TaskAirLine { get; set; }

        /// <summary>
        /// 返航高度
        /// </summary>
        public int? ReturnAltitude { get; set; }

        /// <summary>
        /// 返航失控动作
        /// </summary>
        public int? LossOfControlAction { get; set; }

        /// <summary>
        /// 续飞模式
        /// </summary>
        public string ContinuationMode { get; set; }

        /// <summary>
        /// AI巡检
        /// </summary>
        public string AIInspection { get; set; }

        /// <summary>
        /// 状态  0-待执行任务 1-任务执行中 2-任务执行失败 3. 任务挂起（挂起的任务超时后，怎么处理？） 5. 成功
        /// </summary>
        public int? Status { get; set; }

        /// <summary>
        /// 周期公式
        /// </summary>
        public string PeriodicFormula { get; set; }

        /// <summary>
        /// 航线id
        /// </summary>
        public string AirLineId { get; set; }

        public long CreateId { get; set; }
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 航线精度类型
        /// </summary>
        public int? WaylinePrecisionType { get; set; }

        public DateTime? ScheduledStartTime { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public DateTime? ScheduledEndTime { get; set; }

        /// <summary>
        /// 实际开始时间
        /// </summary>
        public DateTime? ExecuteTime { get; set; }

        /// <summary>
        /// 实际结束时间
        /// </summary>
        public DateTime? CompletedTime { get; set; }

        /// <summary>
        ///计划执行时长
        /// </summary>
        public long PlanExecuteDuration { get; set; }

        /// <summary>
        /// 实际执行时长 todo  后面看实际情况修改
        /// </summary>
        public long ActualExecuteDuration { get; set; }

        /// <summary>
        /// 项目id
        /// </summary>
        public string WorkspaceId { get; set; }

        /// <summary>
        /// 期望媒体数量
        /// </summary>
        public int? ExpectedFileCount { get; set; }

        /// <summary>
        /// 已上传媒体数量
        /// </summary>
        public int? UploadedFileCount { get; set; }
        
        public string FlightId { get; set; }
        
        public string? Reason { get; set; }
        
        public int? FlightTaskType { get; set; }
        
        public string ExternalTaskId { get; set; }
        
        public string BreakPoint { get; set; }
    }
}