Adds the sla policy association to the conversation Fixes: https://linear.app/chatwoot/issue/CW-1615/applying-an-sla-to-the-conversation
24 lines
700 B
Ruby
24 lines
700 B
Ruby
# == Schema Information
|
|
#
|
|
# Table name: sla_policies
|
|
#
|
|
# id :bigint not null, primary key
|
|
# frt_threshold :float
|
|
# name :string not null
|
|
# only_during_business_hours :boolean default(FALSE)
|
|
# rt_threshold :float
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
# account_id :bigint not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_sla_policies_on_account_id (account_id)
|
|
#
|
|
class SlaPolicy < ApplicationRecord
|
|
belongs_to :account
|
|
validates :name, presence: true
|
|
|
|
has_many :conversations, dependent: :nullify
|
|
end
|