using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using YLErp.DBModels.Helpers; namespace YLErp.Model { public class DayUnwindReport { public int id { get; set; } /// /// 交易状态 /// [DisplayName("交易状态")] public string TradeStatus { get; set; } [DisplayName("交易编号")] public string TradeNumber { get; set; } [DisplayName("结构类型")] public string TradeType { get; set; } /// /// 期权结构类型 /// public string StructureType { get; set; } [DisplayFormat(DataFormatString = "{0:F2}", ApplyFormatInEditMode = true)] public double? Amount { get; set; } [DisplayName("名义本金")] public double? StockEqvNotional { get; set; } [DisplayName("份额")] public double Notional { get; set; } [DisplayName("平仓份额")] public double? UnWindNotional { get; set; } [DisplayName("行权价")] public double? Strike { get; set; } [DisplayName("交易日期")] public DateTime? TradeDate { get; set; } [DisplayName("开始日期")] public DateTime? StartDate { get; set; } [DisplayName("到期日期")] public DateTime? ExerciseDate { get; set; } [DisplayName("看涨看跌")] public string OptionType { get; set; } [DisplayName("交易方向")] public string BuySell { get; set; } [DisplayName("标的代码")] public string UnderlyingCode { get; set; } [DisplayName("标的类型")] public string UnderlyingAssetClass { get; set; } [DisplayName("簿记账户")] public string AssetBookName { get; set; } [DisplayName("客户名称")] public string ClientName { get; set; } [DisplayName("交易员")] public string TraderName { get; set; } [DisplayName("客户信息")] public int? ClientId { get; set; } [DisplayName("资产信息")] public int? AssetId { get; set; } /// /// 操作日期_createdate /// public DateTime? OptDate { get; set; } /// /// 是否有效_validstate /// public string ValidState { get; set; } /// /// 结算总收益 /// public double? SettlementPrice { get; set; } /// /// 结算收益 /// public double? SingleSettlementIncome { get { if (TradeStatus == ConsTrade.已执行) { return (Amount ?? 0) / Notional; } if (TradeStatus == ConsTrade.已平仓) { return (Amount ?? 0) / UnWindNotional; } return 0; } } [DisplayName("交易价格")] public double? TradePrice { get; set; } [DisplayName("行权方式")] public string ExerciseMode { get; set; } [DisplayName("行权方式")] [NotMapped] public string ExerciseModeCn { get { return TradeHelper.GetExerciseModeCn(ExerciseMode); } } /// /// 期初价格 /// [DisplayName("期初价格")] public double? InitialSpotPrice { get; set; } /// /// 单份 期权价格 /// [DisplayName("期权价格")] public double? TradeSinglePrice { get; set; } [DisplayName("备注")] public string Comments { get; set; } /// /// 操作者_optname /// [DisplayName("操作者")] public string OptName { get; set; } /// /// 组合标的的公式信息 /// [NotMapped] public string SyntheticUnderlyingTipsInfo { get; set; } } }