2018-08-30 11:07:17 +02:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: check_notifications
|
|
|
|
#
|
|
|
|
# id :bigint(8) not null, primary key
|
|
|
|
# sent_at :datetime
|
|
|
|
# status :integer default("pending"), not null
|
|
|
|
# created_at :datetime not null
|
|
|
|
# updated_at :datetime not null
|
|
|
|
# check_id :bigint(8)
|
|
|
|
# notification_id :bigint(8)
|
|
|
|
#
|
|
|
|
# Indexes
|
|
|
|
#
|
|
|
|
# index_check_notifications_on_check_id (check_id)
|
|
|
|
# index_check_notifications_on_notification_id (notification_id)
|
|
|
|
#
|
|
|
|
# Foreign Keys
|
|
|
|
#
|
|
|
|
# fk_rails_... (check_id => checks.id)
|
|
|
|
# fk_rails_... (notification_id => notifications.id)
|
|
|
|
#
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :check_notification do
|
|
|
|
check
|
|
|
|
notification
|
2019-03-02 17:50:37 +01:00
|
|
|
status { :pending }
|
|
|
|
sent_at { nil }
|
2018-08-30 11:07:17 +02:00
|
|
|
|
|
|
|
trait :ongoing do
|
2019-03-02 17:50:37 +01:00
|
|
|
status { :ongoing }
|
2018-08-30 11:07:17 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :succeed do
|
2019-03-02 17:50:37 +01:00
|
|
|
status { :succeed }
|
2018-08-30 11:07:17 +02:00
|
|
|
sent_at { 1.day.ago }
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :failed do
|
2019-03-02 17:50:37 +01:00
|
|
|
status { :failed }
|
2018-08-30 11:07:17 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|