using System.Collections.Generic; 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("A1003_SupAgrmt")] public class SupAgrmtModel : ReportBaseModel { /// /// 操作标识 /// 长度:1 /// 必填:是 /// 说明: /// [XmlIgnore] [SacDescription("OperationType", "操作标识", "1", true, "")] public OptFlagsEnum OperationType { get; set; } /// /// 主协议编号(双方约定) /// 长度:100 /// 必填:是 /// 说明:双方约定 /// [CheckStringMaxLength(MaxLength = 100)] [DefaultValue("")] [SacDescription("MasterAgrmtNo", "主协议编号(双方约定)", "100", true, "双方约定;")] public string MasterAgrmtNo { get; set; } /// /// 补充议编号 /// 长度:32 /// 必填:否 /// 说明:校验规则:补正时必填 /// [CheckConditionStringValue(ConditionName = nameof(OperationType), ConditionValue = "A", CheckHandleNameArr = new[] { "B" })] [CheckConditionStringNEQValue(ConditionName = nameof(OperationType), ConditionValue = "A", CheckHandleNameArr = new[] { "A" })] [CheckStringMaxLength(MaxLength = 32, CheckHandleName = "A")] [CheckStringMaxLength(MaxLength = 32, Required = false, CheckHandleName = "B")] [DefaultValue("")] [SacDescription("SupAgrmtID", "补充议编号", "32", false, "校验规则:补正时必填;")] public string SupAgrmtID { get; set; } /// /// 补充协议编号(双方约定) /// 长度:100 /// 必填:是 /// 说明:双方约定 /// [CheckStringMaxLength(MaxLength = 100)] [DefaultValue("")] [SacDescription("SupAgrmtNo", "补充协议编号(双方约定)", "100", true, "双方约定;")] public string SupAgrmtNo { get; set; } /// /// 补充协议类型 /// 长度:2 /// 必填:是 /// 说明: /// [CheckStringMaxLength(MaxLength = 2)] [DefaultValue("")] [SacDescription("SupAgrmtType", "补充协议类型", "2", true, "")] public string? SupAgrmtType { get; set; } /// /// 签署时间 /// 长度:10 /// 必填:是 /// 说明:校验规则:必须是yyyy-MM-dd /// [CheckStringLength(Length = 10)] [CheckStringIsDateTimeFormat(FormatString = "yyyy-MM-dd")] [DefaultValue("")] [SacDescription("SigningDate", "签署时间", "10", true, "校验规则:必须是YYYY-MM-DD;")] public string SigningDate { get; set; } /// /// 补充协议备注 /// 长度:1024 /// 必填:否 /// 说明:上述所有字段未能包含的信息 /// [CheckStringMaxLength(MaxLength = 1024, Required = false)] [DefaultValue("")] [SacDescription("SupAgrmtRemark", "补充协议备注", "1024", false, "上述所有字段未能包含的信息;")] public string? SupAgrmtRemark { get; set; } /// /// 补充协议附件 /// 长度:1024 /// 必填:否 /// 说明:上述所有字段未能包含的信息 /// [XmlIgnore] public string SupAgrmtAtt { get; set; } /// /// 补充协议附件 /// /// 补充协议附件 /// 长度: /// 必填:是 /// 说明: /// [XmlElement] [NotMapped] [SacDescription("SupAgrmtAttTuple", "补充协议附件", "", true, "")] public List? SupAgrmtAttTuple { get; set; } } /// /// 补充协议附件 /// public class SupAgrmtAttModel : ReportSubBaseModel { /// /// 补充协议附件 /// 长度: /// 必填:是 /// 说明:校验规则:只支持PDF格式 /// [CheckStringEndsWith(EndsWithString = ".pdf")] [DefaultValue("")] [SacDescription("SupAgrmtAtt", "补充协议附件", "", true, "校验规则:只支持PDF格式;")] public string? SupAgrmtAtt { get; set; } } }