|
- # == Schema Information
- #
- # Table name: reviews
- #
- # id :integer not null, primary key
- # issue_id :integer
- # reviewer_id :integer
- # content :text(65535)
- # commit_id :string(255)
- # status :integer default("0")
- # created_at :datetime not null
- # updated_at :datetime not null
- #
- # Indexes
- #
- # index_reviews_on_issue_id (issue_id)
- # index_reviews_on_reviewer_id (reviewer_id)
- #
-
- class Review < ApplicationRecord
-
- belongs_to :issue
- belongs_to :reviewer, class_name: 'User', foreign_key: :reviewer_id
- has_one :journal, dependent: :destroy
-
- enum status: {common: 0, approved: 1, rejected: 2}
- end
|