using IRaCIS.Core.Domain.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;

namespace IRaCIS.Core.Domain.Models
{

    [Comment("分割")]
    [Table("Segment")]
    public class Segment : BaseFullDeleteAuditEntity, ISegment
    {
        #region 导航属性
        [JsonIgnore]
        [Comment("分割分组")]
        [ForeignKey("SegmentationId")]

        public Segmentation Segmentation { get; set; }
        #endregion

        /// <summary>
        /// 分割Id
        /// </summary>
        public Guid SegmentationId { get; set; }

        /// <summary>
        /// 任务Id
        /// </summary>
        public Guid VisitTaskId { get; set; }

        /// <summary>
        /// 分割的序号
        /// </summary>
        public int SegmentNumber { get; set; }

        /// <summary>
        /// 分割的Json
        /// </summary>
        [MaxLength]
        public string SegmentJson { get; set; } = string.Empty;

        /// <summary>
        /// SegmentName
        /// </summary>
        public string SegmentName { get; set; } = string.Empty;

        /// <summary>
        /// 颜色
        /// </summary>
        public string ColorRgb { get; set; } = string.Empty;

        /// <summary>
        /// 均值
        /// </summary>
        public decimal? AvgValue { get; set; }

        /// <summary>
        /// 最大值
        /// </summary>
        public decimal? MaxValue { get; set; }

        /// <summary>
        /// 最小值
        /// </summary>
        public decimal? MinValue { get; set; }

        /// <summary>
        /// 方差
        /// </summary>
        public decimal? Variance { get; set; }

        /// <summary>
        /// 中位数
        /// </summary>
        public decimal? Median { get; set; }

        /// <summary>
        /// 体积
        /// </summary>
        public decimal? Volume { get; set; }

        /// <summary>
        /// 长径
        /// </summary>
        public decimal? MajorAxis { get; set; }

        /// <summary>
        /// 短径
        /// </summary>
        public decimal? ShortAxis { get; set; }

        /// <summary>
        /// Peak
        /// </summary>
        public decimal? Peak { get; set; }

        /// <summary>
        /// TLG
        /// </summary>
        public decimal? TLG { get; set; }

        /// <summary>
        /// MTV
        /// </summary>
        public decimal? MTV { get; set; }

        /// <summary>
        /// 是否锁定
        /// </summary>
        public bool IsLock { get; set; } = false;

    }


    /// <summary>
    /// 继承这个接口  因为版本里面需要复制这个表的数据
    /// </summary>
    public interface ISegment
    {
        /// <summary>
        /// 分割Id
        /// </summary>
        Guid SegmentationId { get; set; }

        /// <summary>
        /// 任务Id
        /// </summary>
        Guid VisitTaskId { get; set; }

        /// <summary>
        /// 分割的序号
        /// </summary>
        public int SegmentNumber { get; set; }

        /// <summary>
        /// 分割的Json
        /// </summary>
        string SegmentJson { get; set; }
        /// <summary>
        /// SegmentName
        /// </summary>
        string SegmentName { get; set; }

        /// <summary>
        /// 颜色
        /// </summary>
        string ColorRgb { get; set; }

        /// <summary>
        /// 均值
        /// </summary>
        decimal? AvgValue { get; set; }

        /// <summary>
        /// 最大值
        /// </summary>
        decimal? MaxValue { get; set; }

        /// <summary>
        /// 最小值
        /// </summary>
        decimal? MinValue { get; set; }

        /// <summary>
        /// 方差
        /// </summary>
        decimal? Variance { get; set; }

        /// <summary>
        /// 中位数
        /// </summary>
        decimal? Median { get; set; }

        /// <summary>
        /// 体积
        /// </summary>
        decimal? Volume { get; set; }

        /// <summary>
        /// 长径
        /// </summary>
        decimal? MajorAxis { get; set; }

        /// <summary>
        /// 短径
        /// </summary>
        decimal? ShortAxis { get; set; }

        /// <summary>
        /// Peak
        /// </summary>
        decimal? Peak { get; set; }

        /// <summary>
        /// TLG
        /// </summary>
        decimal? TLG { get; set; }

        /// <summary>
        /// MTV
        /// </summary>
        decimal? MTV { get; set; }

        /// <summary>
        /// 是否锁定
        /// </summary>
        bool IsLock { get; set; }
    }
}
