# == Schema Information # # Table name: users # # id :bigint not null, primary key # email :string # name :string # password_digest :string # role :integer # created_at :datetime not null # updated_at :datetime not null # # Indexes # # index_users_on_email (email) UNIQUE # class User < ApplicationRecord has_secure_password has_many :price_reports, dependent: :nullify has_many :moderation_logs, foreign_key: :admin_id, dependent: :nullify has_many :sessions, dependent: :destroy end