summaryrefslogtreecommitdiff
path: root/app/models/users/banned_user.rb
blob: c52b6d4b7284f00785f2d713e1e114eb4d450d42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

module Users
  class BannedUser < ApplicationRecord
    self.primary_key = :user_id

    belongs_to :user

    validates :user, presence: true
    validates :user_id, uniqueness: { message: _("banned user already exists") }
  end
end