debian-mirror-gitlab/app/models/users/namespace_commit_email.rb
2023-01-13 15:02:22 +05:30

14 lines
350 B
Ruby

# frozen_string_literal: true
module Users
class NamespaceCommitEmail < ApplicationRecord
belongs_to :user
belongs_to :namespace
belongs_to :email
validates :user, presence: true
validates :namespace, presence: true
validates :email, presence: true
validates :user_id, uniqueness: { scope: [:namespace_id] }
end
end