price-point-api/app/models/moderation_log.rb

26 lines
715 B
Ruby
Raw Permalink Normal View History

2026-05-25 16:15:06 +00:00
# == 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
2026-05-30 14:54:26 +00:00
# admin_id :bigint not null
2026-05-25 16:15:06 +00:00
# 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
#
2026-05-30 14:54:26 +00:00
# fk_rails_... (admin_id => users.id)
2026-05-25 16:15:06 +00:00
#
2026-05-17 11:12:43 +00:00
class ModerationLog < ApplicationRecord
belongs_to :moderatable, polymorphic: true
2026-05-30 14:54:26 +00:00
belongs_to :user, foreign_key: :admin_id
2026-05-17 11:12:43 +00:00
end