Add Raid model and add Parties as belonging to Raids

This commit is contained in:
Justin Edmund 2022-02-23 18:11:03 -08:00
parent 6175c909ee
commit bb736ce084
2 changed files with 3 additions and 0 deletions

View file

@ -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
View file

@ -0,0 +1,2 @@
class Raid < ApplicationRecord
end