feat: Add a view for mentions (#3505)

- Added a new table mentions for saving user mentions
- Added a filter conversation_type in the API
- Added a view to see the mentions
This commit is contained in:
Pranav Raj S
2021-12-08 21:50:14 -08:00
committed by GitHub
parent 1db82f235d
commit 2be71e73dc
28 changed files with 389 additions and 98 deletions

View File

@@ -531,6 +531,19 @@ ActiveRecord::Schema.define(version: 2021_12_08_085931) do
t.index ["title", "account_id"], name: "index_labels_on_title_and_account_id", unique: true
end
create_table "mentions", force: :cascade do |t|
t.bigint "user_id", null: false
t.bigint "conversation_id", null: false
t.bigint "account_id", null: false
t.datetime "mentioned_at", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["account_id"], name: "index_mentions_on_account_id"
t.index ["conversation_id"], name: "index_mentions_on_conversation_id"
t.index ["user_id", "conversation_id"], name: "index_mentions_on_user_id_and_conversation_id", unique: true
t.index ["user_id"], name: "index_mentions_on_user_id"
end
create_table "messages", id: :serial, force: :cascade do |t|
t.text "content"
t.integer "account_id", null: false
@@ -764,6 +777,8 @@ ActiveRecord::Schema.define(version: 2021_12_08_085931) do
add_foreign_key "csat_survey_responses", "messages"
add_foreign_key "csat_survey_responses", "users", column: "assigned_agent_id"
add_foreign_key "data_imports", "accounts"
add_foreign_key "mentions", "conversations"
add_foreign_key "mentions", "users"
add_foreign_key "notes", "accounts"
add_foreign_key "notes", "contacts"
add_foreign_key "notes", "users"