price-point-api/app/models/moderation_log.rb
2026-05-30 17:54:26 +03:00

25 lines
715 B
Ruby

# == Schema Information
#
# Table name: moderation_logs
#
# id :bigint not null, primary key
# moderatable_type :string not null
# reason :string
# created_at :datetime not null
# updated_at :datetime not null
# admin_id :bigint not null
# moderatable_id :integer not null
#
# Indexes
#
# index_moderation_logs_on_admin_id (admin_id)
# index_moderation_logs_on_moderatable (moderatable_type,moderatable_id)
#
# Foreign Keys
#
# fk_rails_... (admin_id => users.id)
#
class ModerationLog < ApplicationRecord
belongs_to :moderatable, polymorphic: true
belongs_to :user, foreign_key: :admin_id
end