Files
zszq-trs/YLErpDAL/Model/DayUnwindReport.cs
T
2024-05-09 14:06:26 +08:00

161 lines
4.2 KiB
C#

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; }
/// <summary>
/// 交易状态
/// </summary>
[DisplayName("交易状态")]
public string TradeStatus { get; set; }
[DisplayName("交易编号")]
public string TradeNumber { get; set; }
[DisplayName("结构类型")]
public string TradeType { get; set; }
/// <summary>
/// 期权结构类型
/// </summary>
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; }
/// <summary>
/// 操作日期_createdate
/// </summary>
public DateTime? OptDate { get; set; }
/// <summary>
/// 是否有效_validstate
/// </summary>
public string ValidState { get; set; }
/// <summary>
/// 结算总收益
/// </summary>
public double? SettlementPrice { get; set; }
/// <summary>
/// 结算收益
/// </summary>
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);
}
}
/// <summary>
/// 期初价格
/// </summary>
[DisplayName("期初价格")]
public double? InitialSpotPrice { get; set; }
/// <summary>
/// 单份 期权价格
/// </summary>
[DisplayName("期权价格")]
public double? TradeSinglePrice { get; set; }
[DisplayName("备注")]
public string Comments { get; set; }
/// <summary>
/// 操作者_optname
/// </summary>
[DisplayName("操作者")]
public string OptName { get; set; }
/// <summary>
/// 组合标的的公式信息
/// </summary>
[NotMapped]
public string SyntheticUnderlyingTipsInfo { get; set; }
}
}