using SQLite;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FLY.FilmCasting.AutoDie.Server.Model
{
    /// <summary>
    /// 厚度记录
    /// </summary>
    [Table("ThickHeat")]
    public class Db_ThickHeat : IDbBase
    {
        [Key]
        [Index]
        [PropertyIndex(0)]
        public Int64 ID { get; set; }

        /// <summary>
        /// 测厚仪过来的 scandata id，用于画面显示，与扫描图一致
        /// </summary>
        [PropertyIndex(1)]
        public Int64 ScanDataID { get; set; }

        [Index]
        [PropertyIndex(2)]
        public Int64 ProfileID { get; set; }

        [Index]
        [Time]
        [PropertyIndex(3)]
        public DateTime Time { get; set; }

        [PropertyIndex(4)]
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 目标值
        /// </summary>
        [PropertyIndex(5)]
        public double Target { get; set; }

        /// <summary>
        /// 规格线% ，最后规格值为目标值*TolerancePercent 
        /// </summary>
        [PropertyIndex(6)]
        public double TolerancePercent { get; set; }

        [PropertyIndex(7)]
        public double K { get; set; }

        [PropertyIndex(8)]
        public double B { get; set; }

        [PropertyIndex(9)]
        public double FilmPosition { get; set; }

        [PropertyIndex(10)]
        public double FilmVelocity { get; set; }

        /// <summary>
        /// 膜宽度 mm
        /// </summary>
        [PropertyIndex(11)]
        public int FilmWidth { get; set; }

        /// <summary>
        /// 厚度均值
        /// </summary>
        [PropertyIndex(12)]
        public double Avg { get; set; }

        [PropertyIndex(13)]
        public string Thicks { get; set; }

        [PropertyIndex(14)]
        public string SampleADs { get; set; }

        [PropertyIndex(15)]
        public string BoltMapInfo { get; set; }

        /// <summary>
        /// 膜距离 m
        /// </summary>
        [PropertyIndex(16)]
        public double FilmLength { get; set; }

        /// <summary>
        /// 分区表, Thicks 是还没分区前的数据
        /// </summary>
        [PropertyIndex(17)]
        public string Boltmap { get; set; }

        /// <summary>
        /// 加热生效
        /// </summary>
        [PropertyIndex(18)]
        public bool IsStable { get; set; }

        /// <summary>
        /// 开始改变加热时间
        /// </summary>
        [PropertyIndex(19)]
        public DateTime HTime { get; set; }

        /// <summary>
        /// 1幅加热数据 % 
        /// </summary>
        [PropertyIndex(20)]
        public string Heats { get; set; }
    }
}
