using Newtonsoft.Json;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
namespace YLErp.DBModels
{
[Table("flat_price_quotation")]
public class flat_price_quotation : DBModelBase
{
public static string LogClass = "移动客户端平值期权报价";
[DisplayName("简称")]
[NotMapped]
public string ShortName { get; set; }
[JsonIgnore]
[NotMapped]
public int? order { get; set; }
///
/// 板块
///
[NotMapped]
public string AssetType { get; set; }
///
/// 市场代码
///
[DisplayName("市场代码")]
public string MarketCode { get; set; }
///
/// 市场名
///
[DisplayName("市场名")]
public string MarketName { get; set; }
///
/// 标的资产类型
///
[DisplayName("标的资产类型")]
public string UnderlyingType { get; set; }
///
/// 标的资产类型
///
[DisplayName("标的资产类型简称")]
public string UnderlyingTypeShortName { get; set; }
///
/// 标的资产码
///
[DisplayName("标的资产码")]
public string UnderlyingCode { get; set; }
///
/// 创建日期
///
[DisplayName("创建日期")]
public DateTime? OptDate { get; set; }
[NotMapped]
public DateTime? HistoryDate { get; set; }
///
/// 即时价格
///
[DisplayName("即时价格")]
public double? SpotPrice { get; set; }
///
/// 比较前日涨跌平:1-涨,2-跌,3-平
///
[DisplayName("比较前日涨跌平")]
public int? ComparedToLastDayPrice { get; set; }
///
/// 平值买入期权价格
///
[DisplayName("平值买入期权价格")]
public double? BuyOptionPrice { get; set; }
///
/// 平值卖出期权价格
///
[DisplayName("平值卖出期权价格")]
public double? SellOptionPrice { get; set; }
[DisplayName("平值期权买入波动率")]
public double? BuyOptionVol { get; set; }
[DisplayName("平值期权卖出波动率")]
public double? SellOptionVol { get; set; }
///
/// 最后更新时间
///
[DisplayName("最后更新时间")]
public DateTime? LastUpdateTime { get; set; }
public override string ToString()
{
return $"{UnderlyingCode}-{AssetType}";
}
}
[NotMapped]
public class flat_price_quotationDto : flat_price_quotation
{
public string VarietyCode { get; set; }
}
public class flat_price_quotation_group
{
[JsonIgnore]
[NotMapped]
public int? order { get; set; }
public string AssetType { get; set; }
public List flat_price_quotations { get; set; }
}
}