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.

106 lines
2.7 KiB

2 years ago
  1. using System;
  2. namespace SqlSugar
  3. {
  4. [AttributeUsage(AttributeTargets.Class, Inherited = true)]
  5. public class SugarTable : Attribute {
  6. private SugarTable() { }
  7. public string TableName { get; set; }
  8. public SugarTable(string tableName) {
  9. this.TableName = tableName;
  10. }
  11. }
  12. [AttributeUsage(AttributeTargets.Property , Inherited = true)]
  13. public class SugarColumn : Attribute
  14. {
  15. private string _ColumnName;
  16. public string ColumnName
  17. {
  18. get { return _ColumnName; }
  19. set { _ColumnName = value; }
  20. }
  21. private bool _IsIgnore;
  22. public bool IsIgnore
  23. {
  24. get { return _IsIgnore; }
  25. set { _IsIgnore = value; }
  26. }
  27. private bool _IsPrimaryKey;
  28. public bool IsPrimaryKey
  29. {
  30. get { return _IsPrimaryKey; }
  31. set { _IsPrimaryKey = value; }
  32. }
  33. private bool _IsIdentity;
  34. public bool IsIdentity
  35. {
  36. get { return _IsIdentity; }
  37. set { _IsIdentity = value; }
  38. }
  39. private string _MappingKeys;
  40. public string MappingKeys
  41. {
  42. get { return _MappingKeys; }
  43. set { _MappingKeys = value; }
  44. }
  45. private string _ColumnDescription;
  46. public string ColumnDescription
  47. {
  48. get { return _ColumnDescription; }
  49. set { _ColumnDescription = value; }
  50. }
  51. private int _Length;
  52. public int Length
  53. {
  54. get { return _Length; }
  55. set { _Length = value; }
  56. }
  57. private bool _IsNullable;
  58. public bool IsNullable
  59. {
  60. get { return _IsNullable; }
  61. set { _IsNullable = value; }
  62. }
  63. private string _OldColumnName;
  64. public string OldColumnName
  65. {
  66. get { return _OldColumnName; }
  67. set { _OldColumnName = value; }
  68. }
  69. private string _ColumnDataType;
  70. public string ColumnDataType
  71. {
  72. get { return _ColumnDataType; }
  73. set { _ColumnDataType = value; }
  74. }
  75. private int _DecimalDigits;
  76. public int DecimalDigits {
  77. get { return _DecimalDigits; }
  78. set { _DecimalDigits = value; }
  79. }
  80. private string _OracleSequenceName;
  81. public string OracleSequenceName {
  82. get { return _OracleSequenceName; }
  83. set { _OracleSequenceName = value; }
  84. }
  85. private bool _IsOnlyIgnoreInsert;
  86. public bool IsOnlyIgnoreInsert
  87. {
  88. get { return _IsOnlyIgnoreInsert; }
  89. set { _IsOnlyIgnoreInsert = value; }
  90. }
  91. }
  92. }