2020-11-24 15:15:51 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class MergeRequestReviewer < ApplicationRecord
|
2021-03-11 19:13:27 +05:30
|
|
|
enum state: {
|
|
|
|
unreviewed: 0,
|
|
|
|
reviewed: 1
|
|
|
|
}
|
|
|
|
|
|
|
|
validates :state,
|
|
|
|
presence: true,
|
|
|
|
inclusion: { in: MergeRequestReviewer.states.keys }
|
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
belongs_to :merge_request
|
2021-02-22 17:27:13 +05:30
|
|
|
belongs_to :reviewer, class_name: 'User', foreign_key: :user_id, inverse_of: :merge_request_reviewers
|
2020-11-24 15:15:51 +05:30
|
|
|
end
|