cats_core 1.3.6 → 1.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/cats/core/monthly_plan.rb +11 -0
- data/app/models/cats/core/monthly_plan_item.rb +10 -0
- data/app/models/cats/core/monthly_plan_item_detail.rb +10 -0
- data/app/models/cats/core/regional_request.rb +1 -1
- data/db/migrate/20220107121752_create_cats_core_monthly_plans.rb +18 -0
- data/db/migrate/20220107125025_create_cats_core_monthly_plan_items.rb +17 -0
- data/db/migrate/20220107132433_create_cats_core_monthly_plan_item_details.rb +17 -0
- data/lib/cats/core/version.rb +1 -1
- data/spec/factories/cats/core/monthly_plan_item_details.rb +7 -0
- data/spec/factories/cats/core/monthly_plan_items.rb +7 -0
- data/spec/factories/cats/core/monthly_plans.rb +8 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9380d0ff2181f5043d3c4d4f6251dde2561d5b08013959b6848558b505dbba2d
|
4
|
+
data.tar.gz: 1dc278bcfb116197b0c04620de35f042669a11e5690ce14fa93959a252f0e922
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cecc9ef0cf5fc29c4b912e5b513afd23db6f6d607a93bdcd927348b2f11928df5624ccde4ae80b12048db368f1da25f4b8781b5a22014cb1b1fc2e0e251dba5
|
7
|
+
data.tar.gz: e3e5fbbe9e672a276f80a1d90e5c4b6a1958b5ccf894b1196387a7e9f50ce44a3d8285afdbcc8100c04b91702f9efa55b3b099074fd44330c6aa3ec38df53f6b
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Cats
|
2
|
+
module Core
|
3
|
+
class MonthlyPlan < ApplicationRecord
|
4
|
+
belongs_to :ration
|
5
|
+
belongs_to :plan
|
6
|
+
|
7
|
+
validates :reference_no, presence: true, uniqueness: true
|
8
|
+
validates :status, presence: true, inclusion: { in: Cats::Core::Plan::STATUSES }
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateCatsCoreMonthlyPlans < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
create_table :cats_core_monthly_plans do |t|
|
4
|
+
t.string :reference_no, unique: true
|
5
|
+
t.string :status, null: false, default: 'Draft'
|
6
|
+
t.references :ration,
|
7
|
+
null: false,
|
8
|
+
index: { name: 'ration_on_mp_indx' },
|
9
|
+
foreign_key: { to_table: :cats_core_rations }
|
10
|
+
t.references :plan,
|
11
|
+
null: false,
|
12
|
+
index: { name: 'plan_on_mp_indx' },
|
13
|
+
foreign_key: { to_table: :cats_core_plans }
|
14
|
+
|
15
|
+
t.timestamps
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateCatsCoreMonthlyPlanItems < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
create_table :cats_core_monthly_plan_items do |t|
|
4
|
+
t.references :monthly_plan,
|
5
|
+
null: false,
|
6
|
+
index: { name: 'mp_on_mpi_indx' },
|
7
|
+
foreign_key: { to_table: :cats_core_monthly_plans }
|
8
|
+
t.integer :beneficiaries, null: false
|
9
|
+
t.references :plan_item,
|
10
|
+
null: false,
|
11
|
+
index: { name: 'pi_on_mpi_indx' },
|
12
|
+
foreign_key: { to_table: :cats_core_plan_items }
|
13
|
+
|
14
|
+
t.timestamps
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateCatsCoreMonthlyPlanItemDetails < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
create_table :cats_core_monthly_plan_item_details do |t|
|
4
|
+
t.references :monthly_plan_item,
|
5
|
+
null: false,
|
6
|
+
index: { name: 'mpi_on_mpid_indx' },
|
7
|
+
foreign_key: { to_table: :cats_core_monthly_plan_items }
|
8
|
+
t.references :ration_item,
|
9
|
+
null: false,
|
10
|
+
index: { name: 'ri_on_mpid_indx' },
|
11
|
+
foreign_key: { to_table: :cats_core_ration_items }
|
12
|
+
t.float :amount, null: false
|
13
|
+
|
14
|
+
t.timestamps
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/cats/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cats_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henock L.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|
@@ -269,6 +269,9 @@ files:
|
|
269
269
|
- app/models/cats/core/location.rb
|
270
270
|
- app/models/cats/core/menu.rb
|
271
271
|
- app/models/cats/core/menu_item.rb
|
272
|
+
- app/models/cats/core/monthly_plan.rb
|
273
|
+
- app/models/cats/core/monthly_plan_item.rb
|
274
|
+
- app/models/cats/core/monthly_plan_item_detail.rb
|
272
275
|
- app/models/cats/core/notification.rb
|
273
276
|
- app/models/cats/core/notification_rule.rb
|
274
277
|
- app/models/cats/core/offer_item.rb
|
@@ -382,6 +385,9 @@ files:
|
|
382
385
|
- db/migrate/20211229160129_create_cats_core_commodity_substitutions.rb
|
383
386
|
- db/migrate/20220103152802_create_cats_core_tenderers.rb
|
384
387
|
- db/migrate/20220105084347_create_cats_core_regional_requests.rb
|
388
|
+
- db/migrate/20220107121752_create_cats_core_monthly_plans.rb
|
389
|
+
- db/migrate/20220107125025_create_cats_core_monthly_plan_items.rb
|
390
|
+
- db/migrate/20220107132433_create_cats_core_monthly_plan_item_details.rb
|
385
391
|
- lib/cats/core.rb
|
386
392
|
- lib/cats/core/engine.rb
|
387
393
|
- lib/cats/core/version.rb
|
@@ -405,6 +411,9 @@ files:
|
|
405
411
|
- spec/factories/cats/core/locations.rb
|
406
412
|
- spec/factories/cats/core/menu_items.rb
|
407
413
|
- spec/factories/cats/core/menus.rb
|
414
|
+
- spec/factories/cats/core/monthly_plan_item_details.rb
|
415
|
+
- spec/factories/cats/core/monthly_plan_items.rb
|
416
|
+
- spec/factories/cats/core/monthly_plans.rb
|
408
417
|
- spec/factories/cats/core/notification_rules.rb
|
409
418
|
- spec/factories/cats/core/notifications.rb
|
410
419
|
- spec/factories/cats/core/offer_items.rb
|