diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-02 15:10:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-02 15:10:15 +0300 |
commit | bdf5d637dab13620c56063c628274746182196ad (patch) | |
tree | ac85f7fd0a998f0edd373adebf5a71f8714e9c2b /app/models/merge_request_reviewer.rb | |
parent | 0c178b535cda98a248e136ba5128f0d903edb17d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/merge_request_reviewer.rb')
-rw-r--r-- | app/models/merge_request_reviewer.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/merge_request_reviewer.rb b/app/models/merge_request_reviewer.rb index c4e5274f832..4a1f31a7f39 100644 --- a/app/models/merge_request_reviewer.rb +++ b/app/models/merge_request_reviewer.rb @@ -1,6 +1,15 @@ # frozen_string_literal: true class MergeRequestReviewer < ApplicationRecord + enum state: { + unreviewed: 0, + reviewed: 1 + } + + validates :state, + presence: true, + inclusion: { in: MergeRequestReviewer.states.keys } + belongs_to :merge_request belongs_to :reviewer, class_name: 'User', foreign_key: :user_id, inverse_of: :merge_request_reviewers end |