magic_model_generator 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (300) hide show
  1. data/CHANGELOG +0 -0
  2. data/README +3 -0
  3. data/Rakefile +96 -0
  4. data/examples/singleview/account.rb +94 -0
  5. data/examples/singleview/account_history.rb +21 -0
  6. data/examples/singleview/account_reservation.rb +26 -0
  7. data/examples/singleview/account_type.rb +54 -0
  8. data/examples/singleview/account_type_aging.rb +17 -0
  9. data/examples/singleview/account_type_variable.rb +8 -0
  10. data/examples/singleview/address.rb +8 -0
  11. data/examples/singleview/address_format.rb +49 -0
  12. data/examples/singleview/address_history.rb +28 -0
  13. data/examples/singleview/adjustment.rb +97 -0
  14. data/examples/singleview/adjustment_batch.rb +42 -0
  15. data/examples/singleview/adjustment_invoice.rb +17 -0
  16. data/examples/singleview/adjustment_type.rb +54 -0
  17. data/examples/singleview/adjustment_type_variable.rb +8 -0
  18. data/examples/singleview/archive_lock_t.rb +11 -0
  19. data/examples/singleview/archive_result.rb +15 -0
  20. data/examples/singleview/archive_type.rb +31 -0
  21. data/examples/singleview/archive_type_table_list.rb +15 -0
  22. data/examples/singleview/atai_error_name.rb +7 -0
  23. data/examples/singleview/atlanta_form.rb +23 -0
  24. data/examples/singleview/atlanta_form_field.rb +12 -0
  25. data/examples/singleview/atlanta_group.rb +285 -0
  26. data/examples/singleview/atlanta_help_entry.rb +32 -0
  27. data/examples/singleview/atlanta_operator.rb +356 -0
  28. data/examples/singleview/atlanta_profile.rb +47 -0
  29. data/examples/singleview/atlanta_profile_func_map.rb +8 -0
  30. data/examples/singleview/atlanta_profile_group_map.rb +10 -0
  31. data/examples/singleview/atlanta_profile_role_map.rb +8 -0
  32. data/examples/singleview/atlanta_profile_wf_map.rb +10 -0
  33. data/examples/singleview/atlanta_role.rb +23 -0
  34. data/examples/singleview/atlanta_table_partition.rb +39 -0
  35. data/examples/singleview/attribute_type.rb +75 -0
  36. data/examples/singleview/attribute_type_variable.rb +8 -0
  37. data/examples/singleview/bill_run.rb +93 -0
  38. data/examples/singleview/bill_run_operation.rb +54 -0
  39. data/examples/singleview/bill_run_type.rb +39 -0
  40. data/examples/singleview/bill_run_type_status.rb +12 -0
  41. data/examples/singleview/bill_run_type_task.rb +12 -0
  42. data/examples/singleview/cache.rb +23 -0
  43. data/examples/singleview/cache_field.rb +13 -0
  44. data/examples/singleview/can_act_charge.rb +16 -0
  45. data/examples/singleview/charge.rb +67 -0
  46. data/examples/singleview/charge_category.rb +45 -0
  47. data/examples/singleview/charge_output_defn.rb +13 -0
  48. data/examples/singleview/charge_output_defn_history.rb +22 -0
  49. data/examples/singleview/charge_output_defn_var.rb +10 -0
  50. data/examples/singleview/configuration_attr_type.rb +22 -0
  51. data/examples/singleview/configuration_attribute.rb +11 -0
  52. data/examples/singleview/configuration_item.rb +26 -0
  53. data/examples/singleview/configuration_item_type.rb +29 -0
  54. data/examples/singleview/contract.rb +35 -0
  55. data/examples/singleview/contract_history.rb +48 -0
  56. data/examples/singleview/contract_type.rb +58 -0
  57. data/examples/singleview/contract_type_product.rb +11 -0
  58. data/examples/singleview/conversion_rate.rb +14 -0
  59. data/examples/singleview/currency.rb +118 -0
  60. data/examples/singleview/currency_history.rb +28 -0
  61. data/examples/singleview/customer_contact.rb +12 -0
  62. data/examples/singleview/customer_node.rb +166 -0
  63. data/examples/singleview/customer_node_bill_run.rb +12 -0
  64. data/examples/singleview/customer_node_charge_cat.rb +22 -0
  65. data/examples/singleview/customer_node_correspond.rb +12 -0
  66. data/examples/singleview/customer_node_da.rb +11 -0
  67. data/examples/singleview/customer_node_da_array.rb +35 -0
  68. data/examples/singleview/customer_node_history.rb +86 -0
  69. data/examples/singleview/customer_node_inv_format.rb +33 -0
  70. data/examples/singleview/customer_node_type.rb +89 -0
  71. data/examples/singleview/customer_node_type_cc.rb +18 -0
  72. data/examples/singleview/customer_node_type_da.rb +8 -0
  73. data/examples/singleview/customer_node_type_var.rb +8 -0
  74. data/examples/singleview/customer_query.rb +80 -0
  75. data/examples/singleview/customer_query_progress.rb +20 -0
  76. data/examples/singleview/customer_query_type.rb +49 -0
  77. data/examples/singleview/customer_query_type_var.rb +8 -0
  78. data/examples/singleview/delete_cascade.rb +13 -0
  79. data/examples/singleview/delete_cascade_group.rb +21 -0
  80. data/examples/singleview/delete_constraint.rb +9 -0
  81. data/examples/singleview/derived_attribute.rb +32 -0
  82. data/examples/singleview/derived_attribute_array.rb +32 -0
  83. data/examples/singleview/derived_attribute_history.rb +41 -0
  84. data/examples/singleview/derived_attribute_index.rb +13 -0
  85. data/examples/singleview/derived_attribute_value.rb +19 -0
  86. data/examples/singleview/dil.rb +18 -0
  87. data/examples/singleview/dil_history.rb +24 -0
  88. data/examples/singleview/dil_reference.rb +9 -0
  89. data/examples/singleview/dil_validation_t.rb +6 -0
  90. data/examples/singleview/dil_variable.rb +10 -0
  91. data/examples/singleview/dunning_t.rb +14 -0
  92. data/examples/singleview/entity_mapping.rb +11 -0
  93. data/examples/singleview/entity_remap.rb +22 -0
  94. data/examples/singleview/entity_validation.rb +70 -0
  95. data/examples/singleview/entity_validation_list.rb +15 -0
  96. data/examples/singleview/entity_validation_variable.rb +8 -0
  97. data/examples/singleview/equipment.rb +28 -0
  98. data/examples/singleview/equipment_history.rb +62 -0
  99. data/examples/singleview/equipment_type.rb +57 -0
  100. data/examples/singleview/equipment_type_variable.rb +8 -0
  101. data/examples/singleview/error_group.rb +18 -0
  102. data/examples/singleview/error_message.rb +65 -0
  103. data/examples/singleview/evs_address_equiv.rb +17 -0
  104. data/examples/singleview/evs_alias.rb +12 -0
  105. data/examples/singleview/evs_attribute_type_key.rb +7 -0
  106. data/examples/singleview/evt_equipment_changeover.rb +9 -0
  107. data/examples/singleview/expression_list.rb +27 -0
  108. data/examples/singleview/expression_list_value.rb +17 -0
  109. data/examples/singleview/fac_group_compatibility.rb +11 -0
  110. data/examples/singleview/fac_group_instance.rb +19 -0
  111. data/examples/singleview/fac_group_instance_hist.rb +16 -0
  112. data/examples/singleview/facility.rb +9 -0
  113. data/examples/singleview/facility_group.rb +21 -0
  114. data/examples/singleview/facility_group_history.rb +21 -0
  115. data/examples/singleview/foreign_key.rb +9 -0
  116. data/examples/singleview/function_defn.rb +16 -0
  117. data/examples/singleview/function_defn_history.rb +35 -0
  118. data/examples/singleview/function_role.rb +24 -0
  119. data/examples/singleview/function_role_map.rb +10 -0
  120. data/examples/singleview/gl_code.rb +65 -0
  121. data/examples/singleview/gl_code_history.rb +20 -0
  122. data/examples/singleview/gl_upload.rb +10 -0
  123. data/examples/singleview/icon.rb +64 -0
  124. data/examples/singleview/inv_loop_t.rb +4 -0
  125. data/examples/singleview/inv_report_accounts_t.rb +25 -0
  126. data/examples/singleview/invoice.rb +134 -0
  127. data/examples/singleview/invoice_contents.rb +14 -0
  128. data/examples/singleview/invoice_format.rb +31 -0
  129. data/examples/singleview/invoice_format_history.rb +29 -0
  130. data/examples/singleview/invoice_message.rb +17 -0
  131. data/examples/singleview/invoice_message_history.rb +31 -0
  132. data/examples/singleview/invoice_message_variable.rb +10 -0
  133. data/examples/singleview/invoice_receivable_type.rb +13 -0
  134. data/examples/singleview/invoice_type.rb +23 -0
  135. data/examples/singleview/invoice_type_history.rb +26 -0
  136. data/examples/singleview/invoice_type_variable.rb +10 -0
  137. data/examples/singleview/isp_email_address.rb +17 -0
  138. data/examples/singleview/licence_current_values.rb +12 -0
  139. data/examples/singleview/menu_role_map.rb +10 -0
  140. data/examples/singleview/normalised_event.rb +119 -0
  141. data/examples/singleview/normalised_event_error.rb +91 -0
  142. data/examples/singleview/normalised_event_file.rb +75 -0
  143. data/examples/singleview/normalised_event_ft.rb +18 -0
  144. data/examples/singleview/normalised_event_ft_hist.rb +25 -0
  145. data/examples/singleview/normalised_event_ft_var.rb +10 -0
  146. data/examples/singleview/normalised_event_type.rb +54 -0
  147. data/examples/singleview/output_device.rb +37 -0
  148. data/examples/singleview/output_method.rb +32 -0
  149. data/examples/singleview/output_method_type.rb +38 -0
  150. data/examples/singleview/output_select.rb +17 -0
  151. data/examples/singleview/payment.rb +102 -0
  152. data/examples/singleview/payment_batch.rb +43 -0
  153. data/examples/singleview/payment_invoice.rb +17 -0
  154. data/examples/singleview/payment_item.rb +15 -0
  155. data/examples/singleview/payment_type.rb +57 -0
  156. data/examples/singleview/payment_type_variable.rb +8 -0
  157. data/examples/singleview/person.rb +60 -0
  158. data/examples/singleview/person_history.rb +69 -0
  159. data/examples/singleview/person_type.rb +39 -0
  160. data/examples/singleview/plan_table.rb +27 -0
  161. data/examples/singleview/product.rb +45 -0
  162. data/examples/singleview/product_compatibility.rb +13 -0
  163. data/examples/singleview/product_derived_attribute.rb +10 -0
  164. data/examples/singleview/product_facility_group.rb +16 -0
  165. data/examples/singleview/product_group.rb +12 -0
  166. data/examples/singleview/product_group_history.rb +20 -0
  167. data/examples/singleview/product_history.rb +35 -0
  168. data/examples/singleview/product_in_product_group.rb +12 -0
  169. data/examples/singleview/product_instance.rb +41 -0
  170. data/examples/singleview/product_instance_equip.rb +21 -0
  171. data/examples/singleview/product_instance_history.rb +37 -0
  172. data/examples/singleview/product_instance_service.rb +17 -0
  173. data/examples/singleview/product_payment_item.rb +19 -0
  174. data/examples/singleview/product_service_type.rb +32 -0
  175. data/examples/singleview/product_service_type_equip.rb +20 -0
  176. data/examples/singleview/product_subtotal.rb +14 -0
  177. data/examples/singleview/product_tariff.rb +16 -0
  178. data/examples/singleview/racr_clec_t1.rb +12 -0
  179. data/examples/singleview/racr_clec_t2.rb +12 -0
  180. data/examples/singleview/racr_clec_t3.rb +28 -0
  181. data/examples/singleview/racr_t.rb +29 -0
  182. data/examples/singleview/ragd_clec_t.rb +47 -0
  183. data/examples/singleview/ragd_t.rb +28 -0
  184. data/examples/singleview/rapc_t.rb +27 -0
  185. data/examples/singleview/rdfd_cmn_t.rb +17 -0
  186. data/examples/singleview/rdfd_t.rb +16 -0
  187. data/examples/singleview/receivable_type.rb +49 -0
  188. data/examples/singleview/receivable_type_history.rb +25 -0
  189. data/examples/singleview/reference_code.rb +17 -0
  190. data/examples/singleview/reference_type.rb +32 -0
  191. data/examples/singleview/release_info.rb +10 -0
  192. data/examples/singleview/report_reference_type.rb +14 -0
  193. data/examples/singleview/report_reference_type_defs.rb +12 -0
  194. data/examples/singleview/reprocessed_file.rb +32 -0
  195. data/examples/singleview/rgp_file.rb +22 -0
  196. data/examples/singleview/rgp_normalised_event.rb +78 -0
  197. data/examples/singleview/rmag_t.rb +32 -0
  198. data/examples/singleview/rpmr_t.rb +27 -0
  199. data/examples/singleview/rpsi_t.rb +24 -0
  200. data/examples/singleview/rser_t.rb +13 -0
  201. data/examples/singleview/rshu_cmn_t.rb +31 -0
  202. data/examples/singleview/schedule.rb +91 -0
  203. data/examples/singleview/schedule_task_type.rb +43 -0
  204. data/examples/singleview/service.rb +88 -0
  205. data/examples/singleview/service_bill_run_t.rb +12 -0
  206. data/examples/singleview/service_charge_category.rb +22 -0
  207. data/examples/singleview/service_da.rb +11 -0
  208. data/examples/singleview/service_da_array.rb +35 -0
  209. data/examples/singleview/service_duplicate.rb +4 -0
  210. data/examples/singleview/service_history.rb +59 -0
  211. data/examples/singleview/service_type.rb +54 -0
  212. data/examples/singleview/service_type_cc.rb +18 -0
  213. data/examples/singleview/service_type_da.rb +8 -0
  214. data/examples/singleview/service_type_equip_type.rb +11 -0
  215. data/examples/singleview/subtotal.rb +48 -0
  216. data/examples/singleview/subtotal_history.rb +59 -0
  217. data/examples/singleview/subtotal_rating_delta.rb +20 -0
  218. data/examples/singleview/subtotal_rating_value.rb +21 -0
  219. data/examples/singleview/subtotal_term.rb +16 -0
  220. data/examples/singleview/subtotal_value.rb +18 -0
  221. data/examples/singleview/summary_of_change.rb +31 -0
  222. data/examples/singleview/summary_of_change_ev.rb +18 -0
  223. data/examples/singleview/summary_of_change_view.rb +22 -0
  224. data/examples/singleview/t2_anumber_france.rb +22 -0
  225. data/examples/singleview/t2_anumber_italy.rb +22 -0
  226. data/examples/singleview/t2_anumber_netherlands.rb +24 -0
  227. data/examples/singleview/t2_anumber_portugal.rb +22 -0
  228. data/examples/singleview/t2_anumber_spain.rb +22 -0
  229. data/examples/singleview/t2_anumber_switzerland.rb +24 -0
  230. data/examples/singleview/t2_bankreference_austria.rb +7 -0
  231. data/examples/singleview/t2_bankreference_belgium.rb +6 -0
  232. data/examples/singleview/t2_bankreference_france.rb +7 -0
  233. data/examples/singleview/t2_bankreference_germany.rb +7 -0
  234. data/examples/singleview/t2_bankreference_italy.rb +7 -0
  235. data/examples/singleview/t2_bankreference_portugal.rb +7 -0
  236. data/examples/singleview/t2_cc_provrequests.rb +19 -0
  237. data/examples/singleview/t2_emf_info.rb +12 -0
  238. data/examples/singleview/t2_ev_column_label_mapping.rb +9 -0
  239. data/examples/singleview/t2_historytable.rb +26 -0
  240. data/examples/singleview/t2_inv_revoked_invoice.rb +11 -0
  241. data/examples/singleview/t2_inv_suppress_invoice.rb +13 -0
  242. data/examples/singleview/t2_national_number_plan.rb +8 -0
  243. data/examples/singleview/t2_pay_statement.rb +28 -0
  244. data/examples/singleview/t2_prov_req_action.rb +22 -0
  245. data/examples/singleview/t2_prov_request.rb +32 -0
  246. data/examples/singleview/t2_rep_brr_t.rb +19 -0
  247. data/examples/singleview/t2_rep_trr_t.rb +19 -0
  248. data/examples/singleview/t2_rep_ubr_t.rb +19 -0
  249. data/examples/singleview/t2_taxclass.rb +8 -0
  250. data/examples/singleview/t2_zipcode_austria.rb +8 -0
  251. data/examples/singleview/t2_zipcode_france.rb +8 -0
  252. data/examples/singleview/t2_zipcode_germany.rb +8 -0
  253. data/examples/singleview/t2_zipcode_hungary.rb +8 -0
  254. data/examples/singleview/t2_zipcode_luxembourg.rb +8 -0
  255. data/examples/singleview/t2_zipcode_netherlands.rb +8 -0
  256. data/examples/singleview/t2_zipcode_portugal.rb +9 -0
  257. data/examples/singleview/t2_zipcode_spain.rb +8 -0
  258. data/examples/singleview/t2_zipcode_switzerland.rb +8 -0
  259. data/examples/singleview/table_import_order.rb +6 -0
  260. data/examples/singleview/tariff.rb +51 -0
  261. data/examples/singleview/tariff_charge.rb +33 -0
  262. data/examples/singleview/tariff_charge_defn.rb +18 -0
  263. data/examples/singleview/tariff_condition_defn.rb +19 -0
  264. data/examples/singleview/tariff_history.rb +70 -0
  265. data/examples/singleview/tariff_recurring.rb +36 -0
  266. data/examples/singleview/task_queue.rb +130 -0
  267. data/examples/singleview/task_queue_result.rb +10 -0
  268. data/examples/singleview/template.rb +18 -0
  269. data/examples/singleview/template_history.rb +30 -0
  270. data/examples/singleview/template_reference.rb +9 -0
  271. data/examples/singleview/template_variable.rb +10 -0
  272. data/examples/singleview/trt_clec_treatment.rb +13 -0
  273. data/examples/singleview/variable_defn.rb +48 -0
  274. data/examples/singleview/variable_defn_dependency.rb +11 -0
  275. data/examples/singleview/variable_defn_direct.rb +15 -0
  276. data/examples/singleview/variable_defn_history.rb +22 -0
  277. data/examples/singleview/work_force.rb +25 -0
  278. data/examples/singleview/xpsi_addr_val_commtax21.rb +24 -0
  279. data/examples/singleview/xpsi_addr_val_msag.rb +24 -0
  280. data/examples/singleview/xpsi_addr_val_zip.rb +14 -0
  281. data/examples/singleview/xpsi_ne_batch.rb +20 -0
  282. data/examples/singleview/xpsi_product_batch.rb +18 -0
  283. data/examples/singleview/xpsi_product_status.rb +14 -0
  284. data/examples/singleview/xpsi_tax_error.rb +34 -0
  285. data/examples/singleview/xpsi_trt_revoke.rb +68 -0
  286. data/examples/singleview/xpsi_trt_revoke_prod_inst.rb +12 -0
  287. data/examples/singleview/xpsi_update_capture.rb +35 -0
  288. data/lib/activerecord/base.rb +12 -0
  289. data/lib/hash_tricks.rb +21 -0
  290. data/lib/magic_model_generator.rb +8 -0
  291. data/lib/magic_model_generator/schema.rb +205 -0
  292. data/lib/magic_model_generator/validations.rb +48 -0
  293. data/lib/magic_model_generator/version.rb +9 -0
  294. data/lib/rails/generator/dynamic_named_base.rb +99 -0
  295. data/lib/rails/generator/manifest.rb +8 -0
  296. data/magic_model_generator.rb +88 -0
  297. data/templates/model.rb +3 -0
  298. data/test/magic_model_generator_test.rb +11 -0
  299. data/test/test_helper.rb +2 -0
  300. metadata +366 -0
@@ -0,0 +1,33 @@
1
+ class TariffCharge < ActiveRecord::Base
2
+ belongs_to :tariff, :class_name => 'Tariff', :foreign_key => :tariff_id
3
+ validates_presence_of :tariff_id
4
+ validates_numericality_of :tariff_id, :allow_nil => false, :only_integer => true
5
+ validates_presence_of :seqnr
6
+ validates_numericality_of :seqnr, :allow_nil => false, :only_integer => true
7
+ validates_presence_of :last_modified
8
+ validates_presence_of :effective_start_date
9
+ validates_presence_of :effective_end_date
10
+ validates_presence_of :condition1_expr
11
+ validates_length_of :condition1_expr, :allow_nil => false, :maximum => 255
12
+ validates_length_of :condition2_expr, :allow_nil => true, :maximum => 255
13
+ validates_length_of :condition3_expr, :allow_nil => true, :maximum => 255
14
+ validates_length_of :condition4_expr, :allow_nil => true, :maximum => 255
15
+ validates_length_of :condition5_expr, :allow_nil => true, :maximum => 255
16
+ validates_length_of :condition6_expr, :allow_nil => true, :maximum => 255
17
+ validates_length_of :condition7_expr, :allow_nil => true, :maximum => 255
18
+ validates_length_of :condition8_expr, :allow_nil => true, :maximum => 255
19
+ validates_length_of :condition9_expr, :allow_nil => true, :maximum => 255
20
+ validates_length_of :condition10_expr, :allow_nil => true, :maximum => 255
21
+ validates_presence_of :charge1_expr
22
+ validates_length_of :charge1_expr, :allow_nil => false, :maximum => 255
23
+ validates_length_of :charge2_expr, :allow_nil => true, :maximum => 255
24
+ validates_length_of :charge3_expr, :allow_nil => true, :maximum => 255
25
+ validates_length_of :charge4_expr, :allow_nil => true, :maximum => 255
26
+ validates_length_of :charge5_expr, :allow_nil => true, :maximum => 255
27
+ validates_length_of :charge6_expr, :allow_nil => true, :maximum => 255
28
+ validates_length_of :charge7_expr, :allow_nil => true, :maximum => 255
29
+ validates_length_of :charge8_expr, :allow_nil => true, :maximum => 255
30
+ validates_length_of :charge9_expr, :allow_nil => true, :maximum => 255
31
+ validates_length_of :charge10_expr, :allow_nil => true, :maximum => 255
32
+ validates_length_of :invoice_txt, :allow_nil => true, :maximum => 255
33
+ end
@@ -0,0 +1,18 @@
1
+ class TariffChargeDefn < ActiveRecord::Base
2
+ belongs_to :tariff, :class_name => 'Tariff', :foreign_key => :tariff_id
3
+ belongs_to :attribute_type, :class_name => 'AttributeType', :foreign_key => :attribute_type_id
4
+ validates_presence_of :tariff_id
5
+ validates_numericality_of :tariff_id, :allow_nil => false, :only_integer => true
6
+ validates_presence_of :charge_component_nr
7
+ validates_numericality_of :charge_component_nr, :allow_nil => false, :only_integer => true
8
+ validates_presence_of :last_modified
9
+ validates_presence_of :effective_start_date
10
+ validates_presence_of :effective_end_date
11
+ validates_presence_of :description
12
+ validates_length_of :description, :allow_nil => false, :maximum => 255
13
+ validates_presence_of :prompt
14
+ validates_length_of :prompt, :allow_nil => false, :maximum => 30
15
+ validates_presence_of :width
16
+ validates_numericality_of :width, :allow_nil => false, :only_integer => true
17
+ validates_numericality_of :attribute_type_id, :allow_nil => true, :only_integer => true
18
+ end
@@ -0,0 +1,19 @@
1
+ class TariffConditionDefn < ActiveRecord::Base
2
+ belongs_to :tariff, :class_name => 'Tariff', :foreign_key => :tariff_id
3
+ belongs_to :attribute_type, :class_name => 'AttributeType', :foreign_key => :attribute_type_id
4
+ validates_presence_of :tariff_id
5
+ validates_numericality_of :tariff_id, :allow_nil => false, :only_integer => true
6
+ validates_presence_of :condition_nr
7
+ validates_numericality_of :condition_nr, :allow_nil => false, :only_integer => true
8
+ validates_presence_of :last_modified
9
+ validates_presence_of :effective_start_date
10
+ validates_presence_of :effective_end_date
11
+ validates_presence_of :description
12
+ validates_length_of :description, :allow_nil => false, :maximum => 255
13
+ validates_presence_of :prompt
14
+ validates_length_of :prompt, :allow_nil => false, :maximum => 30
15
+ validates_presence_of :width
16
+ validates_numericality_of :width, :allow_nil => false, :only_integer => true
17
+ validates_length_of :conditional_expr, :allow_nil => true, :maximum => 255
18
+ validates_numericality_of :attribute_type_id, :allow_nil => true, :only_integer => true
19
+ end
@@ -0,0 +1,70 @@
1
+ class TariffHistory < ActiveRecord::Base
2
+ belongs_to :tariff, :class_name => 'Tariff', :foreign_key => :tariff_id
3
+ belongs_to :atlanta_operator, :class_name => 'AtlantaOperator', :foreign_key => :atlanta_operator_id
4
+ belongs_to :atlanta_group, :class_name => 'AtlantaGroup', :foreign_key => :atlanta_group_id
5
+ belongs_to :currency, :class_name => 'Currency', :foreign_key => :currency_id
6
+ belongs_to :charge_category, :class_name => 'ChargeCategory', :foreign_key => :charge_category_id
7
+ belongs_to :receivable_type, :class_name => 'ReceivableType', :foreign_key => :receivable_type_id
8
+ validates_presence_of :tariff_id
9
+ validates_numericality_of :tariff_id, :allow_nil => false, :only_integer => true
10
+ validates_presence_of :last_modified
11
+ validates_presence_of :effective_start_date
12
+ validates_presence_of :effective_end_date
13
+ validates_presence_of :atlanta_operator_id
14
+ validates_numericality_of :atlanta_operator_id, :allow_nil => false, :only_integer => true
15
+ validates_presence_of :atlanta_group_id
16
+ validates_numericality_of :atlanta_group_id, :allow_nil => false, :only_integer => true
17
+ validates_presence_of :tariff_name
18
+ validates_length_of :tariff_name, :allow_nil => false, :maximum => 67
19
+ validates_presence_of :description
20
+ validates_length_of :description, :allow_nil => false, :maximum => 2000
21
+ validates_presence_of :data_type_code
22
+ validates_numericality_of :data_type_code, :allow_nil => false, :only_integer => true
23
+ validates_numericality_of :tariff_class_code, :allow_nil => true, :only_integer => true
24
+ validates_presence_of :tariff_type_code
25
+ validates_numericality_of :tariff_type_code, :allow_nil => false, :only_integer => true
26
+ validates_presence_of :tariff_status_code
27
+ validates_numericality_of :tariff_status_code, :allow_nil => false, :only_integer => true
28
+ validates_length_of :version_str, :allow_nil => true, :maximum => 30
29
+ validates_numericality_of :default_priority, :allow_nil => true, :only_integer => true
30
+ validates_numericality_of :master_tariff_id, :allow_nil => true, :only_integer => true
31
+ validates_presence_of :billable_ind_code
32
+ validates_numericality_of :billable_ind_code, :allow_nil => false, :only_integer => true
33
+ validates_numericality_of :dont_display_ind_code, :allow_nil => true, :only_integer => true
34
+ validates_presence_of :context_code
35
+ validates_numericality_of :context_code, :allow_nil => false, :only_integer => true
36
+ validates_presence_of :application_env_code
37
+ validates_numericality_of :application_env_code, :allow_nil => false, :only_integer => true
38
+ validates_presence_of :nr_conditions
39
+ validates_numericality_of :nr_conditions, :allow_nil => false, :only_integer => true
40
+ validates_presence_of :nr_charge_components
41
+ validates_numericality_of :nr_charge_components, :allow_nil => false, :only_integer => true
42
+ validates_length_of :key_substitution_expr, :allow_nil => true, :maximum => 255
43
+ validates_length_of :key_variable_name, :allow_nil => true, :maximum => 66
44
+ validates_numericality_of :eligibility_expression_list_id, :allow_nil => true, :only_integer => true
45
+ validates_presence_of :default_charge_expr
46
+ validates_length_of :default_charge_expr, :allow_nil => false, :maximum => 255
47
+ validates_length_of :charge_expr, :allow_nil => true, :maximum => 255
48
+ validates_presence_of :default_invoice_txt
49
+ validates_length_of :default_invoice_txt, :allow_nil => false, :maximum => 255
50
+ validates_numericality_of :currency_id, :allow_nil => true, :only_integer => true
51
+ validates_length_of :currency_expr, :allow_nil => true, :maximum => 255
52
+ validates_presence_of :suppress_zero_ind_code
53
+ validates_numericality_of :suppress_zero_ind_code, :allow_nil => false, :only_integer => true
54
+ validates_presence_of :global_event_apply_ind_code
55
+ validates_numericality_of :global_event_apply_ind_code, :allow_nil => false, :only_integer => true
56
+ validates_numericality_of :service_not_found_ind_code, :allow_nil => true, :only_integer => true
57
+ validates_presence_of :charge_category_id
58
+ validates_numericality_of :charge_category_id, :allow_nil => false, :only_integer => true
59
+ validates_length_of :to_account_id_expr, :allow_nil => true, :maximum => 255
60
+ validates_length_of :from_account_id_expr, :allow_nil => true, :maximum => 255
61
+ validates_length_of :to_gl_code_id_expr, :allow_nil => true, :maximum => 255
62
+ validates_length_of :from_gl_code_id_expr, :allow_nil => true, :maximum => 255
63
+ validates_numericality_of :receivable_type_id, :allow_nil => true, :only_integer => true
64
+ validates_length_of :receivable_type_expr, :allow_nil => true, :maximum => 255
65
+ validates_presence_of :invoice_section_nr
66
+ validates_numericality_of :invoice_section_nr, :allow_nil => false, :only_integer => true
67
+ validates_numericality_of :assignment_expression_list_id, :allow_nil => true, :only_integer => true
68
+ validates_numericality_of :account_aggregate_ind_code, :allow_nil => true, :only_integer => true
69
+ validates_length_of :account_check_expr, :allow_nil => true, :maximum => 255
70
+ end
@@ -0,0 +1,36 @@
1
+ class TariffRecurring < ActiveRecord::Base
2
+ belongs_to :tariff, :class_name => 'Tariff', :foreign_key => :tariff_id
3
+ belongs_to :normalised_event_type, :class_name => 'NormalisedEventType', :foreign_key => :normalised_event_type_id
4
+ belongs_to :facility_group, :class_name => 'FacilityGroup', :foreign_key => :facility_group_id
5
+ validates_presence_of :tariff_id
6
+ validates_numericality_of :tariff_id, :allow_nil => false, :only_integer => true
7
+ validates_presence_of :effective_start_date
8
+ validates_presence_of :effective_end_date
9
+ validates_numericality_of :recurring_charge_period, :allow_nil => true, :only_integer => true
10
+ validates_numericality_of :recurring_charge_unit_code, :allow_nil => true, :only_integer => true
11
+ validates_numericality_of :advance_charge_period, :allow_nil => true, :only_integer => true
12
+ validates_numericality_of :prorate_ind_code, :allow_nil => true, :only_integer => true
13
+ validates_numericality_of :prorate_period, :allow_nil => true, :only_integer => true
14
+ validates_numericality_of :prorate_unit_code, :allow_nil => true, :only_integer => true
15
+ validates_numericality_of :days_per_month, :allow_nil => true
16
+ validates_numericality_of :fixed_date_period, :allow_nil => true, :only_integer => true
17
+ validates_numericality_of :active_ind_code, :allow_nil => true, :only_integer => true
18
+ validates_numericality_of :interim_ind_code, :allow_nil => true, :only_integer => true
19
+ validates_presence_of :normalised_event_type_id
20
+ validates_numericality_of :normalised_event_type_id, :allow_nil => false, :only_integer => true
21
+ validates_presence_of :event_type_code
22
+ validates_numericality_of :event_type_code, :allow_nil => false, :only_integer => true
23
+ validates_numericality_of :event_sub_type_code, :allow_nil => true, :only_integer => true
24
+ validates_numericality_of :adjustment_event_type_code, :allow_nil => true, :only_integer => true
25
+ validates_numericality_of :adjustment_event_sub_type_code, :allow_nil => true, :only_integer => true
26
+ validates_presence_of :charge_start_date_code
27
+ validates_numericality_of :charge_start_date_code, :allow_nil => false, :only_integer => true
28
+ validates_presence_of :charged_entity_code
29
+ validates_numericality_of :charged_entity_code, :allow_nil => false, :only_integer => true
30
+ validates_numericality_of :facility_group_id, :allow_nil => true, :only_integer => true
31
+ validates_numericality_of :eligibility_expression_list_id, :allow_nil => true, :only_integer => true
32
+ validates_numericality_of :assignment_expression_list_id, :allow_nil => true, :only_integer => true
33
+ validates_numericality_of :adjustment_expression_list_id, :allow_nil => true, :only_integer => true
34
+ validates_numericality_of :prorate_split_ind_code, :allow_nil => true, :only_integer => true
35
+ validates_numericality_of :charge_period_split_ind_code, :allow_nil => true, :only_integer => true
36
+ end
@@ -0,0 +1,130 @@
1
+ class TaskQueue < ActiveRecord::Base
2
+ belongs_to :task_queue, :class_name => 'TaskQueue', :foreign_key => :task_queue_id
3
+ belongs_to :schedule, :class_name => 'Schedule', :foreign_key => :schedule_id
4
+ belongs_to :atlanta_operator, :class_name => 'AtlantaOperator', :foreign_key => :atlanta_operator_id
5
+ belongs_to :atlanta_group, :class_name => 'AtlantaGroup', :foreign_key => :atlanta_group_id
6
+ has_many :archive_lock_ts, :class_name => 'ArchiveLockT', :foreign_key => :task_queue_id
7
+ has_many :archive_results, :class_name => 'ArchiveResult', :foreign_key => :task_queue_id
8
+ has_many :atlanta_table_partitions, :class_name => 'AtlantaTablePartition', :foreign_key => :task_queue_id
9
+ has_many :bill_run_operations, :class_name => 'BillRunOperation', :foreign_key => :task_queue_id
10
+ has_many :customer_node_corresponds, :class_name => 'CustomerNodeCorrespond', :foreign_key => :task_queue_id
11
+ has_many :entity_remaps, :class_name => 'EntityRemap', :foreign_key => :task_queue_id
12
+ has_many :gl_uploads, :class_name => 'GlUpload', :foreign_key => :task_queue_id
13
+ has_many :invoice_message_histories, :class_name => 'InvoiceMessageHistory', :foreign_key => :task_queue_id
14
+ has_many :normalised_event_files, :class_name => 'NormalisedEventFile', :foreign_key => :task_queue_id
15
+ has_many :racr_clec_t1s, :class_name => 'RacrClecT1', :foreign_key => :task_queue_id
16
+ has_many :racr_clec_t2s, :class_name => 'RacrClecT2', :foreign_key => :task_queue_id
17
+ has_many :racr_clec_t3s, :class_name => 'RacrClecT3', :foreign_key => :task_queue_id
18
+ has_many :racr_ts, :class_name => 'RacrT', :foreign_key => :task_queue_id
19
+ has_many :ragd_clec_ts, :class_name => 'RagdClecT', :foreign_key => :task_queue_id
20
+ has_many :ragd_ts, :class_name => 'RagdT', :foreign_key => :task_queue_id
21
+ has_many :rapc_ts, :class_name => 'RapcT', :foreign_key => :task_queue_id
22
+ has_many :rdfd_cmn_ts, :class_name => 'RdfdCmnT', :foreign_key => :task_queue_id
23
+ has_many :rdfd_ts, :class_name => 'RdfdT', :foreign_key => :task_queue_id
24
+ has_many :reprocessed_files, :class_name => 'ReprocessedFile', :foreign_key => :task_queue_id
25
+ has_many :rmag_ts, :class_name => 'RmagT', :foreign_key => :task_queue_id
26
+ has_many :rpmr_ts, :class_name => 'RpmrT', :foreign_key => :task_queue_id
27
+ has_many :rpsi_ts, :class_name => 'RpsiT', :foreign_key => :task_queue_id
28
+ has_many :rser_ts, :class_name => 'RserT', :foreign_key => :task_queue_id
29
+ has_many :rshu_cmn_ts, :class_name => 'RshuCmnT', :foreign_key => :task_queue_id
30
+ has_many :t2_pay_statements, :class_name => 'T2PayStatement', :foreign_key => :task_queue_id
31
+ has_many :t2_rep_brr_ts, :class_name => 'T2RepBrrT', :foreign_key => :task_queue_id
32
+ has_many :t2_rep_trr_ts, :class_name => 'T2RepTrrT', :foreign_key => :task_queue_id
33
+ has_many :t2_rep_ubr_ts, :class_name => 'T2RepUbrT', :foreign_key => :task_queue_id
34
+ has_many :task_queues, :class_name => 'TaskQueue', :foreign_key => :task_queue_id
35
+ has_many :task_queue_results, :class_name => 'TaskQueueResult', :foreign_key => :task_queue_id
36
+ has_many :xpsi_update_captures, :class_name => 'XpsiUpdateCapture', :foreign_key => :task_queue_id
37
+ has_many :archive_types, :through => archive_results
38
+ has_many :archive_results, :through => archive_results
39
+ has_many :atlanta_groups, :through => atlanta_table_partitions
40
+ has_many :atlanta_operators, :through => atlanta_table_partitions
41
+ has_many :atlanta_table_partitions, :through => atlanta_table_partitions
42
+ has_many :schedules, :through => atlanta_table_partitions
43
+ has_many :error_messages, :through => bill_run_operations
44
+ has_many :atlanta_operators, :through => bill_run_operations
45
+ has_many :bill_runs, :through => bill_run_operations
46
+ has_many :bill_run_operations, :through => bill_run_operations
47
+ has_many :customer_nodes, :through => customer_node_corresponds
48
+ has_many :customer_nodes, :through => entity_remaps
49
+ has_many :error_messages, :through => entity_remaps
50
+ has_many :accounts, :through => gl_uploads
51
+ has_many :atlanta_groups, :through => invoice_message_histories
52
+ has_many :customer_nodes, :through => invoice_message_histories
53
+ has_many :atlanta_operators, :through => invoice_message_histories
54
+ has_many :invoice_formats, :through => invoice_message_histories
55
+ has_many :account_types, :through => invoice_message_histories
56
+ has_many :schedules, :through => invoice_message_histories
57
+ has_many :invoice_messages, :through => invoice_message_histories
58
+ has_many :atlanta_operators, :through => normalised_event_files
59
+ has_many :normalised_event_files, :through => normalised_event_files
60
+ has_many :normalised_event_fts, :through => normalised_event_files
61
+ has_many :accounts, :through => racr_clec_t1s
62
+ has_many :accounts, :through => racr_clec_t2s
63
+ has_many :customer_nodes, :through => ragd_clec_ts
64
+ has_many :customer_nodes, :through => ragd_ts
65
+ has_many :normalised_event_files, :through => reprocessed_files
66
+ has_many :atlanta_operators, :through => reprocessed_files
67
+ has_many :reprocessed_files, :through => reprocessed_files
68
+ has_many :customer_nodes, :through => rpsi_ts
69
+ has_many :equipment, :through => rpsi_ts
70
+ has_many :services, :through => rpsi_ts
71
+ has_many :product_instances, :through => rpsi_ts
72
+ has_many :normalised_event_types, :through => rshu_cmn_ts
73
+ has_many :accounts, :through => rshu_cmn_ts
74
+ has_many :services, :through => rshu_cmn_ts
75
+ has_many :customer_queries, :through => t2_pay_statements
76
+ has_many :customer_nodes, :through => t2_pay_statements
77
+ has_many :t2_pay_statements, :through => t2_pay_statements
78
+ has_many :payments, :through => t2_pay_statements
79
+ has_many :customer_node_types, :through => t2_rep_brr_ts
80
+ has_many :customer_node_types, :through => t2_rep_trr_ts
81
+ has_many :customer_node_types, :through => t2_rep_ubr_ts
82
+ has_many :atlanta_groups, :through => task_queues
83
+ has_many :atlanta_operators, :through => task_queues
84
+ has_many :schedules, :through => task_queues
85
+ has_many :xpsi_update_captures, :through => xpsi_update_captures
86
+ validates_presence_of :task_queue_id
87
+ validates_numericality_of :task_queue_id, :allow_nil => false, :only_integer => true
88
+ validates_presence_of :last_modified
89
+ validates_presence_of :schedule_id
90
+ validates_numericality_of :schedule_id, :allow_nil => false, :only_integer => true
91
+ validates_presence_of :atlanta_operator_id
92
+ validates_numericality_of :atlanta_operator_id, :allow_nil => false, :only_integer => true
93
+ validates_presence_of :atlanta_group_id
94
+ validates_numericality_of :atlanta_group_id, :allow_nil => false, :only_integer => true
95
+ validates_length_of :instance_name, :allow_nil => true, :maximum => 9
96
+ validates_presence_of :email_address
97
+ validates_length_of :email_address, :allow_nil => false, :maximum => 255
98
+ validates_presence_of :start_date
99
+ validates_presence_of :effective_date
100
+ validates_presence_of :task_status_code
101
+ validates_numericality_of :task_status_code, :allow_nil => false, :only_integer => true
102
+ validates_numericality_of :temp_data_id, :allow_nil => true, :only_integer => true
103
+ validates_presence_of :purge_period
104
+ validates_numericality_of :purge_period, :allow_nil => false, :only_integer => true
105
+ validates_length_of :general_1, :allow_nil => true, :maximum => 255
106
+ validates_length_of :general_2, :allow_nil => true, :maximum => 255
107
+ validates_length_of :general_3, :allow_nil => true, :maximum => 255
108
+ validates_length_of :general_4, :allow_nil => true, :maximum => 255
109
+ validates_length_of :general_5, :allow_nil => true, :maximum => 255
110
+ validates_length_of :general_6, :allow_nil => true, :maximum => 255
111
+ validates_length_of :general_7, :allow_nil => true, :maximum => 255
112
+ validates_length_of :general_8, :allow_nil => true, :maximum => 255
113
+ validates_length_of :general_9, :allow_nil => true, :maximum => 255
114
+ validates_length_of :general_10, :allow_nil => true, :maximum => 255
115
+ validates_length_of :general_11, :allow_nil => true, :maximum => 255
116
+ validates_length_of :general_12, :allow_nil => true, :maximum => 255
117
+ validates_length_of :general_13, :allow_nil => true, :maximum => 255
118
+ validates_length_of :general_14, :allow_nil => true, :maximum => 255
119
+ validates_length_of :general_15, :allow_nil => true, :maximum => 255
120
+ validates_length_of :general_16, :allow_nil => true, :maximum => 255
121
+ validates_length_of :general_17, :allow_nil => true, :maximum => 255
122
+ validates_length_of :general_18, :allow_nil => true, :maximum => 255
123
+ validates_length_of :general_19, :allow_nil => true, :maximum => 255
124
+ validates_length_of :general_20, :allow_nil => true, :maximum => 255
125
+ validates_length_of :general_21, :allow_nil => true, :maximum => 255
126
+ validates_length_of :general_22, :allow_nil => true, :maximum => 255
127
+ validates_length_of :general_23, :allow_nil => true, :maximum => 255
128
+ validates_length_of :general_24, :allow_nil => true, :maximum => 255
129
+ validates_length_of :general_25, :allow_nil => true, :maximum => 255
130
+ end
@@ -0,0 +1,10 @@
1
+ class TaskQueueResult < ActiveRecord::Base
2
+ belongs_to :task_queue, :class_name => 'TaskQueue', :foreign_key => :task_queue_id
3
+ validates_presence_of :task_queue_id
4
+ validates_numericality_of :task_queue_id, :allow_nil => false, :only_integer => true
5
+ validates_presence_of :seqnr
6
+ validates_numericality_of :seqnr, :allow_nil => false, :only_integer => true
7
+ validates_presence_of :output_type_code
8
+ validates_numericality_of :output_type_code, :allow_nil => false, :only_integer => true
9
+ validates_length_of :output_text, :allow_nil => true, :maximum => 255
10
+ end
@@ -0,0 +1,18 @@
1
+ class Template < ActiveRecord::Base
2
+ belongs_to :template, :class_name => 'Template', :foreign_key => :template_id
3
+ has_many :invoice_format_histories, :class_name => 'InvoiceFormatHistory', :foreign_key => :template_id
4
+ has_many :templates, :class_name => 'Template', :foreign_key => :template_id
5
+ has_many :template_histories, :class_name => 'TemplateHistory', :foreign_key => :template_id
6
+ has_many :template_references, :class_name => 'TemplateReference', :foreign_key => :template_id
7
+ has_many :template_variables, :class_name => 'TemplateVariable', :foreign_key => :template_id
8
+ has_many :atlanta_groups, :through => invoice_format_histories
9
+ has_many :atlanta_operators, :through => invoice_format_histories
10
+ has_many :invoice_formats, :through => invoice_format_histories
11
+ has_many :entity_validations, :through => invoice_format_histories
12
+ has_many :atlanta_groups, :through => template_histories
13
+ has_many :atlanta_operators, :through => template_histories
14
+ has_many :variable_defns, :through => template_variables
15
+ validates_presence_of :template_id
16
+ validates_numericality_of :template_id, :allow_nil => false, :only_integer => true
17
+ validates_length_of :version_str, :allow_nil => true, :maximum => 255
18
+ end
@@ -0,0 +1,30 @@
1
+ class TemplateHistory < ActiveRecord::Base
2
+ belongs_to :template, :class_name => 'Template', :foreign_key => :template_id
3
+ belongs_to :atlanta_group, :class_name => 'AtlantaGroup', :foreign_key => :atlanta_group_id
4
+ belongs_to :atlanta_operator, :class_name => 'AtlantaOperator', :foreign_key => :atlanta_operator_id
5
+ validates_presence_of :template_id
6
+ validates_numericality_of :template_id, :allow_nil => false, :only_integer => true
7
+ validates_presence_of :last_modified
8
+ validates_presence_of :effective_start_date
9
+ validates_presence_of :effective_end_date
10
+ validates_presence_of :template_name
11
+ validates_length_of :template_name, :allow_nil => false, :maximum => 30
12
+ validates_presence_of :description
13
+ validates_length_of :description, :allow_nil => false, :maximum => 255
14
+ validates_presence_of :template_status_code
15
+ validates_numericality_of :template_status_code, :allow_nil => false, :only_integer => true
16
+ validates_presence_of :template_type_code
17
+ validates_numericality_of :template_type_code, :allow_nil => false, :only_integer => true
18
+ validates_numericality_of :template_context_code, :allow_nil => true, :only_integer => true
19
+ validates_presence_of :view_name
20
+ validates_length_of :view_name, :allow_nil => false, :maximum => 30
21
+ validates_length_of :where_clause, :allow_nil => true, :maximum => 2000
22
+ validates_length_of :order_by_clause, :allow_nil => true, :maximum => 255
23
+ validates_numericality_of :eligibility_expr_list_id, :allow_nil => true, :only_integer => true
24
+ validates_numericality_of :post_eligibility_expr_list_id, :allow_nil => true, :only_integer => true
25
+ validates_presence_of :atlanta_group_id
26
+ validates_numericality_of :atlanta_group_id, :allow_nil => false, :only_integer => true
27
+ validates_presence_of :atlanta_operator_id
28
+ validates_numericality_of :atlanta_operator_id, :allow_nil => false, :only_integer => true
29
+ validates_presence_of :template
30
+ end
@@ -0,0 +1,9 @@
1
+ class TemplateReference < ActiveRecord::Base
2
+ belongs_to :template, :class_name => 'Template', :foreign_key => :template_id
3
+ validates_presence_of :template_id
4
+ validates_numericality_of :template_id, :allow_nil => false, :only_integer => true
5
+ validates_presence_of :effective_start_date
6
+ validates_presence_of :effective_end_date
7
+ validates_presence_of :referenced_template_id
8
+ validates_numericality_of :referenced_template_id, :allow_nil => false, :only_integer => true
9
+ end
@@ -0,0 +1,10 @@
1
+ class TemplateVariable < ActiveRecord::Base
2
+ belongs_to :template, :class_name => 'Template', :foreign_key => :template_id
3
+ belongs_to :variable_defn, :class_name => 'VariableDefn', :foreign_key => :variable_defn_id
4
+ validates_presence_of :template_id
5
+ validates_numericality_of :template_id, :allow_nil => false, :only_integer => true
6
+ validates_presence_of :effective_start_date
7
+ validates_presence_of :effective_end_date
8
+ validates_presence_of :variable_defn_id
9
+ validates_numericality_of :variable_defn_id, :allow_nil => false, :only_integer => true
10
+ end
@@ -0,0 +1,13 @@
1
+ class TrtClecTreatment < ActiveRecord::Base
2
+ belongs_to :customer_node, :class_name => 'CustomerNode', :foreign_key => :customer_node_id
3
+ belongs_to :invoice, :class_name => 'Invoice', :foreign_key => :invoice_id
4
+ validates_presence_of :temp_data_id
5
+ validates_numericality_of :temp_data_id, :allow_nil => false, :only_integer => true
6
+ validates_presence_of :seqnr
7
+ validates_numericality_of :seqnr, :allow_nil => false, :only_integer => true
8
+ validates_presence_of :customer_node_id
9
+ validates_numericality_of :customer_node_id, :allow_nil => false, :only_integer => true
10
+ validates_numericality_of :invoice_id, :allow_nil => true, :only_integer => true
11
+ validates_numericality_of :invoice_seqnr, :allow_nil => true, :only_integer => true
12
+ validates_numericality_of :trt_action_code, :allow_nil => true, :only_integer => true
13
+ end
@@ -0,0 +1,48 @@
1
+ class VariableDefn < ActiveRecord::Base
2
+ belongs_to :variable_defn, :class_name => 'VariableDefn', :foreign_key => :variable_defn_id
3
+ has_many :account_type_variables, :class_name => 'AccountTypeVariable', :foreign_key => :variable_defn_id
4
+ has_many :adjustment_type_variables, :class_name => 'AdjustmentTypeVariable', :foreign_key => :variable_defn_id
5
+ has_many :attribute_type_variables, :class_name => 'AttributeTypeVariable', :foreign_key => :variable_defn_id
6
+ has_many :charge_output_defn_vars, :class_name => 'ChargeOutputDefnVar', :foreign_key => :variable_defn_id
7
+ has_many :customer_node_type_vars, :class_name => 'CustomerNodeTypeVar', :foreign_key => :variable_defn_id
8
+ has_many :customer_query_type_vars, :class_name => 'CustomerQueryTypeVar', :foreign_key => :variable_defn_id
9
+ has_many :derived_attributes, :class_name => 'DerivedAttribute', :foreign_key => :variable_defn_id
10
+ has_many :dil_variables, :class_name => 'DilVariable', :foreign_key => :variable_defn_id
11
+ has_many :entity_validation_variables, :class_name => 'EntityValidationVariable', :foreign_key => :variable_defn_id
12
+ has_many :equipment_type_variables, :class_name => 'EquipmentTypeVariable', :foreign_key => :variable_defn_id
13
+ has_many :function_defns, :class_name => 'FunctionDefn', :foreign_key => :variable_defn_id
14
+ has_many :invoice_message_variables, :class_name => 'InvoiceMessageVariable', :foreign_key => :variable_defn_id
15
+ has_many :invoice_type_variables, :class_name => 'InvoiceTypeVariable', :foreign_key => :variable_defn_id
16
+ has_many :normalised_event_ft_vars, :class_name => 'NormalisedEventFtVar', :foreign_key => :variable_defn_id
17
+ has_many :payment_type_variables, :class_name => 'PaymentTypeVariable', :foreign_key => :variable_defn_id
18
+ has_many :subtotals, :class_name => 'Subtotal', :foreign_key => :variable_defn_id
19
+ has_many :tariffs, :class_name => 'Tariff', :foreign_key => :variable_defn_id
20
+ has_many :template_variables, :class_name => 'TemplateVariable', :foreign_key => :variable_defn_id
21
+ has_many :variable_defns, :class_name => 'VariableDefn', :foreign_key => :variable_defn_id
22
+ has_many :variable_defn_dependencies, :class_name => 'VariableDefnDependency', :foreign_key => :variable_defn_id
23
+ has_many :variable_defn_directs, :class_name => 'VariableDefnDirect', :foreign_key => :variable_defn_id
24
+ has_many :variable_defn_histories, :class_name => 'VariableDefnHistory', :foreign_key => :variable_defn_id
25
+ has_many :account_types, :through => account_type_variables
26
+ has_many :adjustment_types, :through => adjustment_type_variables
27
+ has_many :attribute_types, :through => attribute_type_variables
28
+ has_many :charge_output_defns, :through => charge_output_defn_vars
29
+ has_many :customer_node_types, :through => customer_node_type_vars
30
+ has_many :customer_query_types, :through => customer_query_type_vars
31
+ has_many :derived_attributes, :through => derived_attributes
32
+ has_many :dils, :through => dil_variables
33
+ has_many :entity_validations, :through => entity_validation_variables
34
+ has_many :equipment_types, :through => equipment_type_variables
35
+ has_many :function_defns, :through => function_defns
36
+ has_many :invoice_messages, :through => invoice_message_variables
37
+ has_many :invoice_types, :through => invoice_type_variables
38
+ has_many :normalised_event_fts, :through => normalised_event_ft_vars
39
+ has_many :payment_types, :through => payment_type_variables
40
+ has_many :subtotals, :through => subtotals
41
+ has_many :tariffs, :through => tariffs
42
+ has_many :templates, :through => template_variables
43
+ has_many :atlanta_groups, :through => variable_defn_histories
44
+ has_many :atlanta_operators, :through => variable_defn_histories
45
+ validates_presence_of :variable_defn_id
46
+ validates_numericality_of :variable_defn_id, :allow_nil => false, :only_integer => true
47
+ validates_length_of :version_str, :allow_nil => true, :maximum => 255
48
+ end