class

Account

Inherits Jennifer::Model::Base < Jennifer::Model::Callback < Jennifer::Model::Validation < Jennifer::Validations::Macros < Jennifer::Model::STIMapping < Jennifer::Model::OptimisticLocking < Jennifer::Model::Timestamp < Jennifer::Model::Mapping < Jennifer::Model::CommonMapping < Jennifer::Model::FieldDeclaration < Jennifer::Presentable < Jennifer::Model::Resource < Jennifer::Macros < Jennifer::Model::RelationDefinition < Jennifer::Model::Scoping < Jennifer::Model::Translation < Reference < Object

Constructors

new(values : Hash(Symbol, AttrType) | NamedTuple, new_record)

Accepts symbol hash or named tuple, stringify it and calls constructor with string-based keys hash.

Class methods

_balance
_id
_limit_amount
column_names

Instance methods

balance
balance!
balance=(_balance : Int32)
balance=(_balance : String)
balance=(_balance : AttrType)
balance_changed?
balance_will_change!
destroy

Deletes object from db and calls all related callbacks.

It returns true if the object was successfully deleted.

Contact.first!.destroy # => true
id
id!
id=(_id : Union(Int32, Nil))
id=(_id : String)
id=(_id : AttrType)
id_changed?
id_will_change!
limit_amount
limit_amount!
limit_amount=(_limit_amount : Int32)
limit_amount=(_limit_amount : String)
limit_amount=(_limit_amount : AttrType)
limit_amount_changed?
limit_amount_will_change!
limit_reached?
Source

Nested types