Files
discourse/plugins/chat/app/models/chat/message_reaction.rb
David Battersby 6e672557fa DEV: add maxlength to additional chat text columns (#23505)
Add additional limits to text columns for chat.
2023-09-12 14:52:50 +08:00

29 lines
661 B
Ruby

# frozen_string_literal: true
module Chat
class MessageReaction < ActiveRecord::Base
self.table_name = "chat_message_reactions"
belongs_to :chat_message, class_name: "Chat::Message"
belongs_to :user
validates :emoji, length: { maximum: 100 }
end
end
# == Schema Information
#
# Table name: chat_message_reactions
#
# id :bigint not null, primary key
# chat_message_id :integer
# user_id :integer
# emoji :string
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# chat_message_reactions_index (chat_message_id,user_id,emoji) UNIQUE
#