class PasswordReset

Included Modules

Defined in:

models/password_reset.cr

Constant Summary

ASSOCIATIONS = [{type: User, assoc_name: user, foreign_key: :user_id, relationship_type: :belongs_to, through: nil, base_query_class: nil}] of Nil
COLUMNS = [{name: ip_address, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: user_id, type: User::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: active_at, type: Time, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: inactive_at, type: Time, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: success, type: Bool, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: token_digest, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: id, type: Int64, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}] of Nil
PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = Int64

Constructors

Class Method Summary

Instance Method Summary

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(ip_address : String, user_id : Int64, active_at : Time, inactive_at : Time | Nil, success : Bool, token_digest : String, id : Int64) #

def self.new(rs : DB::ResultSet) #

Class Method Detail

def self.column_names : Array(Symbol) #

def self.columns : Array(NamedTuple(name: Symbol, nilable: Bool, type: String)) #

def self.ensure_correct_column_mappings! #

def self.from_rs(rs : DB::ResultSet) #

def self.primary_key_name : Symbol | Nil #

def self.schema_enforcer_validations #

def self.table_name : String #

Instance Method Detail

def active_at : Time #

def base_query_class : ::PasswordReset::BaseQuery.class #

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


def delete_operation_class : ::PasswordReset::DeleteOperation.class #

def id : Int64 #

def inactive_at : Time | Nil #

def ip_address : String #

def save_operation_class : ::PasswordReset::SaveOperation.class #

def status : SuccessStatus #

def success : Bool #

def success? : Bool #

def token_digest : String #

def user : User #

def user! : User #

def user_count : Int64 #

def user_id : User::PrimaryKeyType #

def user_preloaded? : Bool #

def user_query #