mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 15:53:41 +08:00
463eff2bbf
This column is ignored since 62f423d
32 lines
920 B
Ruby
32 lines
920 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Chat
|
|
class Mention < ActiveRecord::Base
|
|
self.table_name = "chat_mentions"
|
|
self.ignored_columns = %w[notification_id user_id]
|
|
|
|
belongs_to :chat_message, class_name: "Chat::Message"
|
|
has_many :mention_notifications,
|
|
class_name: "Chat::MentionNotification",
|
|
foreign_key: :chat_mention_id
|
|
has_many :notifications, through: :mention_notifications, dependent: :destroy
|
|
end
|
|
end
|
|
|
|
# == Schema Information
|
|
#
|
|
# Table name: chat_mentions
|
|
#
|
|
# id :bigint not null, primary key
|
|
# chat_message_id :integer not null
|
|
# target_id :integer
|
|
# type :integer not null
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_chat_mentions_on_chat_message_id (chat_message_id)
|
|
# index_chat_mentions_on_target_id (target_id)
|
|
#
|