mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
11 lines
239 B
Ruby
11 lines
239 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Notification < ApplicationRecord
|
|
belongs_to :user
|
|
|
|
validates :title, :content, :kind, presence: true
|
|
|
|
enum kind: { info: 0, warning: 1, error: 2 }
|
|
|
|
scope :unread, -> { where(read_at: nil) }
|
|
end
|