SCCSysAttribute.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Models
  6. {
  7. /// <summary>
  8. /// 网络爬虫工具特性类
  9. /// </summary>
  10. class SCCSysAttribute
  11. {
  12. }
  13. /// <summary>
  14. /// TDK对应标签
  15. /// </summary>
  16. [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
  17. public sealed class TDKTypeAttribute : Attribute
  18. {
  19. private string _tdktype;
  20. public string TDKType { get { return _tdktype; } }
  21. /// <summary>
  22. /// 构造函数
  23. /// </summary>
  24. /// <param name="TableName">表名称</param>
  25. public TDKTypeAttribute(string TDKType)
  26. {
  27. this._tdktype = TDKType;
  28. }
  29. }
  30. /// <summary>
  31. /// 彩种表名称特性
  32. /// </summary>
  33. [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
  34. public sealed class TableNameAttribute : Attribute
  35. {
  36. private string _tablename;
  37. public string TableName { get { return _tablename; } }
  38. /// <summary>
  39. /// 构造函数
  40. /// </summary>
  41. /// <param name="TableName">表名称</param>
  42. public TableNameAttribute(string TableName)
  43. {
  44. this._tablename = TableName;
  45. }
  46. }
  47. public sealed class TextAttribute : Attribute
  48. {
  49. private string _text;
  50. public string Text { get { return _text; } }
  51. /// <summary>
  52. /// 构造函数
  53. /// </summary>
  54. /// <param name="TableName">表名称</param>
  55. public TextAttribute(string Text)
  56. {
  57. this._text = Text;
  58. }
  59. }
  60. [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
  61. public sealed class ZXTableNameAttribute : Attribute
  62. {
  63. private string _tablename;
  64. public string TableName { get { return _tablename; } }
  65. /// <summary>
  66. /// 构造函数
  67. /// </summary>
  68. /// <param name="TableName">表名称</param>
  69. public ZXTableNameAttribute(string TableName)
  70. {
  71. this._tablename = TableName;
  72. }
  73. }
  74. [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
  75. public sealed class Key : Attribute
  76. {
  77. private bool _key;
  78. public bool KEY { get { return _key; } }
  79. /// <summary>
  80. /// 构造函数
  81. /// </summary>
  82. /// <param name="TableName">表名称</param>
  83. public Key(bool KEY)
  84. {
  85. this._key = KEY;
  86. }
  87. }
  88. [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
  89. public sealed class IsInsert : Attribute
  90. {
  91. private bool _fildename;
  92. public bool FildName { get { return _fildename; } }
  93. /// <summary>
  94. /// 构造函数
  95. /// </summary>
  96. /// <param name="FildName">表名称</param>
  97. public IsInsert(bool FildName=true)
  98. {
  99. this._fildename = FildName;
  100. }
  101. }
  102. /// <summary>
  103. /// 彩种编码特性
  104. /// </summary>
  105. [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
  106. public sealed class LotteryCodeAttribute : Attribute
  107. {
  108. private string _code;
  109. public string Code { get { return _code; } }
  110. /// <summary>
  111. /// 构造函数
  112. /// </summary>
  113. /// <param name="TableName">表名称</param>
  114. public LotteryCodeAttribute(string Code)
  115. {
  116. this._code = Code;
  117. }
  118. }
  119. }