mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
added record for successfully validated nameservers
This commit is contained in:
parent
d896e5f716
commit
a9a95e373c
3 changed files with 39 additions and 3 deletions
|
@ -34,6 +34,8 @@ class Nameserver < ApplicationRecord
|
|||
|
||||
delegate :name, to: :domain, prefix: true
|
||||
|
||||
scope :non_validated, -> { where(validation_datetime: nil) }
|
||||
|
||||
self.ignored_columns = %w[legacy_domain_id]
|
||||
|
||||
def epp_code_map
|
||||
|
@ -53,6 +55,18 @@ class Nameserver < ApplicationRecord
|
|||
}
|
||||
end
|
||||
|
||||
def nameserver_failed_validation?
|
||||
return false if validation_counter.nil?
|
||||
|
||||
validation_counter >= NameserverValidator::VALID_NAMESERVER_COUNT_THRESHOLD
|
||||
end
|
||||
|
||||
def validated?
|
||||
return false if validation_datetime.nil?
|
||||
|
||||
validation_datetime + NameserverValidator::VALIDATION_NAMESERVER_PERIOD > Time.zone.now
|
||||
end
|
||||
|
||||
def to_s
|
||||
hostname
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue