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

namespace 智慧物流软件系统
{
    /// <summary>
    /// json配置文件
    /// </summary>
    public class JsConfig
    {
        /// <summary>
        /// mysql链接字符串
        /// </summary>
        public string MySql { get; set; }
        /// <summary>
        /// 货架服务器的Ip和端口号
        /// </summary>
        public string ApiIpHost { get; set; }
        /// <summary>
        /// WebSocket服务器的地址
        /// </summary>
        public string WebSocketUrl { get; set; }

        public List<string> GroupName { get; set; }

        public string DeviceType { get; set; }
        /// <summary>
        /// 系统配置
        /// </summary>
        public JsSysConfig Sys { get; set; }

        /// <summary>
        /// 扫码枪Com口列表
        /// </summary>
        public List<string> ScannerComList { get; set; }
        /// <summary>
        /// 串口扫码枪延时
        /// </summary>
        public int ScannerTimeOut { get; set; }

        public string ModuleCodePattern { get; set; }


        #region 导入相关配置
        //点击导入选择文件时 是否自动加载下载导入模板得路径
        public bool IsLoadingDownloadPath { get; set; } = true;

        public string BatchBindImportTemplatePath { get; set; } = string.Empty;
        #endregion

        #region 盟讯公司配置
        public bool IsMx { get; set; }
        #endregion

        #region 金川公司配置
        //固定码
        public string ChangelessCode { get; set; }

        //预留码
        public string ReservedCode { get; set; }

        //正则 物料编码
        public string RegexMatCode { get; set; }
        //正则 物料数量
        public string RegexMatQty {  get; set; }

        //正则 物料批次
        public string RegexMatBatch { get; set; }
        #endregion
    }

    public class JsSysConfig
    {
        /// <summary>
        /// 是否保存登录历史
        /// </summary>
        public bool IsSaveLogin { get; set; }
        /// <summary>
        /// 登录历史
        /// </summary>
        public List<string> SaveLogin { get; set; }

        public string LastSaveLoginPassword { get; set; }
        /// <summary>
        /// 登录历史数量
        /// </summary>
        public int SaveLoginCount { get; set; }
        /// <summary>
        /// 开机启动
        /// </summary>
        public bool Powerboot { get; set; }
        /// <summary>
        /// 启动全屏
        /// </summary>
        public bool StartupFull { get; set; }
        /// <summary>
        /// 日志保存天数
        /// </summary>
        public int SaveLogDay { get; set; }
    }

}
