Feature: API Channel (#1052)
This commit is contained in:
19
app/models/channel/api.rb
Normal file
19
app/models/channel/api.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
# == 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
|
||||
end
|
||||
Reference in New Issue
Block a user