ReferenceMataData.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Data;
  5. namespace Ant.ORM
  6. {
  7. /// <summary>
  8. /// 扩展对象元数据
  9. /// </summary>
  10. [Serializable]
  11. public class ReferenceMataData
  12. {
  13. private DbType[] _DataType;
  14. private string[] _ForeignKey;
  15. private string _ForeignTable;
  16. private string _Key = string.Empty;
  17. private string[] _MainKey;
  18. private string _ShowField;
  19. /// <summary>
  20. /// 关键字
  21. /// </summary>
  22. public string Key
  23. {
  24. get
  25. {
  26. return this._Key;
  27. }
  28. set
  29. {
  30. this._Key = value;
  31. }
  32. }
  33. /// <summary>
  34. /// 外键所在的表
  35. /// </summary>
  36. public string ForeignTable
  37. {
  38. get
  39. {
  40. return this._ForeignTable;
  41. }
  42. set
  43. {
  44. this._ForeignTable = value;
  45. }
  46. }
  47. /// <summary>
  48. /// 外键
  49. /// </summary>
  50. public string[] ForeignKey
  51. {
  52. get
  53. {
  54. return this._ForeignKey;
  55. }
  56. set
  57. {
  58. this._ForeignKey = value;
  59. }
  60. }
  61. /// <summary>
  62. /// 主键
  63. /// </summary>
  64. public string[] MainKey
  65. {
  66. get
  67. {
  68. return this._MainKey;
  69. }
  70. set
  71. {
  72. this._MainKey = value;
  73. }
  74. }
  75. /// <summary>
  76. /// 数据类型
  77. /// </summary>
  78. public DbType[] DataType
  79. {
  80. get
  81. {
  82. return this._DataType;
  83. }
  84. set
  85. {
  86. this._DataType = value;
  87. }
  88. }
  89. /// <summary>
  90. /// 显示值的字段
  91. /// </summary>
  92. public string ShowField
  93. {
  94. get
  95. {
  96. return this._ShowField;
  97. }
  98. set
  99. {
  100. this._ShowField = value;
  101. }
  102. }
  103. }
  104. }