forgeplus/app/models/diff_record.rb

27 lines
695 B
Ruby
Raw Normal View History

2020-11-23 15:35:03 +08:00
# == Schema Information
#
# Table name: diff_records
#
# id :integer not null, primary key
# user_id :integer
# container_type :string(255)
# container_id :integer
# column_name :string(255)
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_diff_records_on_container_type_and_container_id (container_type,container_id)
# index_diff_records_on_user_id (user_id)
#
2020-03-09 00:40:16 +08:00
class DiffRecord < ApplicationRecord
belongs_to :user
belongs_to :container, polymorphic: true
has_one :diff_record_content, dependent: :destroy
delegate :content, to: :diff_record_content
2020-11-23 15:35:03 +08:00
end