about summary refs log tree commit diff
path: root/app/models/instance.rb
diff options
context:
space:
mode:
authorTakeshi Umeda <noel.yoshiba@gmail.com>2021-05-06 06:39:02 +0900
committerGitHub <noreply@github.com>2021-05-05 23:39:02 +0200
commit7cb34b32f8bc925b56c79dbcf053671f93f2eb42 (patch)
treeb05d123350c4af203a6009418b1bfc7056820b27 /app/models/instance.rb
parentd9ae3db8d5543cf0b7fa44186c191c9bb2472d23 (diff)
Add management of delivery availability in Federation settings (#15771)
* Add management of delivery availavility in Federation settings

* fix translate

* Remove useless object creation

* Fix DeepSource issue

* Add shortcut for all

* Fix DeepSource(skipcq)

* Change 'remove' to 'clear'

* Fix style

* Change class method name (exhausted_deliveries_key_by)
Diffstat (limited to 'app/models/instance.rb')
-rw-r--r--app/models/instance.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/instance.rb b/app/models/instance.rb
index 29be03662..8949be054 100644
--- a/app/models/instance.rb
+++ b/app/models/instance.rb
@@ -10,10 +10,13 @@
 class Instance < ApplicationRecord
   self.primary_key = :domain
 
+  attr_accessor :failure_days
+
   has_many :accounts, foreign_key: :domain, primary_key: :domain
 
   belongs_to :domain_block, foreign_key: :domain, primary_key: :domain
   belongs_to :domain_allow, foreign_key: :domain, primary_key: :domain
+  belongs_to :unavailable_domain, foreign_key: :domain, primary_key: :domain # skipcq: RB-RL1031
 
   scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) }