using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Waste.Domain;

namespace Waste.Application
{

    public class DeviceList : W_Device
    { 
        /// <summary>
        /// 商户名称
        /// </summary>
        public string BusinessName { get; set; }
        /// <summary>
        /// ICCID
        /// </summary>
        public string ICCID { get; set; } = "";
        /// <summary>
        /// IMEI
        /// </summary>
        public string IMEI { get; set; } = "";
        /// <summary>
        /// IMSI
        /// </summary>
        public string IMSI { get; set; } = "";
        /// <summary>
        /// 今日测量次数
        /// </summary>
        public int TodayCount { get; set; } = 0;
        /// <summary>
        /// 累计测量次数
        /// </summary>
        public int TotalCount { get; set; } = 0;
        /// <summary>
        /// 今日测量重量
        /// </summary>
        public decimal TodayWeight { get; set; } = 0;
        /// <summary>
        /// 累计测量重量
        /// </summary>
        public decimal TotalWeight { get; set; } = 0;
        /// <summary>
        /// 最近心跳时间
        /// </summary>
        public DateTime? LastBeatTime { get; set; }
        /// <summary>
        /// 网络状态,0-离线,1-在线,规则:最新测量时间、最近心跳时间在16分钟之内则是在线
        /// </summary>
        public int NetStatus { get; set; } = 0;
        /// <summary>
        /// 信号强度,分为5格信号,算法为:31/6
        /// </summary>
        public string sign { get; set; }
    }
    /// <summary>
    /// 设备批量操作
    /// </summary>
    public class DeviceBatchModel
    {
        /// <summary>
        /// 服务商ID
        /// </summary>
        public Guid BusinessId { get; set; }
        /// <summary>
        /// 操作类型,1-分配,2-回收
        /// </summary>
        public int type { get; set; }
        /// <summary>
        /// 设备ID列表
        /// </summary>
        public List<Guid> codes { get; set; }
    }
    /// <summary>
    /// 设备信息提交
    /// </summary>
    public class DeviceSubmit:W_Device
    {
        /// <summary>
        /// 设备对应的SecretHash
        /// </summary>
        public string SecretHash { get; set; }
        /// <summary>
        /// 设备对应的DevId
        /// </summary>
        public string DevId { get; set; }
        /// <summary>
        /// 设备对应的Secret
        /// </summary>
        public string Secret { get; set; }
    }
}
