mks_auth 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d8162f385bd9bc2aa93b5189bc372f682ffa5c06fd4dc0810541e0684b541cd
4
- data.tar.gz: 5a1bff8870902f8284279e27d36bd34ee0886d4e3fccf1f7659ae5e7811d9705
3
+ metadata.gz: 2b4b274de2615dc2349c98ab4541369830d40dc34b08fa03d0b0097353c5f121
4
+ data.tar.gz: 0b9f5fe417c673964aa754a5fb0e37fd588e919825a27086181e9331fd9e4f89
5
5
  SHA512:
6
- metadata.gz: 97cac2e0e7cdaef269441b21aa25125f32163e4b885635efb8fae4d361cc0be966bd3758dcf31b7984bd82d4f654f5f0cfaff3abad7c8a00e927ed9a2b597da7
7
- data.tar.gz: 11abc807644a61827ce28c70443a19cca5c40fdc3f07996aab4e4e6156d34dd65b7a6a830177f402c1f00bd5219995ec4a344ef5d0b000d87adbb2547d2dec9d
6
+ metadata.gz: 043fecd8660069c8c8c2f62241ddd7dbac398e0fee0bc4cc18c6de8a9a0c7414c078aa4547d1c535c53e9906cc156cd02bd869546b17038ee6493be1e7aa8377
7
+ data.tar.gz: c4cdb4314dc64bcf83de5b2271f229fe8de09be45c8027df76dbcfeb7a9cea75037ec465b874c52c33f9085cc5d805ccf2588f1c6cbbecefaf05dd47bbd65da3
data/Rakefile CHANGED
@@ -14,24 +14,10 @@ RDoc::Task.new(:rdoc) do |rdoc|
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
15
15
  end
16
16
 
17
- APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
18
-
17
+ APP_RAKEFILE = File.expand_path('spec/dummy/Rakefile', __dir__)
19
18
  load 'rails/tasks/engine.rake'
20
-
21
19
  load 'rails/tasks/statistics.rake'
22
20
 
23
- Bundler::GemHelper.install_tasks
24
-
25
- Dir[File.join(File.dirname(__FILE__), 'tasks/**/*.rake')].each {|f| load f }
26
-
27
- require 'bundler/gem_tasks'
28
-
29
- require 'rspec/core'
30
-
21
+ # require 'bundler/gem_tasks'
31
22
  require 'rspec/core/rake_task'
32
-
33
- desc 'Run all specs in spec directory (excluding plugin specs)'
34
-
35
- RSpec::Core::RakeTask.new(:spec => 'app:db:test:prepare')
36
-
37
- task :default => :spec
23
+ RSpec::Core::RakeTask.new(spec: 'app:db:test:prepare')
@@ -1,5 +1,4 @@
1
1
  require 'mks/auth/token_auth'
2
- require 'mks/common/methodresponse'
3
2
 
4
3
  module Mks
5
4
  module Auth
@@ -35,17 +35,17 @@ module Mks
35
35
  app_module = ApplicationModule.find_by(code: app_code)
36
36
  @user.application_modules = [app_module]
37
37
  if @user.save
38
- render json: Mks::Common::MethodResponse.success_response(@user)
38
+ render json: { success: true, data: @user }
39
39
  else
40
- render json: Mks::Common::MethodResponse.failure_response(@user), status: :uprocessable_entity
40
+ render json: { success: false, error: @user.errors.full_messages[0] }, status: :uprocessable_entity
41
41
  end
42
42
  end
43
43
 
44
44
  def update
45
45
  if @user.update(user_params)
46
- render json: Mks::Common::MethodResponse.success_response(@user)
46
+ render json: { success: true, data: @user }
47
47
  else
48
- render json: Mks::Common::MethodResponse.failure_response(@user), status: :unprocessable_entity
48
+ render json: { success: false, error: @user.errors.full_messages[0] }, status: :unprocessable_entity
49
49
  end
50
50
  end
51
51
 
@@ -13,7 +13,7 @@ module Mks
13
13
 
14
14
  before_save { email.downcase! }
15
15
 
16
- VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
16
+ VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
17
17
  validates :first_name, presence: true, length: { maximum: 30 }
18
18
  validates :last_name, presence: true, length: { maximum: 30 }
19
19
  validates :email, presence: true, format: { with: VALID_EMAIL_REGEX }, uniqueness: { case_sensitive: false }
@@ -17,9 +17,6 @@ Mks::Auth::Engine.routes.draw do
17
17
  end
18
18
  end
19
19
 
20
-
21
-
22
-
23
20
  resources :user_roles, except: %i[new edit show destroy]
24
21
 
25
22
  get '/user_roles/:id/users', controller: :user_roles, action: :users
@@ -1,5 +1,5 @@
1
1
  module Mks
2
2
  module Auth
3
- VERSION = '1.0.13'.freeze
3
+ VERSION = '1.0.14'.freeze
4
4
  end
5
5
  end
@@ -7,7 +7,7 @@
7
7
  default: &default
8
8
  adapter: postgresql
9
9
  host: localhost
10
- port: 5432
10
+ port: 5433
11
11
  pool: 5
12
12
  timeout: 5000
13
13
  user: postgres
@@ -2,15 +2,15 @@
2
2
  # of editing this file, please use the migrations feature of Active Record to
3
3
  # incrementally modify your database, and then regenerate this schema definition.
4
4
  #
5
- # Note that this schema.rb definition is the authoritative source for your
6
- # database schema. If you need to create the application database on another
7
- # system, you should be using db:schema:load, not running all the migrations
8
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
- # you'll amass, the slower it'll run and the greater likelihood for issues).
5
+ # This file is the source Rails uses to define your schema when running `rails
6
+ # db:schema:load`. When creating a new database, `rails db:schema:load` tends to
7
+ # be faster and is potentially less error prone than running all of your
8
+ # migrations from scratch. Old migrations may fail to apply correctly if those
9
+ # migrations use external dependencies or application code.
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 2018_02_01_104912) do
13
+ ActiveRecord::Schema.define(version: 2018_03_17_043420) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "plpgsql"
@@ -71,6 +71,363 @@ ActiveRecord::Schema.define(version: 2018_02_01_104912) do
71
71
  t.index ["user_id", "user_role_id"], name: "index_mks_auth_users_user_roles_on_user_id_and_user_role_id"
72
72
  end
73
73
 
74
+ create_table "mks_edm_equipment_categories", force: :cascade do |t|
75
+ t.string "code"
76
+ t.string "name", null: false
77
+ t.string "description"
78
+ t.bigint "equipment_type_id"
79
+ t.datetime "created_at", null: false
80
+ t.datetime "updated_at", null: false
81
+ t.index ["equipment_type_id"], name: "ec_on_et_indx"
82
+ end
83
+
84
+ create_table "mks_edm_equipment_components", force: :cascade do |t|
85
+ t.string "serial_no"
86
+ t.string "name", null: false
87
+ t.bigint "equipment_item_id"
88
+ t.datetime "created_at", null: false
89
+ t.datetime "updated_at", null: false
90
+ t.index ["equipment_item_id"], name: "ei_on_ec_indx"
91
+ end
92
+
93
+ create_table "mks_edm_equipment_items", force: :cascade do |t|
94
+ t.string "code"
95
+ t.string "name", null: false
96
+ t.string "description"
97
+ t.string "status", default: "READY"
98
+ t.string "serial_number"
99
+ t.string "brand"
100
+ t.string "item_model"
101
+ t.float "purchase_price", null: false
102
+ t.date "purchase_date", null: false
103
+ t.float "license_fee"
104
+ t.float "tax"
105
+ t.bigint "equipment_id"
106
+ t.bigint "current_location_id"
107
+ t.datetime "created_at", null: false
108
+ t.datetime "updated_at", null: false
109
+ t.index ["current_location_id"], name: "equipment_on_el_indx"
110
+ t.index ["equipment_id"], name: "equipment_on_ei_indx"
111
+ end
112
+
113
+ create_table "mks_edm_equipment_locations", force: :cascade do |t|
114
+ t.string "code"
115
+ t.string "name", null: false
116
+ t.bigint "location_type_id"
117
+ t.string "description"
118
+ t.string "address"
119
+ t.datetime "created_at", null: false
120
+ t.datetime "updated_at", null: false
121
+ t.index ["location_type_id"], name: "lt_on_el_indx"
122
+ end
123
+
124
+ create_table "mks_edm_equipment_types", force: :cascade do |t|
125
+ t.string "code"
126
+ t.string "name", null: false
127
+ t.string "description"
128
+ t.datetime "created_at", null: false
129
+ t.datetime "updated_at", null: false
130
+ end
131
+
132
+ create_table "mks_edm_equipment_valuations", force: :cascade do |t|
133
+ t.bigint "equipment_item_id"
134
+ t.float "initial_cost", null: false
135
+ t.float "residual_value", null: false
136
+ t.float "work_hrs_per_yr", null: false
137
+ t.float "life_year", null: false
138
+ t.float "insurance_premium", null: false
139
+ t.float "fuel_cost_per_hr"
140
+ t.float "oil_rate"
141
+ t.float "repair_rate"
142
+ t.float "rate_of_return"
143
+ t.string "dep_method"
144
+ t.boolean "is_current", default: true
145
+ t.datetime "created_at", null: false
146
+ t.datetime "updated_at", null: false
147
+ t.index ["equipment_item_id"], name: "ev_on_ei_indx"
148
+ end
149
+
150
+ create_table "mks_edm_equipments", force: :cascade do |t|
151
+ t.string "code"
152
+ t.string "name", null: false
153
+ t.string "description"
154
+ t.float "minimum_acquisition_time", default: 0.0, null: false
155
+ t.bigint "equipment_category_id"
156
+ t.datetime "created_at", null: false
157
+ t.datetime "updated_at", null: false
158
+ t.index ["equipment_category_id"], name: "equipment_on_ec_indx"
159
+ end
160
+
161
+ create_table "mks_edm_location_types", force: :cascade do |t|
162
+ t.string "code"
163
+ t.string "name"
164
+ t.string "description"
165
+ t.datetime "created_at", null: false
166
+ t.datetime "updated_at", null: false
167
+ end
168
+
169
+ create_table "mks_maintenance_cost_types", force: :cascade do |t|
170
+ t.string "code"
171
+ t.string "name"
172
+ t.json "fields", null: false
173
+ t.datetime "created_at", null: false
174
+ t.datetime "updated_at", null: false
175
+ end
176
+
177
+ create_table "mks_maintenance_job_cards", force: :cascade do |t|
178
+ t.bigint "maintenance_service_order_id"
179
+ t.string "code"
180
+ t.date "start_date"
181
+ t.date "due_date"
182
+ t.bigint "service_provider_id"
183
+ t.date "checkout_date"
184
+ t.bigint "checkout_by_id"
185
+ t.bigint "checkout_to_id"
186
+ t.bigint "maintenance_status_id"
187
+ t.date "checkin_date"
188
+ t.bigint "checkin_by_id"
189
+ t.bigint "checkin_to_id"
190
+ t.datetime "created_at", null: false
191
+ t.datetime "updated_at", null: false
192
+ t.boolean "approved", default: false
193
+ t.boolean "checkout_confirmed", default: false
194
+ t.boolean "checkin_confirmed", default: false
195
+ t.boolean "costs_approved", default: false
196
+ t.integer "prepared_by_id"
197
+ t.index ["checkin_by_id"], name: "chb_on_jc_indx"
198
+ t.index ["checkin_to_id"], name: "cht_on_jc_indx"
199
+ t.index ["checkout_by_id"], name: "cb_on_jc_indx"
200
+ t.index ["checkout_to_id"], name: "ct_on_jc_indx"
201
+ t.index ["maintenance_service_order_id"], name: "mso_on_jc_indx"
202
+ t.index ["maintenance_status_id"], name: "ms_on_jc_indx"
203
+ t.index ["service_provider_id"], name: "sp_on_jc_indx"
204
+ end
205
+
206
+ create_table "mks_maintenance_maintenance_categories", force: :cascade do |t|
207
+ t.string "code"
208
+ t.string "name"
209
+ t.string "description"
210
+ t.datetime "created_at", null: false
211
+ t.datetime "updated_at", null: false
212
+ end
213
+
214
+ create_table "mks_maintenance_maintenance_costs", force: :cascade do |t|
215
+ t.bigint "job_card_id"
216
+ t.bigint "cost_type_id"
217
+ t.json "cost_detail", null: false
218
+ t.string "remark"
219
+ t.datetime "created_at", null: false
220
+ t.datetime "updated_at", null: false
221
+ t.index ["cost_type_id"], name: "ct_on_mc_indx"
222
+ t.index ["job_card_id"], name: "jc_on_mc_indx"
223
+ end
224
+
225
+ create_table "mks_maintenance_maintenance_service_orders", force: :cascade do |t|
226
+ t.string "title", null: false
227
+ t.string "description"
228
+ t.bigint "equipment_item_id"
229
+ t.bigint "maintenance_type_id"
230
+ t.date "start_date"
231
+ t.date "end_date"
232
+ t.bigint "prepared_by_id"
233
+ t.boolean "approved", default: false
234
+ t.string "status", default: "draft"
235
+ t.bigint "approved_by_id"
236
+ t.string "remark"
237
+ t.float "current_reading", null: false
238
+ t.datetime "created_at", null: false
239
+ t.datetime "updated_at", null: false
240
+ t.index ["approved_by_id"], name: "ab_on_mso_indx"
241
+ t.index ["equipment_item_id"], name: "ei_on_mso_indx"
242
+ t.index ["maintenance_type_id"], name: "mt_on_mso_indx"
243
+ t.index ["prepared_by_id"], name: "pb_on_mso_indx"
244
+ end
245
+
246
+ create_table "mks_maintenance_maintenance_statuses", force: :cascade do |t|
247
+ t.string "code"
248
+ t.string "name"
249
+ t.string "description"
250
+ t.datetime "created_at", null: false
251
+ t.datetime "updated_at", null: false
252
+ end
253
+
254
+ create_table "mks_maintenance_maintenance_types", force: :cascade do |t|
255
+ t.string "code"
256
+ t.string "name", null: false
257
+ t.string "description"
258
+ t.bigint "maintenance_category_id"
259
+ t.datetime "created_at", null: false
260
+ t.datetime "updated_at", null: false
261
+ t.index ["maintenance_category_id"], name: "mt_on_mc_indx"
262
+ end
263
+
264
+ create_table "mks_maintenance_schedule_settings", force: :cascade do |t|
265
+ t.bigint "equipment_id"
266
+ t.bigint "maintenance_type_id"
267
+ t.bigint "schedule_unit_id"
268
+ t.float "value", null: false
269
+ t.datetime "created_at", null: false
270
+ t.datetime "updated_at", null: false
271
+ t.index ["equipment_id"], name: "equipment_on_ss_indx"
272
+ t.index ["maintenance_type_id"], name: "mt_on_ss_indx"
273
+ t.index ["schedule_unit_id"], name: "su_on_ss_indx"
274
+ end
275
+
276
+ create_table "mks_maintenance_schedule_units", force: :cascade do |t|
277
+ t.string "code"
278
+ t.string "name"
279
+ t.string "description"
280
+ t.datetime "created_at", null: false
281
+ t.datetime "updated_at", null: false
282
+ end
283
+
284
+ create_table "mks_rate_chargeable_service_discounts", force: :cascade do |t|
285
+ t.string "unit_variable", null: false
286
+ t.float "from", null: false
287
+ t.float "to", null: false
288
+ t.float "value", null: false
289
+ t.integer "chargeable_service_id"
290
+ t.datetime "created_at", null: false
291
+ t.datetime "updated_at", null: false
292
+ end
293
+
294
+ create_table "mks_rate_chargeable_services", force: :cascade do |t|
295
+ t.string "code", null: false
296
+ t.string "name", null: false
297
+ t.integer "service_type_id"
298
+ t.integer "base_unit_id"
299
+ t.integer "utilization_unit_id"
300
+ t.integer "service_delivery_unit_id"
301
+ t.datetime "created_at", null: false
302
+ t.datetime "updated_at", null: false
303
+ t.index ["base_unit_id"], name: "bu_on_cs_indx"
304
+ t.index ["service_delivery_unit_id"], name: "sdu_on_cs_indx"
305
+ t.index ["service_type_id"], name: "st_on_cs_indx"
306
+ t.index ["utilization_unit_id"], name: "uu_on_cs_indx"
307
+ end
308
+
309
+ create_table "mks_rate_rate_change_requests", force: :cascade do |t|
310
+ t.string "reference_number"
311
+ t.string "authorized_by", null: false
312
+ t.date "effective_on", null: false
313
+ t.date "authorized_on", null: false
314
+ t.json "rates", null: false
315
+ t.string "status", default: "SUBMITTED", null: false
316
+ t.bigint "created_by_id"
317
+ t.bigint "approved_by_id"
318
+ t.string "remark"
319
+ t.datetime "created_at", null: false
320
+ t.datetime "updated_at", null: false
321
+ t.index ["approved_by_id"], name: "ab_on_rcr_indx"
322
+ t.index ["created_by_id"], name: "cb_on_rcr_indx"
323
+ t.index ["reference_number"], name: "index_mks_rate_rate_change_requests_on_reference_number", unique: true
324
+ end
325
+
326
+ create_table "mks_rate_service_bundles", force: :cascade do |t|
327
+ t.string "code"
328
+ t.string "name", null: false
329
+ t.string "description"
330
+ t.float "percent_discount", default: 0.0, null: false
331
+ t.bigint "service_delivery_unit_id"
332
+ t.datetime "created_at", null: false
333
+ t.datetime "updated_at", null: false
334
+ t.index ["service_delivery_unit_id"], name: "sdu_on_sb_indx"
335
+ end
336
+
337
+ create_table "mks_rate_service_bundles_chargeable_services", id: false, force: :cascade do |t|
338
+ t.bigint "service_bundle_id"
339
+ t.bigint "chargeable_service_id"
340
+ t.index ["service_bundle_id", "chargeable_service_id"], name: "sb_on_cs_indx"
341
+ end
342
+
343
+ create_table "mks_rate_service_delivery_units", force: :cascade do |t|
344
+ t.string "code", null: false
345
+ t.string "name", null: false
346
+ t.string "address", null: false
347
+ t.datetime "created_at", null: false
348
+ t.datetime "updated_at", null: false
349
+ end
350
+
351
+ create_table "mks_rate_service_rates", force: :cascade do |t|
352
+ t.bigint "chargeable_service_id"
353
+ t.bigint "equipment_item_id"
354
+ t.float "base_rate", default: 0.0
355
+ t.float "utilization_rate", default: 0.0
356
+ t.datetime "created_at", null: false
357
+ t.datetime "updated_at", null: false
358
+ t.index ["chargeable_service_id"], name: "cs_on_sr_indx"
359
+ t.index ["equipment_item_id"], name: "cs_on_ei_indx"
360
+ end
361
+
362
+ create_table "mks_rate_service_types", force: :cascade do |t|
363
+ t.string "code"
364
+ t.string "name"
365
+ t.datetime "created_at", null: false
366
+ t.datetime "updated_at", null: false
367
+ end
368
+
369
+ create_table "mks_rate_unit_of_charges", force: :cascade do |t|
370
+ t.string "name", null: false
371
+ t.json "unit_variables", null: false
372
+ t.datetime "created_at", null: false
373
+ t.datetime "updated_at", null: false
374
+ end
375
+
376
+ create_table "mks_rent_clients", force: :cascade do |t|
377
+ t.string "name", null: false
378
+ t.string "address"
379
+ t.datetime "created_at", null: false
380
+ t.datetime "updated_at", null: false
381
+ end
382
+
383
+ create_table "mks_rent_offer_items", force: :cascade do |t|
384
+ t.bigint "service_bundle_id"
385
+ t.date "from", null: false
386
+ t.date "to", null: false
387
+ t.float "unit_price", null: false
388
+ t.bigint "offer_id"
389
+ t.datetime "created_at", null: false
390
+ t.datetime "updated_at", null: false
391
+ t.index ["offer_id"], name: "offer_on_oi_indx"
392
+ t.index ["service_bundle_id"], name: "sb_on_oi_indx"
393
+ end
394
+
395
+ create_table "mks_rent_offer_requests", force: :cascade do |t|
396
+ t.bigint "client_id"
397
+ t.string "description"
398
+ t.string "destination"
399
+ t.bigint "prepared_by_id"
400
+ t.string "status", default: "DRAFT", null: false
401
+ t.datetime "created_at", null: false
402
+ t.datetime "updated_at", null: false
403
+ t.index ["client_id"], name: "client_on_er_indx"
404
+ t.index ["prepared_by_id"], name: "equipment_on_rb_indx"
405
+ end
406
+
407
+ create_table "mks_rent_offers", force: :cascade do |t|
408
+ t.bigint "prepared_by_id"
409
+ t.bigint "offer_request_id"
410
+ t.boolean "confirmed", default: false, null: false
411
+ t.boolean "booked", default: false, null: false
412
+ t.float "total_price"
413
+ t.datetime "created_at", null: false
414
+ t.datetime "updated_at", null: false
415
+ t.index ["offer_request_id"], name: "or_on_offers_indx"
416
+ t.index ["prepared_by_id"], name: "pb_on_offers_indx"
417
+ end
418
+
419
+ create_table "mks_rent_request_items", force: :cascade do |t|
420
+ t.bigint "service_bundle_id"
421
+ t.date "from", null: false
422
+ t.date "to", null: false
423
+ t.integer "quantity", null: false
424
+ t.bigint "offer_request_id"
425
+ t.datetime "created_at", null: false
426
+ t.datetime "updated_at", null: false
427
+ t.index ["offer_request_id"], name: "or_on_er_indx"
428
+ t.index ["service_bundle_id"], name: "sb_on_er_indx"
429
+ end
430
+
74
431
  add_foreign_key "mks_auth_menus", "mks_auth_application_modules", column: "application_module_id"
75
432
  add_foreign_key "mks_auth_menus", "mks_auth_menus", column: "parent_id"
76
433
  add_foreign_key "mks_auth_menus_user_roles", "mks_auth_menus", column: "menu_id"
@@ -80,4 +437,46 @@ ActiveRecord::Schema.define(version: 2018_02_01_104912) do
80
437
  add_foreign_key "mks_auth_users_application_modules", "mks_auth_users", column: "user_id"
81
438
  add_foreign_key "mks_auth_users_user_roles", "mks_auth_user_roles", column: "user_role_id"
82
439
  add_foreign_key "mks_auth_users_user_roles", "mks_auth_users", column: "user_id"
440
+ add_foreign_key "mks_edm_equipment_categories", "mks_edm_equipment_types", column: "equipment_type_id"
441
+ add_foreign_key "mks_edm_equipment_components", "mks_edm_equipment_items", column: "equipment_item_id"
442
+ add_foreign_key "mks_edm_equipment_items", "mks_edm_equipment_locations", column: "current_location_id"
443
+ add_foreign_key "mks_edm_equipment_items", "mks_edm_equipments", column: "equipment_id"
444
+ add_foreign_key "mks_edm_equipment_locations", "mks_edm_location_types", column: "location_type_id"
445
+ add_foreign_key "mks_edm_equipment_valuations", "mks_edm_equipment_items", column: "equipment_item_id"
446
+ add_foreign_key "mks_edm_equipments", "mks_edm_equipment_categories", column: "equipment_category_id"
447
+ add_foreign_key "mks_maintenance_job_cards", "mks_auth_users", column: "checkin_by_id"
448
+ add_foreign_key "mks_maintenance_job_cards", "mks_auth_users", column: "checkout_by_id"
449
+ add_foreign_key "mks_maintenance_job_cards", "mks_auth_users", column: "prepared_by_id"
450
+ add_foreign_key "mks_maintenance_job_cards", "mks_edm_equipment_locations", column: "checkin_to_id"
451
+ add_foreign_key "mks_maintenance_job_cards", "mks_edm_equipment_locations", column: "checkout_to_id"
452
+ add_foreign_key "mks_maintenance_job_cards", "mks_edm_equipment_locations", column: "service_provider_id"
453
+ add_foreign_key "mks_maintenance_job_cards", "mks_maintenance_maintenance_service_orders", column: "maintenance_service_order_id"
454
+ add_foreign_key "mks_maintenance_job_cards", "mks_maintenance_maintenance_statuses", column: "maintenance_status_id"
455
+ add_foreign_key "mks_maintenance_maintenance_service_orders", "mks_auth_users", column: "approved_by_id"
456
+ add_foreign_key "mks_maintenance_maintenance_service_orders", "mks_auth_users", column: "prepared_by_id"
457
+ add_foreign_key "mks_maintenance_maintenance_service_orders", "mks_edm_equipment_items", column: "equipment_item_id"
458
+ add_foreign_key "mks_maintenance_maintenance_service_orders", "mks_maintenance_maintenance_types", column: "maintenance_type_id"
459
+ add_foreign_key "mks_maintenance_maintenance_types", "mks_maintenance_maintenance_categories", column: "maintenance_category_id"
460
+ add_foreign_key "mks_maintenance_schedule_settings", "mks_edm_equipments", column: "equipment_id"
461
+ add_foreign_key "mks_maintenance_schedule_settings", "mks_maintenance_maintenance_types", column: "maintenance_type_id"
462
+ add_foreign_key "mks_maintenance_schedule_settings", "mks_maintenance_schedule_units", column: "schedule_unit_id"
463
+ add_foreign_key "mks_rate_chargeable_service_discounts", "mks_rate_chargeable_services", column: "chargeable_service_id"
464
+ add_foreign_key "mks_rate_chargeable_services", "mks_rate_service_delivery_units", column: "service_delivery_unit_id"
465
+ add_foreign_key "mks_rate_chargeable_services", "mks_rate_service_types", column: "service_type_id"
466
+ add_foreign_key "mks_rate_chargeable_services", "mks_rate_unit_of_charges", column: "base_unit_id"
467
+ add_foreign_key "mks_rate_chargeable_services", "mks_rate_unit_of_charges", column: "utilization_unit_id"
468
+ add_foreign_key "mks_rate_rate_change_requests", "mks_auth_users", column: "approved_by_id"
469
+ add_foreign_key "mks_rate_rate_change_requests", "mks_auth_users", column: "created_by_id"
470
+ add_foreign_key "mks_rate_service_bundles", "mks_rate_service_delivery_units", column: "service_delivery_unit_id"
471
+ add_foreign_key "mks_rate_service_bundles_chargeable_services", "mks_rate_chargeable_services", column: "chargeable_service_id"
472
+ add_foreign_key "mks_rate_service_bundles_chargeable_services", "mks_rate_service_bundles", column: "service_bundle_id"
473
+ add_foreign_key "mks_rate_service_rates", "mks_edm_equipment_items", column: "equipment_item_id"
474
+ add_foreign_key "mks_rate_service_rates", "mks_rate_chargeable_services", column: "chargeable_service_id"
475
+ add_foreign_key "mks_rent_offer_items", "mks_rate_service_bundles", column: "service_bundle_id"
476
+ add_foreign_key "mks_rent_offer_items", "mks_rent_offers", column: "offer_id"
477
+ add_foreign_key "mks_rent_offer_requests", "mks_auth_users", column: "prepared_by_id"
478
+ add_foreign_key "mks_rent_offers", "mks_auth_users", column: "prepared_by_id"
479
+ add_foreign_key "mks_rent_offers", "mks_rent_offer_requests", column: "offer_request_id"
480
+ add_foreign_key "mks_rent_request_items", "mks_rate_service_bundles", column: "service_bundle_id"
481
+ add_foreign_key "mks_rent_request_items", "mks_rent_offer_requests", column: "offer_request_id"
83
482
  end