mirror of
https://github.com/czhu12/canine.git
synced 2026-01-06 11:40:44 -06:00
35 lines
1.3 KiB
Ruby
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
|