mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-25 20:15:50 +08:00
1. Use separate caches for plugins and core 2. Don't load plugins in non-plugin jobs 3. Propagate LOAD_PLUGINS to all steps 4. Check annotations of plugin models 5. Update outdated annotations
27 lines
751 B
Ruby
Vendored
27 lines
751 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module Chat
|
|
class DirectMessageUser < ActiveRecord::Base
|
|
self.table_name = "direct_message_users"
|
|
|
|
belongs_to :direct_message,
|
|
class_name: "Chat::DirectMessage",
|
|
foreign_key: :direct_message_channel_id
|
|
belongs_to :user
|
|
end
|
|
end
|
|
|
|
# == Schema Information
|
|
#
|
|
# Table name: direct_message_users
|
|
#
|
|
# id :bigint not null, primary key
|
|
# direct_message_channel_id :bigint not null
|
|
# user_id :integer not null
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# direct_message_users_index (direct_message_channel_id,user_id) UNIQUE
|
|
#
|