You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/models/private_message.rb

13 lines
588 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

class PrivateMessage < ActiveRecord::Base
belongs_to :user
belongs_to :target, :class_name => 'User', :foreign_key => 'target_id'
# user_id 发送者id非真实发送者id
# target_id 接受者id非真实接受者id
# sender_id发送者id真实的发送者id
# receiver_id接受者id真实的接受者id
# content消息内容
# send_time消息发送时间
# status消息状态 0未读 1已读 2删除标记不同消息状态
attr_accessible :content, :receiver_id, :send_time, :sender_id, :status, :target_id, :user_id
end