def self.primary_key_name : Symbol | Nil
#
class User
Included Modules
- Avram::PrimaryKeyMethods
- Carbon::Emailable
- DB::Mappable
- DB::Serializable
- LuckyCache::Cachable
- Shield::HasManyBearerLogins
- Shield::HasManyEmailConfirmations
- Shield::HasManyLogins
- Shield::HasManyPasswordResets
- Shield::User
- Shield::UserSettingsColumn
Defined in:
models/user.crConstant Summary
-
ASSOCIATIONS =
[{type: BearerLogin, assoc_name: bearer_logins, foreign_key: :user_id, relationship_type: :has_many, through: nil, base_query_class: BearerLogin::BaseQuery}, {type: EmailConfirmation, assoc_name: email_confirmations, foreign_key: :user_id, relationship_type: :has_many, through: nil, base_query_class: EmailConfirmation::BaseQuery}, {type: Login, assoc_name: logins, foreign_key: :user_id, relationship_type: :has_many, through: nil, base_query_class: Login::BaseQuery}, {type: PasswordReset, assoc_name: password_resets, foreign_key: :user_id, relationship_type: :has_many, through: nil, base_query_class: PasswordReset::BaseQuery}] of Nil
-
COLUMNS =
[{name: email, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: password_digest, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: settings, type: UserSettings, nilable: false, autogenerated: false, value: nil, serialized: true, allow_blank: false}, {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: first_name, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: last_name, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: level, type: UserLevel, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: updated_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}] of Nil
-
PRIMARY_KEY_NAME =
:id
-
PRIMARY_KEY_TYPE =
Int64
Constructors
- .new(email : String, password_digest : String, settings : UserSettings, id : Int64, created_at : Time, first_name : String, last_name : String, level : String, updated_at : Time)
- .new(rs : DB::ResultSet)
Class Method Summary
- .column_names : Array(Symbol)
- .columns : Array(NamedTuple(name: Symbol, nilable: Bool, type: String))
- .ensure_correct_column_mappings!
- .from_rs(rs : DB::ResultSet)
- .primary_key_name : Symbol | Nil
- .schema_enforcer_validations
- .table_name : String
Instance Method Summary
- #_preloaded_bearer_logins=(vals : Array(BearerLogin)) : Array(BearerLogin)
- #_preloaded_email_confirmations=(vals : Array(EmailConfirmation)) : Array(EmailConfirmation)
- #_preloaded_logins=(vals : Array(Login)) : Array(Login)
- #_preloaded_password_resets=(vals : Array(PasswordReset)) : Array(PasswordReset)
-
#base_query_class : ::User::BaseQuery.class
This makes it easy for plugins and extensions to use the base SaveOperation
- #bearer_logins : Array(BearerLogin)
- #bearer_logins! : Array(BearerLogin)
- #bearer_logins_count : Int64
- #bearer_logins_preloaded? : Bool
- #bearer_logins_query
- #created_at : Time
- #delete_operation_class : ::User::DeleteOperation.class
- #email : String
- #email_confirmations : Array(EmailConfirmation)
- #email_confirmations! : Array(EmailConfirmation)
- #email_confirmations_count : Int64
- #email_confirmations_preloaded? : Bool
- #email_confirmations_query
- #emailable : Carbon::Address
- #first_name : String
- #full_name : String
- #id : Int64
- #last_name : String
- #level : UserLevel
- #logins : Array(Login)
- #logins! : Array(Login)
- #logins_count : Int64
- #logins_preloaded? : Bool
- #logins_query
- #password_digest : String
- #password_resets : Array(PasswordReset)
- #password_resets! : Array(PasswordReset)
- #password_resets_count : Int64
- #password_resets_preloaded? : Bool
- #password_resets_query
- #save_operation_class : ::User::SaveOperation.class
- #settings : UserSettings
- #updated_at : Time
Constructor methods inherited from class BaseModel
new(rs : DB::ResultSet)
new
Class methods inherited from class BaseModel
database : Avram::Database.class
database,
from_rs(rs : DB::ResultSet)
from_rs
Macros inherited from class BaseModel
default_columns
default_columns
Constructor Detail
def self.new(email : String, password_digest : String, settings : UserSettings, id : Int64, created_at : Time, first_name : String, last_name : String, level : String, updated_at : Time)
#
Class Method Detail
Instance Method Detail
This makes it easy for plugins and extensions to use the base SaveOperation