feat: Add APIs for Campaigns (#2175)
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
# updated_at :datetime not null
|
||||
# account_id :integer not null
|
||||
# assignee_id :integer
|
||||
# campaign_id :bigint
|
||||
# contact_id :bigint
|
||||
# contact_inbox_id :bigint
|
||||
# display_id :integer not null
|
||||
@@ -24,11 +25,13 @@
|
||||
#
|
||||
# index_conversations_on_account_id (account_id)
|
||||
# index_conversations_on_account_id_and_display_id (account_id,display_id) UNIQUE
|
||||
# index_conversations_on_campaign_id (campaign_id)
|
||||
# index_conversations_on_contact_inbox_id (contact_inbox_id)
|
||||
# index_conversations_on_team_id (team_id)
|
||||
#
|
||||
# Foreign Keys
|
||||
#
|
||||
# fk_rails_... (campaign_id => campaigns.id)
|
||||
# fk_rails_... (contact_inbox_id => contact_inboxes.id)
|
||||
# fk_rails_... (team_id => teams.id)
|
||||
#
|
||||
@@ -54,6 +57,7 @@ class Conversation < ApplicationRecord
|
||||
belongs_to :contact
|
||||
belongs_to :contact_inbox
|
||||
belongs_to :team, optional: true
|
||||
belongs_to :campaign, optional: true
|
||||
|
||||
has_many :messages, dependent: :destroy, autosave: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user