class

User

Inherits Avram::PrimaryKeyMethods < Authentic::PasswordAuthenticatable < Carbon::Emailable < DB::Mappable < DB::Serializable < LuckyCache::Cachable < BaseModel < DB::Mappable < DB::Serializable < LuckyCache::Cachable < Avram::Model < Avram::SchemaEnforcer < Avram::Polymorphic < Avram::Associations < Avram::Associations::BelongsTo < Avram::Associations::HasOne < Avram::Associations::HasMany < Reference < Object

Constants

ASSOCIATIONS = [{type: Guest, assoc_name: invitations, foreign_key: :user_id, relationship_type: :has_many, through: nil, base_query_class: Guest::BaseQuery}, {type: Event, assoc_name: events, foreign_key: :user_id, relationship_type: :has_many, through: [:invitations, :event], base_query_class: Event::BaseQuery}] of Nil
COLUMNS = [{name: id, type: Int64, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: created_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: updated_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: email, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: encrypted_password, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: name, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: avatar_url, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}] of Nil
PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = Int64

Constructors

new(id : Int64, created_at : Time, updated_at : Time, email : String, encrypted_password : String, name : String, avatar_url : Nil | String)
new(rs : DB::ResultSet)

Class methods

column_names
columns
ensure_correct_column_mappings!
from_rs(rs : DB::ResultSet)
primary_key_name
schema_enforcer_validations
table_name

Instance methods

_preloaded_events=(vals : Array(Event)) : Array(Event)
_preloaded_invitations=(vals : Array(Guest)) : Array(Guest)
avatar_url
base_query_class

This makes it easy for plugins and extensions to use the base SaveOperation

created_at
delete_operation_class
email
emailable
Source
encrypted_password
events
events!
events_count
events_preloaded?
events_query
id
invitations
invitations!
invitations_count
invitations_preloaded?
invitations_query
is_organizer?
Source
name
save_operation_class
updated_at

Nested types