DBTable.cs 4.81 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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.Thick.Blowing.Server.Model
{
    /// <summary>
    /// 订单记录
    /// </summary>
    [Table("Profile")]
潘栩锋's avatar
潘栩锋 committed
16
    public class Db_Profile
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
    {
        [Key]
        [PropertyIndex(0)]
        public Int64 ID { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [PropertyIndex(1)]
        public string PName { get; set; }

        /// <summary>
        /// 订单号
        /// </summary>
        [PropertyIndex(2)]
        public string OrderNo { get; set; }

        /// <summary>
        /// 卷号
        /// </summary>
        [PropertyIndex(3)]
        public string Number { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        [PropertyIndex(4)]
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        [PropertyIndex(5)]
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 已经结束
        /// </summary>
        [PropertyIndex(6)]
        public bool IsFinished { get; set; }

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

        /// <summary>
        /// 工艺%
        /// </summary>
        [PropertyIndex(8)]
        public double TolerancePercent { get; set; }

    }

    /// <summary>
潘栩锋's avatar
潘栩锋 committed
73
    /// 横向厚度记录
74 75
    /// </summary>
    [Table("ScanData")]
潘栩锋's avatar
潘栩锋 committed
76
    public class Db_ScanData
77 78 79 80 81 82 83 84
    {
        [Key]
        [PropertyIndex(0)]
        public Int64 ID { get; set; }

        /// <summary>
        /// 测量数据开始时间
        /// </summary>
85
        [PropertyIndex(1)]
86 87 88 89 90
        public DateTime Time { get; set; }

        /// <summary>
        /// 测量数据结束时间
        /// </summary>
91
        [PropertyIndex(2)]
92 93 94 95 96
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 旋转方向 是反向
        /// </summary>
97
        [PropertyIndex(3)]
98 99 100 101 102
        public bool IsBackw { get; set; }

        /// <summary>
        /// 旋转1周的时间 min
        /// </summary>
103
        [PropertyIndex(4)]
104 105 106 107 108
        public double RPeriod { get; set; }

        /// <summary>
        /// 旋转次数
        /// </summary>
109
        [PropertyIndex(5)]
110 111 112 113 114
        public int RCnt { get; set; }

        /// <summary>
        /// 复位区号
        /// </summary>
115
        [PropertyIndex(6)]
116 117 118 119 120
        public int OrgBoltNo { get; set; }

        /// <summary>
        /// 旋转角度 °
        /// </summary>
121
        [PropertyIndex(7)]
122 123 124 125 126
        public double RAngle { get; set; }

        /// <summary>
        /// 膜距离 m
        /// </summary>
127
        [PropertyIndex(8)]
128 129 130 131 132
        public double FilmLength { get; set; }

        /// <summary>
        /// 线速度
        /// </summary>
133
        [PropertyIndex(9)]
134 135 136 137 138
        public double FilmVelocity { get; set; }

        /// <summary>
        /// 斜率补偿
        /// </summary>
139
        [PropertyIndex(10)]
140 141 142 143 144
        public double K { get; set; }

        /// <summary>
        /// 1幅数据
        /// </summary>
145
        [PropertyIndex(11)]
146 147 148 149 150
        public string Thicks { get; set; }

        /// <summary>
        /// 分区表
        /// </summary>
151
        [PropertyIndex(12)]
152 153 154
        public string Boltmap { get; set; }
    }

潘栩锋's avatar
潘栩锋 committed
155 156 157 158
    /// <summary>
    /// 纵向厚度记录
    /// </summary>
    [Table("TrendData")]
潘栩锋's avatar
潘栩锋 committed
159
    public class Db_TrendData
潘栩锋's avatar
潘栩锋 committed
160 161 162 163 164 165 166 167 168 169
    {
        [Key]
        [PropertyIndex(0)]
        public Int64 ID { get; set; }

        /// <summary>
        /// 测量数据开始时间
        /// </summary>
        [PropertyIndex(1)]
        public DateTime Time { get; set; }
170

潘栩锋's avatar
潘栩锋 committed
171 172 173
        /// <summary>
        /// 斜率补偿
        /// </summary>
潘栩锋's avatar
潘栩锋 committed
174
        [PropertyIndex(2)]
潘栩锋's avatar
潘栩锋 committed
175 176 177
        public double K { get; set; }

        /// <summary>
潘栩锋's avatar
潘栩锋 committed
178 179 180
        /// 追边时,1分钟1次,1秒一个数据,60个数据
        /// 扫描时,一趟1次,分为螺丝总数/2 个数据
        /// 需要时,可以计算这样数据的sigma
潘栩锋's avatar
潘栩锋 committed
181
        /// </summary>
潘栩锋's avatar
潘栩锋 committed
182
        [PropertyIndex(3)]
潘栩锋's avatar
潘栩锋 committed
183 184
        public string Thicks { get; set; }
    }
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210

    /// <summary>
    /// 信号记录
    /// </summary>
    [Table("Sample")]
    public class Db_Sample
    {
        /// <summary>
        /// key
        /// </summary>
        [Key]
        [PropertyIndex(0)]
        public Int64 ID { get; set; }

        /// <summary>
        /// 撞转向信号时间
        /// </summary>
        [PropertyIndex(1)]
        public DateTime Time { get; set; }

        /// <summary>
        /// 样品AD int[]
        /// </summary>
        [PropertyIndex(2)]
        public string SampleADs { get; set; }
    }
211
}