Files
canine/app/models/user.rb
Celina Lopez 520242f7fd lots
2024-09-25 14:34:26 -07:00

35 lines
1.3 KiB
Ruby

# == Schema Information
#
# Table name: users
#
# id :bigint not null, primary key
# admin :boolean default(FALSE)
# announcements_last_read_at :datetime
# email :string default(""), not null
# encrypted_password :string default(""), not null
# first_name :string
# last_name :string
# remember_created_at :datetime
# reset_password_sent_at :datetime
# reset_password_token :string
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_users_on_email (email) UNIQUE
# index_users_on_reset_password_token (reset_password_token) UNIQUE
#
class User < ApplicationRecord
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable, :omniauthable
has_one_attached :avatar
has_person_name
has_many :notifications, as: :recipient, dependent: :destroy, class_name: "Noticed::Notification"
has_many :notification_mentions, as: :record, dependent: :destroy, class_name: "Noticed::Event"
has_many :services
end