using Hotline.Orders;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XF.Domain.Repository;

namespace Hotline.Early
{
    public class EarlyWarningOrder: PositionEntity
    {
        /// <summary>
        /// 预警设置ID
        /// </summary>
        public string EarlyWarningSettingId { get; set; }

        /// <summary>
        /// 预警设置
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(EarlyWarningSettingId))]
        public EarlyWarningSetting EarlyWarningSetting { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 最后预警时间
        /// </summary>
        public DateTime LastEarlyTime { get; set; }
        
        /// <summary>
        /// 预警明细
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(EarlyWarningOrderDetail.EarlyWarningOrderId))]
        public List<EarlyWarningOrderDetail> EarlyWarningOrderDetails { get; set; }
    }
}
