mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 04:33:45 +08:00
b58867b6e9
Includes support for flags, reviewable users and queued posts, with REST API backwards compatibility. Co-Authored-By: romanrizzi <romanalejandro@gmail.com> Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
33 lines
864 B
Ruby
33 lines
864 B
Ruby
class ReviewableHistory < ActiveRecord::Base
|
|
belongs_to :reviewable
|
|
belongs_to :created_by, class_name: 'User'
|
|
|
|
def self.types
|
|
@types ||= Enum.new(
|
|
created: 0,
|
|
transitioned: 1,
|
|
edited: 2
|
|
)
|
|
end
|
|
|
|
end
|
|
|
|
# == Schema Information
|
|
#
|
|
# Table name: reviewable_histories
|
|
#
|
|
# id :bigint(8) not null, primary key
|
|
# reviewable_id :integer not null
|
|
# reviewable_history_type :integer not null
|
|
# status :integer not null
|
|
# created_by_id :integer not null
|
|
# edited :json
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_reviewable_histories_on_created_by_id (created_by_id)
|
|
# index_reviewable_histories_on_reviewable_id (reviewable_id)
|
|
#
|