Newer
Older
# == Schema Information
#
# Table name: communication_website_posts
#
# id :uuid not null, primary key
# description :text
# published :boolean default(FALSE)
# published_at :datetime
# text :text
# title :string
# created_at :datetime not null
# updated_at :datetime not null
# communication_website_id :uuid not null
# university_id :uuid not null
#
# Indexes
#
# index_communication_website_posts_on_communication_website_id (communication_website_id)
# index_communication_website_posts_on_university_id (university_id)
#
# Foreign Keys
#
# fk_rails_... (communication_website_id => communication_websites.id)
# fk_rails_... (university_id => universities.id)
#
class Communication::Website::Post < ApplicationRecord
belongs_to :university
belongs_to :website,
foreign_key: :communication_website_id
has_one :imported_post,
class_name: 'Communication::Website::Imported::Post',