# frozen_string_literal: true # == Schema Information # # Table name: static_page_versions # # id :bigint not null, primary key # body :text not null # slug :text not null # title :text not null # created_at :datetime not null # updated_at :datetime not null # static_page_id :bigint not null # user_id :bigint not null # # Indexes # # index_static_page_versions_on_static_page_id (static_page_id) # index_static_page_versions_on_user_id (user_id) # # Foreign Keys # # fk_rails_... (static_page_id => static_pages.id) ON DELETE => restrict ON UPDATE => cascade # fk_rails_... (user_id => users.id) ON DELETE => restrict ON UPDATE => cascade # class StaticPage::Version < ApplicationRecord belongs_to :user belongs_to :static_page validates :title, presence: true validates :slug, presence: true validates :body, presence: true end