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.
|
class PrivateMessage < ApplicationRecord
|
|
belongs_to :user
|
|
belongs_to :target, class_name: "User"
|
|
belongs_to :sender, class_name: "User"
|
|
belongs_to :receiver, class_name: "User"
|
|
|
|
scope :without_deleted, -> { where.not(status: 2) }
|
|
scope :only_unread, -> { where(status: 0) }
|
|
end
|