ぼざクリタグ広場 https://hub.nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

14 lines
551 B

  1. class Theatre < ApplicationRecord
  2. include MyDiscard
  3. has_many :comments, class_name: 'TheatreComment'
  4. has_many :theatre_watching_users, dependent: :delete_all
  5. has_many :active_theatre_watching_users, -> { active },
  6. class_name: 'TheatreWatchingUser', inverse_of: :theatre
  7. has_many :watching_users, through: :active_theatre_watching_users, source: :user
  8. belongs_to :host_user, class_name: 'User', optional: true
  9. belongs_to :current_post, class_name: 'Post', optional: true
  10. belongs_to :created_by_user, class_name: 'User'
  11. end