mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 02:09:39 +02:00
21 lines
369 B
Ruby
21 lines
369 B
Ruby
class DomainStatus < ActiveRecord::Base
|
|
# Domain statuses are stored as settings
|
|
include EppErrors
|
|
|
|
EPP_ATTR_MAP = {
|
|
setting: 'status'
|
|
}
|
|
|
|
belongs_to :domain
|
|
belongs_to :setting
|
|
|
|
delegate :value, :code, to: :setting
|
|
|
|
validates :setting, uniqueness: { scope: :domain_id }
|
|
|
|
def epp_code_map
|
|
{
|
|
'2302' => [[:setting, :taken]]
|
|
}
|
|
end
|
|
end
|