using System.ComponentModel.DataAnnotations; using Abp.AutoMapper; using AutoMapper; using VberZero.BaseSystem; namespace VberZero.AppService.Attaches.Dto; [AutoMapTo(typeof(SysAttach)), AutoMapFrom(typeof(SysAttach))] public class AttachDto { public AttachDto() { CheckAll = true; } public AttachDto(string codeKey, string sourceKey) : this() { CodeKey = codeKey; SourceKey = sourceKey; } public AttachDto(string codeKey, string sourceKey, string fileInfo, string fileName, string fileExt, string allowExt = null) : this(codeKey, sourceKey) { FileInfo = fileInfo; FileName = fileName; FileExt = fileExt; AllowExt = allowExt; } public int Id { get; set; } [StringLength(SysAttach.CodeKeyMaxLength)] public string CodeKey { get; set; } [StringLength(SysAttach.SourceKeyMaxLength)] public string SourceKey { get; set; } [StringLength(SysAttach.FileTitleMaxLength)] public string FileTitle { get; set; } [StringLength(SysAttach.FileNameMaxLength)] public string FileName { get; set; } [StringLength(SysAttach.FilePathMaxLength)] public string FilePath { get; set; } public int FileType { get; set; } [StringLength(SysAttach.FileExtMaxLength)] public string FileExt { get; set; } [StringLength(SysAttach.DescriptionMaxLength)] public string Description { get; set; } [IgnoreMap] public string FileInfo { get; set; } [IgnoreMap] public string AllowExt { get; set; } [IgnoreMap] public bool IsUpdate { get; set; } [IgnoreMap] public bool CheckAll { get; set; } }