using System;
using System.Collections.Generic;
using ChuPiao.AutoPrint.Machine.Models;
using ChuPiao.Common.Models;

namespace ChuPiao.AutoPrint.Services.OpenCode
{
    public interface IOpenCodeResult
    {
        /// <summary>
        /// 抓取的原始数据
        /// </summary>
        CaptureDataInfo CaptureData { get; set; }
        /// <summary>
        /// 解析是否成功
        /// </summary>
        bool DecodeSuccess { get; set; }
        /// <summary>
        /// 解析错误信息
        /// </summary>
        string ErrorMessage { get; set; }

        /// <summary>
        /// 彩种
        /// </summary>
        string LotName { get; set; }

        /// <summary>
        /// 报表日期
        /// </summary>
        DateTime ReportDate { get; set; }
        /// <summary>
        /// 查询时间
        /// </summary>
        DateTime QueryTime { get; set; }
        /// <summary>
        /// 起始奖期
        /// </summary>
        string BeginExpect { get; set; }
        /// <summary>
        /// 终止奖期
        /// </summary>
        string EndExpect { get; set; }

        /// <summary>
        /// 开奖号码列表
        /// </summary>
        List<OpenCodeEntity> OpenCodeList { get; set; } 
    }
    /// <summary>
    /// 开奖号码解析结果
    /// </summary>
    public class OpenCodeResult : IOpenCodeResult
    {
        #region Implementation of IOpenCodeResult

        private CaptureDataInfo _captureData;

        private bool _decodeSuccess;

        private string _errorMessage;

        private string _lotName="";

        private DateTime _reportDate;

        private DateTime _queryTime;

        private string _beginExpect="";

        private string _endExpect="";

        private List<OpenCodeEntity> _openCodeList=new List<OpenCodeEntity>();

        /// <summary>
        /// 抓取的原始数据
        /// </summary>
        public CaptureDataInfo CaptureData
        {
            get { return _captureData; }
            set { _captureData = value; }
        }

        /// <summary>
        /// 解析是否成功
        /// </summary>
        public bool DecodeSuccess
        {
            get { return _decodeSuccess; }
            set { _decodeSuccess = value; }
        }

        /// <summary>
        /// 解析错误信息
        /// </summary>
        public string ErrorMessage
        {
            get { return _errorMessage; }
            set { _errorMessage = value; }
        }

        /// <summary>
        /// 彩种
        /// </summary>
        public string LotName
        {
            get { return _lotName; }
            set { _lotName = value; }
        }

        /// <summary>
        /// 报表日期
        /// </summary>
        public DateTime ReportDate
        {
            get { return _reportDate; }
            set { _reportDate = value; }
        }

        /// <summary>
        /// 查询时间
        /// </summary>
        public DateTime QueryTime
        {
            get { return _queryTime; }
            set { _queryTime = value; }
        }

        /// <summary>
        /// 起始奖期
        /// </summary>
        public string BeginExpect
        {
            get { return _beginExpect; }
            set { _beginExpect = value; }
        }

        /// <summary>
        /// 终止奖期
        /// </summary>
        public string EndExpect
        {
            get { return _endExpect; }
            set { _endExpect = value; }
        }

        /// <summary>
        /// 开奖号码列表
        /// </summary>
        public List<OpenCodeEntity> OpenCodeList
        {
            get { return _openCodeList; }
            set { _openCodeList = value; }
        }

        #endregion
    }
}
