forgeplus/app/models/message_detail.rb

21 lines
504 B
Ruby
Raw Normal View History

2021-04-19 18:36:02 +08:00
# == Schema Information
#
# Table name: message_details
#
# id :integer not null, primary key
# content :text(4294967295)
# message_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_message_details_on_message_id (message_id)
#
2020-03-09 00:40:16 +08:00
class MessageDetail < ApplicationRecord
2020-04-23 11:08:29 +08:00
# belongs_to :message, :touch => true
2020-03-09 00:40:16 +08:00
validates :content, length: { maximum: 10000, too_long: "内容不能超过10000个字符" }
end