Add Raid model and add Parties as belonging to Raids
This commit is contained in:
parent
6175c909ee
commit
bb736ce084
2 changed files with 3 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
class Party < ApplicationRecord
|
||||
##### ActiveRecord Associations
|
||||
belongs_to :user, optional: true
|
||||
belongs_to :raid, optional: true
|
||||
has_many :characters, foreign_key: "party_id", class_name: "GridCharacter", dependent: :destroy
|
||||
has_many :weapons, foreign_key: "party_id", class_name: "GridWeapon", dependent: :destroy
|
||||
has_many :summons, foreign_key: "party_id", class_name: "GridSummon", dependent: :destroy
|
||||
|
|
|
|||
2
app/models/raid.rb
Normal file
2
app/models/raid.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
class Raid < ApplicationRecord
|
||||
end
|
||||
Loading…
Reference in a new issue