using System;
using ChuPiao.Common.Utils;
namespace ChuPiao.Common.Models
{
	/// <summary>
	/// 键码配置
	/// </summary>
	[Serializable]
	public class M_KeycodeConfigEntity
	{
        public M_KeycodeConfigEntity(string name, string value)
        {
            _k_keycodename = name;
            _k_keycodevalue = value;

            _k_keycodevaluebytes = HexString.StringToByte(value);
        }

        public M_KeycodeConfigEntity()
        { }
		#region Model
		private int _k_id;
        private int _k_keyboardtype = 1002;
		private string _k_keycodename="";
		private string _k_keycodevalue="";
		/// <summary>
		/// 彩票机配置主键ID
		/// </summary>
		public int K_Id
		{
			set{ _k_id=value;}
			get{return _k_id;}
		}
		/// <summary>
		/// 键盘线类别（1001--老线；1002--新线）
		/// </summary>
        public int K_KeyboardType
		{
			set{ _k_keyboardtype=value;}
            get { return _k_keyboardtype; }
		}
		/// <summary>
		/// 键码名称（如：f1）
		/// </summary>
		public string K_KeycodeName
		{
			set{ _k_keycodename=value;}
			get{return _k_keycodename;}
		}
		/// <summary>
		/// 键码对应的十六进制值（如：F4,09,F4）
		/// </summary>
		public string K_KeycodeValue
		{
			set{ _k_keycodevalue=value;}
			get{return _k_keycodevalue;}
		}
		#endregion Model

        #region 扩展属性
        private byte[] _k_keycodevaluebytes;
        /// <summary>
        /// 键码对应的二进制值
        /// </summary>
        public byte[] K_KeycodeValueBytes
        {
            set { _k_keycodevaluebytes = value; }
            get { return _k_keycodevaluebytes; }
        }
        #endregion

    }
}

