From 4a6c06eb681575dbf1ee58d3b1f667e79051b1e2 Mon Sep 17 00:00:00 2001 From: David Gay Date: Tue, 18 May 2021 18:16:04 -0400 Subject: Hearths, HearthAmenities, and BuiltHearthAmenities --- app/models/built_hearth_amenity.rb | 4 ++++ app/models/character.rb | 1 + app/models/hearth.rb | 3 +++ app/models/hearth_amenity.rb | 2 ++ 4 files changed, 10 insertions(+) create mode 100644 app/models/built_hearth_amenity.rb create mode 100644 app/models/hearth.rb create mode 100644 app/models/hearth_amenity.rb (limited to 'app/models') diff --git a/app/models/built_hearth_amenity.rb b/app/models/built_hearth_amenity.rb new file mode 100644 index 0000000..c4d5a53 --- /dev/null +++ b/app/models/built_hearth_amenity.rb @@ -0,0 +1,4 @@ +class BuiltHearthAmenity < ApplicationRecord + belongs_to :hearth + belongs_to :hearth_amenity +end diff --git a/app/models/character.rb b/app/models/character.rb index 7df48e8..661521b 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -1,6 +1,7 @@ class Character < ApplicationRecord belongs_to :user belongs_to :activity, optional: true + has_one :hearth has_many :character_items has_many :items, through: :character_items has_many :character_skills diff --git a/app/models/hearth.rb b/app/models/hearth.rb new file mode 100644 index 0000000..8885a08 --- /dev/null +++ b/app/models/hearth.rb @@ -0,0 +1,3 @@ +class Hearth < ApplicationRecord + belongs_to :character +end diff --git a/app/models/hearth_amenity.rb b/app/models/hearth_amenity.rb new file mode 100644 index 0000000..ecc136a --- /dev/null +++ b/app/models/hearth_amenity.rb @@ -0,0 +1,2 @@ +class HearthAmenity < ApplicationRecord +end -- cgit v1.2.3