class GtopicBank < ApplicationRecord
  belongs_to :user
  belongs_to :graduation_topic
  belongs_to :course_list

  has_many :attachments, as: :container, dependent: :destroy
  has_many :graduation_topics, dependent: :nullify

  scope :myself, ->(user_id) { where(user_id: user_id)}
end
