97 lines
2.9 KiB
C#
97 lines
2.9 KiB
C#
using YLErp.DBModels;
|
|
|
|
namespace YLErp.Models
|
|
{
|
|
/// <summary>
|
|
/// 获取fixing的请求model
|
|
/// </summary>
|
|
public class FixingRequestBase
|
|
{
|
|
public FixingRequestBase(DateTime valueDate, int tradeId,
|
|
string instrumentType, string underlyingCode, DateTime exerciseDate, SettlementTypeEnum settlementType)
|
|
{
|
|
TradeId = tradeId;
|
|
ValueDate = valueDate;
|
|
ExerciseDate = exerciseDate;
|
|
InstrumentType = instrumentType ?? throw new ArgumentNullException(nameof(instrumentType));
|
|
UnderlyingCode = underlyingCode ?? throw new ArgumentNullException(nameof(underlyingCode));
|
|
SettlementType = settlementType;
|
|
}
|
|
|
|
public FixingRequestBase(FixingRequestBase baseReq)
|
|
{
|
|
if (baseReq is null)
|
|
{
|
|
throw new ArgumentNullException(nameof(baseReq));
|
|
}
|
|
|
|
TradeId = baseReq.TradeId;
|
|
ValueDate = baseReq.ValueDate;
|
|
ExerciseDate = baseReq.ExerciseDate;
|
|
InstrumentType = baseReq.InstrumentType;
|
|
UnderlyingCode = baseReq.UnderlyingCode;
|
|
SettlementType = baseReq.SettlementType;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 交易ID
|
|
/// </summary>
|
|
public int TradeId { get; }
|
|
|
|
/// <summary>
|
|
/// 估值日期
|
|
/// </summary>
|
|
public DateTime ValueDate { get; set; }
|
|
|
|
/// <summary>
|
|
/// 执行日期
|
|
/// </summary>
|
|
public DateTime ExerciseDate { get; }
|
|
|
|
/// <summary>
|
|
/// 资产类型
|
|
/// </summary>
|
|
public string InstrumentType { get; }
|
|
|
|
/// <summary>
|
|
/// 标的代码
|
|
/// </summary>
|
|
public string UnderlyingCode { get; }
|
|
|
|
/// <summary>
|
|
/// 结算价格类型
|
|
/// </summary>
|
|
public SettlementTypeEnum SettlementType { get; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取fixing的请求model
|
|
/// </summary>
|
|
public class FixingRequest : FixingRequestBase
|
|
{
|
|
public FixingRequest(DateTime valueDate, int tradeId, DateTime startDate, string observationDates
|
|
, string instrumentType, string underlyingCode, SettlementTypeEnum settlementType, DateTime exerciseDate)
|
|
: base(valueDate, tradeId, instrumentType, underlyingCode, exerciseDate, settlementType)
|
|
{
|
|
StartDate = startDate;
|
|
ObservationDates = observationDates;
|
|
}
|
|
|
|
public FixingRequest(FixingRequestBase baseReq, DateTime startDate, string observationDates) : base(baseReq)
|
|
{
|
|
StartDate = startDate;
|
|
ObservationDates = observationDates;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 开始日期
|
|
/// </summary>
|
|
public DateTime StartDate { get; set; }
|
|
|
|
/// <summary>
|
|
/// 观察日期序列
|
|
/// </summary>
|
|
public string ObservationDates { get; set; }
|
|
}
|
|
}
|