debian-mirror-gitlab/app/models/merge_request_reviewer.rb
2022-07-16 19:58:13 +02:00

12 lines
332 B
Ruby

# frozen_string_literal: true
class MergeRequestReviewer < ApplicationRecord
include MergeRequestReviewerState
belongs_to :merge_request
belongs_to :reviewer, class_name: 'User', foreign_key: :user_id, inverse_of: :merge_request_reviewers
def cache_key
[model_name.cache_key, id, state, reviewer.cache_key]
end
end