using System; namespace Muchinfo.MTPClient.Data.Model { /// /// Goods类 /// public class Goods : GoodsBase { #region Fields /// /// 公司代码 /// private string _companyCode; /// /// 报价小数位数 /// private int _decimalPlaces; /// /// 上市日期 /// private string _listingDate; /// /// 上市状态 /// private string _listingStatus; /// /// 每手单位 /// private int _lotUnit; /// /// 商品名称 /// private string _name; /// /// 官方行业代码 /// private string _officialSector; /// /// 报价货币 /// private string _quoteCurrency; /// /// 报价单位 /// private string _quoteUnit; /// /// 关联代码 /// private string _relevanceCode; /// /// 商品行业编号 /// private string _sectorCode; /// /// 商品类型 /// private string _sort; #endregion Fields #region Constructors /// /// 实例化一个商品 /// /// 交易所代码 /// 商品代码 /// 商品行情代码 public Goods(string exchangeCode, string goodscode, string goodsHqCode) : base(exchangeCode, goodscode, goodsHqCode) { } #endregion Constructors #region Properties #region Public Properties /// /// 获取或设置公司代码 /// public string CompanyCode { get { return _companyCode; } set { Set(() => CompanyCode, ref _companyCode, value); } } /// /// 获取或设置报价小数位数 /// public int DecimalPlaces { get { return _decimalPlaces; } set { Set(() => DecimalPlaces, ref _decimalPlaces, value); } } /// /// 获取或设置上市日期 /// public string ListingDate { get { return _listingDate; } set { Set(() => ListingDate, ref _listingDate, value); } } /// /// 获取或设置上市状态 /// public string ListingStatus { get { return _listingStatus; } set { Set(() => ListingStatus, ref _listingStatus, value); } } /// /// 获取或设置每手数量(单位) /// public int LotUnit { get { return _lotUnit; } set { Set(() => LotUnit, ref _lotUnit, value); } } /// /// 获取或设置商品名称 /// public string Name { get { return _name; } set { Set(() => Name, ref _name, value); } } /// /// 获取或设置官方行业代码 /// public string OfficialSector { get { return _officialSector; } set { Set(() => OfficialSector, ref _officialSector, value); } } /// /// 获取或设置报价货币 /// public string QuoteCurrency { get { return StringDisplay(_quoteCurrency); } set { Set(() => QuoteCurrency, ref _quoteCurrency, value); } } /// /// 获取或设置报价单位 比如每斤猪肉多少钱 /// public string QuoteUnit { get { return StringDisplay(_quoteUnit); } set { Set(() => QuoteUnit, ref _quoteUnit, value); } } /// /// 获取或设置关联代码 /// public string RelevanceCode { get { return _relevanceCode; } set { Set(() => RelevanceCode, ref _relevanceCode, value); } } /// /// 获取或设置商品行业编号 /// public string SectorCode { get { return _sectorCode; } set { Set(() => SectorCode, ref _sectorCode, value); } } /// /// 获取或设置商品类型 /// public string Sort { get { return _sort; } set { Set(() => Sort, ref _sort, value); } } #endregion Public Properties #region 行情数据 /// /// 最后修改时间 /// public DateTime LastModifyTime { get; set; } /// /// 基准价格 /// public decimal BasePrice { get; set; } /// /// 交易保证金 /// public decimal MarginRate { get; set; } /// /// 市场代码 /// public string MarketCode { get; set; } /// /// 市场ID、NEW /// public uint MarketID { get; set; } public decimal MinFluctuation { get; set; } #endregion #endregion Properties #region Methods #region Public Methods /// /// 商品字符串表示,通常出现在自选股界面中 /// /// public override string ToString() { return _name; } #endregion Public Methods /// /// The default string /// protected static readonly string DefaultString = "-"; /// /// Strings the display. /// /// The value. /// System.String. protected string StringDisplay(string value) { if (string.IsNullOrWhiteSpace(value)) { return DefaultString; } return value; } #endregion Methods #region Other //private int m_SubType; ///// ///// 获取或设置商品子类型 ///// //public int Sort2 //{ // get { return m_SubType; } // set // { // if (!value.Equals(m_SubType)) // { // m_SubType = value; // } // } //} //private decimal m_MinimumFluctuation; ///// ///// 获取或设置最小变动价位(最低价格波幅) ///// ///// ///// 最低价格波幅,指买卖商品在交易过程中价格波动的最小范围,这通常和报价小数有关 ///// //public decimal MinimumFluctuation //{ // get { return m_MinimumFluctuation; } // set { m_MinimumFluctuation = value; } //} #endregion Other } }