forgeplus/app/models/system_notification.rb

21 lines
457 B
Ruby
Raw Normal View History

2021-10-12 16:14:45 +08:00
# == Schema Information
#
# Table name: system_notifications
#
# id :integer not null, primary key
# subject :string(255)
# sub_subject :string(255)
2021-10-13 17:13:57 +08:00
# content :text(65535)
# is_top :boolean
2021-10-12 16:14:45 +08:00
# created_at :datetime not null
# updated_at :datetime not null
#
class SystemNotification < ApplicationRecord
2021-10-12 16:34:00 +08:00
default_scope { order(created_at: :desc)}
scope :is_top, lambda { where(is_top: true) }
2021-10-12 16:14:45 +08:00
end