using System.ComponentModel.DataAnnotations.Schema; using YLErp.Commons; namespace YLErp.Modules.SuperviseReportModule.CFMMC.Model { public class SuperviseReportTodayModel : SuperviseReportBaseModel { /// /// 主协议类型 /// public string ProtocalType { get; set; } /// /// 主协议日期 /// public DateTime? ProtocolSignDate { get; set; } /// /// 主协议日期 /// public string ProtocolSignDateString { get { return ProtocolSignDate == null ? "" : ProtocolSignDate.Value.ToString("yyyy-MM-dd"); } } /// /// 是否有授信 /// public string IsCredit { get; set; } private double _credit; /// /// 授信额度 /// public double? Credit { get { return _credit == 0 ? null : (double?)_credit; } set { _credit = OtcFormatHelper.FormatValue(value, 4).Value; } } public string CreditString => ConsGlobal.IgnoreTSV(_credit) == 0 ? "" : _credit.ToString("0.####"); private string _spotPrice; /// /// 期初价格 /// public string SpotPrice { get { return _spotPrice; } set { _spotPrice = value; } } private double _initCastClientPayable; /// /// 初始预付金要求 /// public double? InitCastClientPayable { get { return _initCastClientPayable == 0 ? null : (double?)_initCastClientPayable; } set { _initCastClientPayable = OtcFormatHelper.FormatValue(value, 4).Value; } } public string InitCastClientPayableString => ConsGlobal.IgnoreTSV(_initCastClientPayable) == 0 ? "" : _initCastClientPayable.ToString("0.####"); private double _worstCastClientPayable; /// /// 维持预付金 /// public double? WorstCastClientPayable { get { return _worstCastClientPayable == 0 ? null : (double?)_worstCastClientPayable; } set { _worstCastClientPayable = OtcFormatHelper.FormatValue(value, 4).Value; } } public string WorstCastClientPayableString => ConsGlobal.IgnoreTSV(_worstCastClientPayable) == 0 ? "" : _worstCastClientPayable.ToString("0.####"); /// /// 操作类型 /// public string OperationType { get; set; } /// /// 生效日 /// public DateTime? StartDate { get; set; } /// /// 生效日 /// public string StartDateString { get { return StartDate == null ? "" : StartDate.Value.ToString("yyyy-MM-dd"); } } public DateTime? RealExerciseDate { get; set; } public string RealExerciseDateString { get { return RealExerciseDate == null ? "" : RealExerciseDate.Value.ToString("yyyy-MM-dd"); } } /// /// 提前终止日期 /// public DateTime? UnWindDate { get; set; } /// /// 提前终止日期 /// public string UnWindDateString { get { return UnWindDate == null ? "" : UnWindDate.Value.ToString("yyyy-MM-dd"); } } /// /// 标的资产交易场所 /// public string TradingMarket { get; set; } /// /// 标的资产交易场所En /// public string TradingMarketEn { get; set; } private double? _tradePrice; /// /// 期权费金额 /// public double? TradePrice { get { return _tradePrice; } set { _tradePrice = value != null ? Math.Abs(OtcFormatHelper.FormatValue(value.Value, 4)) : default(Nullable); } } /// /// 结算方法 /// public string SettlementMethod { get; set; } /// /// 最后结算日 /// public DateTime? LastUnWindDate { get; set; } /// /// 最后结算日 /// public string LastUnWindDateString { get { return LastUnWindDate == null ? "" : LastUnWindDate.Value.ToString("yyyy-MM-dd"); } } /// /// 结算价确认方式 /// public int? SettlementPriceType { get; set; } private double? _fixedPrice; /// /// 一口价价格 /// public double? FixedPrice { get { return _fixedPrice; } set { _fixedPrice = value.HasValue ? (double?)OtcFormatHelper.FormatValue(value ?? 0, 4) : null; ; } } private double? _referencePrice; /// /// 商品参考价格 /// public double? ReferencePrice { get { return _referencePrice; } set { _referencePrice = value.HasValue ? OtcFormatHelper.FormatValue(value.Value, 4) : value; } } /// /// 商品参考价格 /// public string ReferencePriceString { get { return ReferencePrice?.ToString("0.####"); } } #region 辅助属性 /// /// /// [NotMapped] public int TradeCashId { get; set; } /// /// /// [NotMapped] public double? ClosePrice { get; set; } /// /// TradeSpan表里的维持预付金 /// 用于计算维持预付金和初始预付金 /// [NotMapped] public double? TradeSpan_WorstCastClientPayable { get; set; } /// /// 分组交易中的父交易Id /// [NotMapped] public int GroupPercentTradeId { get; set; } #endregion } }