上映会のし組み作り(#295) (#296)
#295 #295 #295 #295 #295 #295 #295 Co-authored-by: miteruzo <miteruzo@naver.com> Reviewed-on: #296
This commit was merged in pull request #296.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
class Theatre < ApplicationRecord
|
||||
include MyDiscard
|
||||
|
||||
has_many :comments, class_name: 'TheatreComment'
|
||||
has_many :theatre_watching_users, dependent: :delete_all
|
||||
has_many :active_theatre_watching_users, -> { active },
|
||||
class_name: 'TheatreWatchingUser', inverse_of: :theatre
|
||||
has_many :watching_users, through: :active_theatre_watching_users, source: :user
|
||||
|
||||
belongs_to :host_user, class_name: 'User', optional: true
|
||||
belongs_to :current_post, class_name: 'Post', optional: true
|
||||
belongs_to :created_by_user, class_name: 'User'
|
||||
end
|
||||
Reference in New Issue
Block a user