using JiShe.CollectBus.Common.Enums;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JiShe.CollectBus.Protocol.Contracts.Protocol.Dto
{
    public class AnalysisBaseDto
    {

        /// <summary>
        /// 是否有效数据
        /// </summary>
        public bool ValidData { get; set; } = true;

        /// <summary>
        /// 数据类型
        /// </summary>
        public string DataType { get; set; } = null!;

        /// <summary>
        /// 错误码信息
        /// </summary>
        public string? ErrorCodeMsg { get; set; }

        /// <summary>
        /// 字段名
        /// </summary>
        public string? FiledName { get; set; }

        /// <summary>
        /// 字段描述
        /// </summary>
        public string? FiledDesc { get; set; }

        /// <summary>
        /// 数据时标
        /// </summary>
        public DateTime? TimeSpan { get; set; }

        /// <summary>
        /// 项目Id
        /// </summary>
        public int ProjectId { get; set; }

        /// <summary>
        /// 电表ID
        /// </summary>
        public int MeterId { get; set; }

        /// <summary>
        /// 表类型
        /// </summary>
        public MeterTypeEnum MeterType { get; set;}


        /// <summary>
        /// 数据业务库ID
        /// </summary>
        public int DatabaseBusiID { get; set; }

        /// <summary>
        /// 表地址
        /// </summary>
        public string MeterAddress { get; set; } = null!;

    }

    public class AnalysisBaseDto<T> : AnalysisBaseDto 
    {
         /// <summary>
         /// 抄读值
         /// </summary>
         public T? DataValue { get; set; }
    }

}
