AttachFileCreateDto.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System.ComponentModel.DataAnnotations;
  2. using Abp.AutoMapper;
  3. using AutoMapper;
  4. using WeApp.BaseInfo;
  5. using IwbZero.Authorization.Base.SystemInfo;
  6. namespace WeApp.CommonManager.AttachFiles
  7. {
  8. [AutoMapTo(typeof(SysAttachFile))]
  9. public class AttachFileCreateDto
  10. {
  11. public AttachFileCreateDto(string tableName, string columnName, string sourceKey)
  12. {
  13. TableName = tableName;
  14. ColumnName = columnName;
  15. SourceKey = sourceKey;
  16. }
  17. public AttachFileCreateDto(string tableName, string columnName, string sourceKey, string fileInfo, string fileName, string fileExt, string allowExt = null) : this(tableName, columnName, sourceKey)
  18. {
  19. FileInfo = fileInfo;
  20. FileName = fileName;
  21. FileExt = fileExt;
  22. AllowExt = allowExt;
  23. }
  24. public AttachFileCreateDto()
  25. {
  26. }
  27. [StringLength(SysAttachFileBase.AttachNoMaxLength)]
  28. public string AttachNo { get; set; }
  29. [StringLength(SysAttachFileBase.TableNameMaxLength)]
  30. public string TableName { get; set; }
  31. [StringLength(SysAttachFileBase.ColumnNameMaxLength)]
  32. public string ColumnName { get; set; }
  33. [StringLength(SysAttachFileBase.SourceKeyMaxLength)]
  34. public string SourceKey { get; set; }
  35. [StringLength(SysAttachFileBase.FileTitleMaxLength)]
  36. public string FileTitle { get; set; }
  37. [StringLength(SysAttachFileBase.FileNameMaxLength)]
  38. public string FileName { get; set; }
  39. [StringLength(SysAttachFileBase.FilePathMaxLength)]
  40. public string FilePath { get; set; }
  41. [StringLength(SysAttachFileBase.FileTypeMaxLength)]
  42. public string FileType { get; set; }
  43. [StringLength(SysAttachFileBase.FileExtMaxLength)]
  44. public string FileExt { get; set; }
  45. [StringLength(SysAttachFileBase.DescriptionMaxLength)]
  46. public string Description { get; set; }
  47. public string FileInfo { get; set; }
  48. [IgnoreMap]
  49. public string AllowExt { get; set; }
  50. }
  51. }