2019-11-30 13:39:55 +00:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: telegram_bots
|
|
|
|
#
|
|
|
|
# id :integer not null, primary key
|
|
|
|
# auth_key :string
|
|
|
|
# name :string
|
|
|
|
# created_at :datetime not null
|
|
|
|
# updated_at :datetime not null
|
|
|
|
# account_id :integer
|
|
|
|
#
|
|
|
|
|
2019-08-14 09:48:44 +00:00
|
|
|
class TelegramBot < ApplicationRecord
|
|
|
|
belongs_to :account
|
2021-11-18 05:02:29 +00:00
|
|
|
has_one :inbox, as: :channel, dependent: :destroy_async
|
2019-08-14 09:48:44 +00:00
|
|
|
validates_uniqueness_of :auth_key, scope: :account_id
|
|
|
|
end
|