Chatwoot/app/models/telegram_bot.rb
Mukesh Chaudhary c08074b981 Annotations (#327)
* Add annotate gem to the project
* Annotate models, fixtures, factories and model_specs
* Keep annotations only in Models
* Remove unwanted changes in model specs
* Exclude auto_annotate_models from rubocop
2019-11-30 19:09:55 +05:30

17 lines
434 B
Ruby

# == 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
#
class TelegramBot < ApplicationRecord
belongs_to :account
has_one :inbox, as: :channel, dependent: :destroy
validates_uniqueness_of :auth_key, scope: :account_id
end