using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;
using YLErp.Modules.SuperviseReportModule.SAC.Common;
using static YLErp.DBModels.Consts.ConsReport;
namespace YLErp.Modules.SuperviseReportModule.SAC.Model
{
///
/// 交易确认书附件
///
[Table("A1019_ConfirmationAtt")]
public class ConfirmationAttModel : ReportBaseModel
{
///
/// 交易确认书编号(双方约定)
/// 长度:100
/// 必填:是
/// 说明:双方约定
///
[CheckStringMaxLength(MaxLength = 100)]
[DefaultValue("")]
[SacDescription("ConfirmationNo", "交易确认书编号(双方约定)", "100", true, "双方约定;")]
public string ConfirmationNo { get; set; }
///
/// 操作标识
/// 长度:1
/// 必填:是
/// 说明:
///
[XmlIgnore]
[SacDescription("OperationType", "操作标识", "1", true, "")]
public OptFlagsEnum OperationType { get; set; }
///
/// 交易确认书附件
/// 长度:1
/// 必填:是
/// 说明:
///
[XmlIgnore]
[SacDescription("ConfirmationAtt", "交易确认书附件", "1", true, "说明:校验规则:只支持PDF格式")]
public string ConfirmationAtt { get; set; }
///
/// 交易确认书附件
/// 长度:1
/// 必填:是
/// 说明:
///
[XmlIgnore]
[SacDescription("ConfirmationFiles", "交易确认书附件", "1", true, "说明:校验规则:只支持PDF格式")]
public string ConfirmationFiles { get; set; }
///
/// 交易确认书附件
/// 长度:
/// 必填:是
/// 说明:多附件;
///
[CheckIEnumerableTMinCount(MinCount = 1)]
[XmlElement]
[NotMapped]
[SacDescription("ConfirmationFilesTuple", "交易确认书附件", "", true, "多附件;")]
public List ConfirmationFilesTuple { get; set; }
}
public class ConfirmationFilesTupleModel
{
///
/// 是否为收益互换
///
//[CheckStringInMap(Map = new[] { "true", "false" })]
[XmlIgnore]
public string IsSwap { get; set; }
///
/// 场外期权交易确认书附件
/// 长度:100
/// 必填:是
/// 说明:校验规则:只支持PDF格式
///
[CheckConditionStringValue(ConditionName = "IsSwap", ConditionValue = "false", CheckHandleNameArr = new[] { "A" })]
[CheckConditionStringValue(ConditionName = "IsSwap", ConditionValue = "true", CheckHandleNameArr = new[] { "B" })]
[CheckStringEndsWith(EndsWithString = ".pdf", CheckHandleName = "A")]
[CheckStringLength(Length = 0, Required = false, CheckHandleName = "B")]
[DefaultValue("")]
[SacDescription("ConfirmationAtt", "交易确认书附件", "100", true, "校验规则:只支持PDF格式;")]
public string ConfirmationAtt { get; set; }
///
/// 收益互换交易确认书附件
/// 长度:100
/// 必填:是
/// 说明:校验规则:只支持PDF格式
///
[CheckConditionStringValue(ConditionName = "IsSwap", ConditionValue = "true", CheckHandleNameArr = new[] { "A" })]
[CheckConditionStringValue(ConditionName = "IsSwap", ConditionValue = "false", CheckHandleNameArr = new[] { "B" })]
[CheckStringEndsWith(EndsWithString = ".pdf", CheckHandleName = "A")]
[CheckStringLength(Length = 0, Required = false, CheckHandleName = "B")]
[DefaultValue("")]
[SacDescription("ConfirmationFiles", "交易确认书附件", "100", true, "校验规则:只支持PDF格式;")]
public string ConfirmationFiles { get; set; }
}
}