chore: Add sla policy association to conversation (#7360)

Adds the sla policy association to the conversation

Fixes: https://linear.app/chatwoot/issue/CW-1615/applying-an-sla-to-the-conversation
This commit is contained in:
Sojan Jose
2023-06-21 14:48:50 +05:30
committed by GitHub
parent 93d8157a55
commit 595e6e79f0
8 changed files with 32 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
module Enterprise::EnterpriseConversationConcern
extend ActiveSupport::Concern
included do
belongs_to :sla_policy, optional: true
end
end

View File

@@ -18,4 +18,6 @@
class SlaPolicy < ApplicationRecord
belongs_to :account
validates :name, presence: true
has_many :conversations, dependent: :nullify
end