2020-07-21 06:45:24 +00:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: channel_api
|
|
|
|
#
|
|
|
|
# id :bigint not null, primary key
|
|
|
|
# webhook_url :string not null
|
|
|
|
# created_at :datetime not null
|
|
|
|
# updated_at :datetime not null
|
|
|
|
# account_id :integer not null
|
|
|
|
#
|
|
|
|
|
|
|
|
class Channel::Api < ApplicationRecord
|
|
|
|
self.table_name = 'channel_api'
|
|
|
|
|
|
|
|
validates :account_id, presence: true
|
|
|
|
belongs_to :account
|
|
|
|
|
|
|
|
has_one :inbox, as: :channel, dependent: :destroy
|
2020-07-25 17:24:45 +00:00
|
|
|
|
2020-09-04 13:43:47 +00:00
|
|
|
def name
|
|
|
|
'API'
|
|
|
|
end
|
|
|
|
|
2020-07-25 17:24:45 +00:00
|
|
|
def has_24_hour_messaging_window?
|
|
|
|
false
|
|
|
|
end
|
2020-07-21 06:45:24 +00:00
|
|
|
end
|