resources.yaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. kind: Namespace
  2. spec:
  3. name: baize
  4. ---
  5. kind: DataSource
  6. spec:
  7. type: database
  8. namespace: baize
  9. name: baize
  10. spec:
  11. type: postgres
  12. user_name: test
  13. password: "123456"
  14. address: "10.0.0.84"
  15. port: "30432"
  16. database: test
  17. max_connections: 40
  18. max_idle_connections: 10
  19. ---
  20. kind: DataContainer
  21. spec:
  22. namespace: baize
  23. data_source: baize
  24. name: test.classes
  25. spec:
  26. table_name: test.classes
  27. columns:
  28. - name: id
  29. type: varchar(32)
  30. comment: id
  31. primary_key: true
  32. - name: name
  33. type: varchar(128)
  34. comment: 班名
  35. not_null: true
  36. index: true
  37. - name: student_num
  38. type: integer
  39. comment: 学生数量
  40. not_null: true
  41. index: true
  42. - name: created_time
  43. type: "timestamp with time zone"
  44. comment: 创建时间
  45. not_null: true
  46. - name: last_updated_time
  47. type: "timestamp with time zone"
  48. comment: 最近更新时间
  49. not_null: true
  50. ---
  51. kind: DataContainer
  52. spec:
  53. namespace: baize
  54. data_source: baize
  55. name: test.students
  56. spec:
  57. table_name: test.students
  58. columns:
  59. - name: id
  60. type: varchar(32)
  61. comment: id
  62. primary_key: true
  63. - name: name
  64. type: varchar(128)
  65. comment: 姓名
  66. not_null: true
  67. index: true
  68. - name: family_id
  69. type: varchar(32)
  70. comment: 家庭ID
  71. not_null: true
  72. index: true
  73. - name: created_time
  74. type: "timestamp with time zone"
  75. comment: 创建时间
  76. not_null: true
  77. - name: last_updated_time
  78. type: "timestamp with time zone"
  79. comment: 最近更新时间
  80. not_null: true
  81. ---
  82. kind: DataContainer
  83. spec:
  84. namespace: baize
  85. data_source: baize
  86. name: test.families
  87. spec:
  88. table_name: test.families
  89. columns:
  90. - name: id
  91. type: varchar(32)
  92. comment: id
  93. primary_key: true
  94. - name: father
  95. type: varchar(128)
  96. comment: 父亲姓名
  97. not_null: true
  98. index: true
  99. - name: mother
  100. type: varchar(128)
  101. comment: 母亲姓名
  102. not_null: true
  103. index: true
  104. - name: student_id
  105. type: varchar(32)
  106. comment: 家庭ID
  107. not_null: true
  108. index: true
  109. - name: created_time
  110. type: "timestamp with time zone"
  111. comment: 创建时间
  112. not_null: true
  113. - name: last_updated_time
  114. type: "timestamp with time zone"
  115. comment: 最近更新时间
  116. not_null: true
  117. ---
  118. kind: DataContainer
  119. spec:
  120. namespace: baize
  121. data_source: baize
  122. name: test.identities
  123. spec:
  124. table_name: test.identities
  125. columns:
  126. - name: id
  127. type: varchar(32)
  128. comment: id
  129. primary_key: true
  130. - name: name
  131. type: varchar(128)
  132. comment: 名称
  133. not_null: true
  134. index: true
  135. - name: created_time
  136. type: "timestamp with time zone"
  137. comment: 创建时间
  138. not_null: true
  139. - name: last_updated_time
  140. type: "timestamp with time zone"
  141. comment: 最近更新时间
  142. not_null: true
  143. ---
  144. kind: DataContainer
  145. spec:
  146. namespace: baize
  147. data_source: baize
  148. name: test.configurations
  149. spec:
  150. table_name: test.configurations
  151. columns:
  152. - name: scope
  153. type: varchar(256)
  154. comment: 范围
  155. not_null: true
  156. primary_key: true
  157. - name: group
  158. type: varchar(256)
  159. comment: 组
  160. not_null: true
  161. primary_key: true
  162. - name: value
  163. type: varchar(256)
  164. comment: 值
  165. not_null: true
  166. index: true
  167. ---
  168. kind: DataContainer
  169. spec:
  170. namespace: baize
  171. data_source: baize
  172. name: test.student_and_identity
  173. spec:
  174. table_name: test.student_and_identity
  175. columns:
  176. - name: student_id
  177. type: varchar(32)
  178. comment: id
  179. primary_key: true
  180. - name: identity_id
  181. type: varchar(32)
  182. comment: id
  183. primary_key: true