class

Transaction

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.

new

Default constructor without any fields

Class methods

_account_id
_amount
_created_at
_description
_id
_type
_updated_at
column_names
get_account_transactions(account_id)
Source

Instance methods

account
Source
account_id
account_id!
account_id=(_account_id : Union(Int32, Nil))
account_id=(_account_id : String)
account_id=(_account_id : AttrType)
account_id_changed?
account_id_will_change!
amount
amount!
amount=(_amount : Union(Int32, Nil))
amount=(_amount : String)
amount=(_amount : AttrType)
amount_changed?
amount_will_change!
created_at
created_at!
created_at=(_created_at : Union(Time, Nil))
created_at=(_created_at : String)
created_at=(_created_at : AttrType)
created_at_changed?
created_at_will_change!
description
description!
description=(_description : Union(String, Nil))
description=(_description : AttrType)
description_changed?
description_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!
track_timestamps_on_create
Source
track_timestamps_on_update
Source
type
type!
type=(_type : Union(String, Nil))
type=(_type : AttrType)
type_changed?
type_will_change!
updated_at
updated_at!
updated_at=(_updated_at : Union(Time, Nil))
updated_at=(_updated_at : String)
updated_at=(_updated_at : AttrType)
updated_at_changed?
updated_at_will_change!

Nested types