智慧大脑
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CustomizeFieldAttribute.cs 2.0 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. 
  2. using System;
  3. namespace DataSendApi.Program.CustomizeAttribute
  4. {
  5. /// <summary>
  6. /// 自定义特性
  7. /// </summary>
  8. public class CustomizeFieldAttribute : Attribute
  9. {
  10. /// <summary>
  11. /// 中文列名
  12. /// </summary>
  13. public string ChineseColumnName { get; set; }
  14. /// <summary>
  15. /// 数据库列明
  16. /// </summary>
  17. public string DatabaseColumnName { get; set; }
  18. /// <summary>
  19. /// 列类型
  20. /// </summary>
  21. public string ColumnType { get; set; }
  22. /// <summary>
  23. /// 列长度
  24. /// </summary>
  25. public int ColumnLength { get; set; }
  26. /// <summary>
  27. /// 列格式
  28. /// </summary>
  29. public string ColumnFormat { get; set; }
  30. /// <summary>
  31. /// 是否数据库列
  32. /// </summary>
  33. public bool IsDatabase { get; set; }
  34. /// <summary>
  35. /// 是否Api
  36. /// </summary>
  37. public bool IsApi { get; set; }
  38. /// <summary>
  39. /// 是否主键
  40. /// </summary>
  41. public bool IsPrimaryKey { get; set; }
  42. /// <summary>
  43. /// 是否Excel验证列
  44. /// </summary>
  45. public bool IsExcelVerify { get; set; }
  46. /// <summary>
  47. /// 是否连接编码
  48. /// </summary>
  49. public bool IsJson { get; set; }
  50. /// <summary>
  51. /// 连接的编码类别
  52. /// </summary>
  53. public string JsonName { get; set; }
  54. /// <summary>
  55. /// 是否为Excel
  56. /// </summary>
  57. public bool IsExcel { get; set; }
  58. /// <summary>
  59. /// 是否必填
  60. /// </summary>
  61. public bool IsNull { get; set; }
  62. /// <summary>
  63. /// 特殊验证
  64. /// <para>值:1,使用||进行分割,验证字典值</para>
  65. /// <para>值:2,推送与导入时,查询ods_dyfzqkjcsj表总数存入数据库</para>
  66. /// </summary>
  67. public string TsVerify { get; set; } = string.Empty;
  68. }
  69. }