using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations.Schema; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; using YLErp.Modules.SuperviseReportModule.SAC.Common; using static YLErp.DBModels.Consts.ConsReport; namespace YLErp.Modules.SuperviseReportModule.SAC.Model { /// /// 收益互换交易权益端支付 /// [Table("A1016_SwapEquityPayment")] public class SwapEquityPaymentModel : ReportBaseModel { /// /// 操作标识 /// 长度:1 /// 必填:是 /// 说明: /// [XmlIgnore] [SacDescription("OperationType", "操作标识", "1", true, "")] public OptFlagsEnum OperationType { get; set; } /// /// 交易确认书(双方约定) /// 长度:100 /// 必填:是 /// 说明:双方约定 /// [CheckStringMaxLength(MaxLength = 100)] [DefaultValue("")] [SacDescription("ConfirmationNo", "交易确认书(双方约定)", "100", true, "双方约定;")] public string ConfirmationNo { get; set; } /// /// 权益端支付 /// [XmlElement] [CheckIEnumerableTMinCount(MinCount = 1)] [NotMapped] [SacDescription("SwapEquityPaymentTuple", "权益端支付", "", false, "")] public List SwapEquityPaymentTuple { get; set; } /// /// 操作事件编号 /// 长度:6 /// 必填:否 /// /// 说明:首次随交易确认书上报时,不填; /// 存续期发生相关事件时,必填; /// 同一笔交易确认书下应当保证唯一性,并按照事件发生顺序进行编号,起始编号为0000. /// 如一笔交易下依次发生展期\调仓\终止事件,编号应当分别为0000\0001\0002, /// 场外业务报告系统返回编号分别为E0000\R0001\T0002 /// /// [CheckStringLengthInMap(Map = new[] { 4, 5 }, Required = false)] [SacDescription("DurationEventNO", "操作事件编号", "6", false, "首次随交易确认书上报时,不填;\r\n存续期发生相关事件时,必填;\r\n同一笔交易确认书下应当保证唯一性,并按照事件发生顺序进行编号,起始编号为0000.\r\n如一笔交易下依次发生展期、调仓、终止事件,编号应当分别为0000、0001、0002,\r\n场外业务报告系统返回编号分别为E0000、R0001、T0002;")] public new string? DurationEventNO { get; set; } /// /// 空白1 /// [DefaultValue("")] [SacDescription("Blank1", "空白1", "", false, "")] public string Blank1 { get; set; } /// /// 空白2 /// [DefaultValue("")] [SacDescription("Blank2", "空白2", "", false, "")] public string Blank2 { get; set; } } /// /// 权益端支付 /// [Table("A1016_SwapEquityPaymentTuple")] public class SwapEquityPaymentTupleModel : ReportSubBaseModel { /// /// 支付方式 /// 长度:2 /// 必填:是 /// 说明:当"收益互换类型"选择"多空组合"时,选"权益收益多空组合" /// [CheckStringInMap(Map = new[] { "0", "1", "2", "4" })] [SacDescription("PaymentMethod", "支付方式", "2", true, "当收益互换类型选择多空组合时,选权益收益多空组合;")] public string PaymentMethod { get; set; } /// /// 支付方 /// 长度:2 /// 必填:是 /// 说明: /// [CheckStringInMap(Map = new[] { "0", "1" })] [SacDescription("Payer", "支付方", "2", true, "")] public string Payer { get; set; } /// /// 支付频率 /// 长度:2 /// 必填:是 /// 说明: /// [CheckStringInMap(Map = new[] { "0", "1", "2" })] [DefaultValue("")] [SacDescription("PaymentFreq", "支付频率", "2", true, "")] public string PaymentFreq { get; set; } /// /// 标的开/平仓日期 /// 长度:2 /// 必填:是 /// 说明:yyyy-MM-dd /// [CheckStringIsDateTimeFormat] [DefaultValue("")] [SacDescription("OpenandClosingDate", "标的开/平仓日期", "10", true, "yyyy-MM-dd;")] public string OpenandClosingDate { get; set; } /// /// 标的小类 /// 长度:2 /// 必填:是 /// 说明: /// [CheckStringInMap(Map = new[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "99" })] [DefaultValue("")] [SacDescription("UndrlygAssetDtldType", "标的小类", "2", true, "")] public string UndrlygAssetDtldType { get; set; } /// /// 挂钩标的编码 /// 长度:200 /// 必填:是 /// 说明:标的代码应当符合标准规范要求的编码 /// [CheckStringMaxLength(MaxLength = 200)] [DefaultValue("")] [SacDescription("UndrlygAssetCode", "挂钩标的编码", "200", true, "标的代码应当符合标准规范要求的编码;")] public string UndrlygAssetCode { get; set; } /// /// 标的名称 /// 长度:200 /// 必填:是 /// [CheckStringMaxLength(MaxLength = 200)] [DefaultValue("")] [SacDescription("UndrlygAssetName", "标的名称", "200", true, "")] public string UndrlygAssetName { get; set; } /// /// 标的交易场所 /// 长度:200 /// 必填:是 /// [CheckStringMaxLength(MaxLength = 200)] [DefaultValue("")] [SacDescription("UndrlygAssetTradgPlc", "标的交易场所", "200", true, "")] public string UndrlygAssetTradgPlc { get; set; } /// /// 标的价格 /// 长度:36,4 /// 必填:是 /// 说明:校验规则:保留四位小数 /// [CheckStringIntLength(BeforePointMaxLength = 36, AfterPointLength = 4)] [DefaultValue("")] [SacDescription("UndrlygAssetPrice", "标的价格", "36,4", true, "校验规则:保留四位小数;")] public string UndrlygAssetPrice { get; set; } /// /// 开平仓 /// 长度:2 /// 必填:是 /// 说明: /// [CheckStringMaxLength(MaxLength = 2)] [DefaultValue("")] [SacDescription("UndrlygAssetPosition", "开平仓", "2", true, "")] public string UndrlygAssetPosition { get; set; } /// /// 标的数量 /// 长度:36,6 /// 必填:是 /// 说明:校验规则:六位小数且大于0 /// [CheckStringIntLength(BeforePointMaxLength = 36, AfterPointLength = 6, MinValue = 0)] [DefaultValue("")] [SacDescription("UndrlygAssetAmt", "标的数量", "36,6", true, "校验规则:六位小数且大于0;")] public string UndrlygAssetAmt { get; set; } /// /// 合约乘数 /// 长度:36 /// 必填:是 /// 说明:整数 /// [CheckStringIntLength(BeforePointMaxLength = 36, AfterPointLength = 0)] [DefaultValue("")] [SacDescription("ContractMultiplier", "合约乘数", "36", true, "整数;")] public string ContractMultiplier { get; set; } /// /// 多头名义本金(元) /// 长度:36,2 /// 必填:否 /// 说明:标的数量*合约乘数*标的价格;当"支付方式"选择"权益收益(多头)"\"浮动利率收益"\"权益收益多空组合"时,必填 /// [CheckConditionStringInMap(ConditionName = nameof(PaymentMethod), ConditionMap = new[] { "0", "2", "4" }, CheckHandleNameArr = new[] { "A" })] [CheckConditionStringNotInMap(ConditionName = nameof(PaymentMethod), ConditionMap = new[] { "0", "2", "4" }, CheckHandleNameArr = new[] { "B" })] [CheckStringIntLength(BeforePointMaxLength = 36, AfterPointLength = 2, MinValue = 0, CheckHandleName = "A")] [CheckStringIntLength(BeforePointMaxLength = 36, AfterPointLength = 2, MinValue = 0, Required = false, CheckHandleName = "B")] [DefaultValue("")] [SacDescription("LNotinalPrincipleAmt", "多头名义本金(元)", "36,2", false, "标的数量*合约乘数*标的价格;\r\n当支付方式选择权益收益(多头)、浮动利率收益、权益收益多空组合时,必填;")] public string LNotinalPrincipleAmt { get; set; } /// /// 空头名义本金(元) /// 长度:36,2 /// 必填:否 /// 说明:-(标的数量*合约乘数* 标的价格);当"支付方式"选择"权益收益(空头)"\"浮动利率收益"\"权益收益多空组合"时,必填 /// [CheckConditionStringInMap(ConditionName = nameof(PaymentMethod), ConditionMap = new[] { "1", "2", "4" }, CheckHandleNameArr = new[] { "A" })] [CheckConditionStringNotInMap(ConditionName = nameof(PaymentMethod), ConditionMap = new[] { "1", "2", "4" }, CheckHandleNameArr = new[] { "B" })] [CheckStringIntLength(BeforePointMaxLength = 36, AfterPointLength = 2, MaxValue = 0, CheckHandleName = "A")] [CheckStringIntLength(BeforePointMaxLength = 36, AfterPointLength = 2, MaxValue = 0, Required = false, CheckHandleName = "B")] [DefaultValue("")] [SacDescription("SNotinalPrincipleAmt", "空头名义本金(元)", "36,2", false, "-(标的数量*合约乘数* 标的价格)\r\n当支付方式选择权益收益(空头)、浮动利率收益、权益收益多空组合时,必填;")] public string SNotinalPrincipleAmt { get; set; } /// /// 利率(%) /// 长度:8,2 /// 必填:否 /// 说明:校验规则:大于等于0的两位小数,如5.12 /// [CheckStringIntLength(BeforePointMaxLength = 8, AfterPointLength = 2, MinValue = 0, Required = false)] [DefaultValue("")] [SacDescription("InterestRate", "利率(%)", "8,2", false, "校验规则:大于等于0的两位小数,如5.12;")] public string InterestRate { get; set; } /// /// 空白1 /// [DefaultValue("")] [SacDescription("Blank1", "空白1", "", false, "")] public string Blank1 { get; set; } /// /// 空白2 /// [DefaultValue("")] [SacDescription("Blank2", "空白2", "", false, "")] public string Blank2 { get; set; } [XmlIgnore] [DefaultValue("")] [SacDescription("ConfirmationNo", "交易确认书编号", "100", false, "")] public string ConfirmationNo { get; set; } } }