Welcome to mirror list, hosted at ThFree Co, Russian Federation.

alert_assignee.rb « alert_management « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c74b269918220b89b89d40976b25dd8d276173d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

module AlertManagement
  class AlertAssignee < ApplicationRecord
    belongs_to :alert, inverse_of: :alert_assignees
    belongs_to :assignee, class_name: 'User', foreign_key: :user_id

    validates :alert, presence: true
    validates :assignee, presence: true, uniqueness: { scope: :alert_id }
  end
end