def self.primary_key_name : Symbol | Nil
#
class PasswordReset
- PasswordReset
- BaseModel
- Avram::Model
- Reference
- Object
Included Modules
- Avram::PrimaryKeyMethods
- DB::Mappable
- DB::Serializable
- Lucille::StatusColumns
- Lucille::SuccessStatusColumns
- LuckyCache::Cachable
- Shield::BelongsToUser
- Shield::IpAddressColumn
- Shield::PasswordReset
Defined in:
models/password_reset.crConstant 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
- .new(ip_address : String, user_id : Int64, active_at : Time, inactive_at : Time | Nil, success : Bool, token_digest : String, id : Int64)
- .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
- #active_at : Time
-
#base_query_class : ::PasswordReset::BaseQuery.class
This makes it easy for plugins and extensions to use the base SaveOperation
- #delete_operation_class : ::PasswordReset::DeleteOperation.class
- #id : Int64
- #inactive_at : Time | Nil
- #ip_address : String
- #save_operation_class : ::PasswordReset::SaveOperation.class
- #status : SuccessStatus
- #success : Bool
- #success? : Bool
- #token_digest : String
- #user : User
- #user! : User
- #user_count : Int64
- #user_id : User::PrimaryKeyType
- #user_preloaded? : Bool
- #user_query
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)
#
Class Method Detail
Instance Method Detail
This makes it easy for plugins and extensions to use the base SaveOperation