class Transaction

Defined in:

models/transaction.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(values : Hash(Symbol, AttrType) | NamedTuple, new_record) #

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


def self.new #

Default constructor without any fields


Class Method Detail

def self._account_id #

def self._amount #

def self._created_at #

def self._description #

def self._id #

def self._type #

def self._updated_at #

def self.column_names : Array(String) #

def self.get_account_transactions(account_id) #

[View source]

Instance Method Detail

def account #

[View source]
def account_id : Int32? #

def account_id! #

def account_id=(_account_id : Union(Int32, Nil)) #

def account_id=(_account_id : String) #

def account_id=(_account_id : AttrType) #

def account_id_changed? : Bool #

def account_id_will_change! #

def amount : Int32? #

def amount! #

def amount=(_amount : Union(Int32, Nil)) #

def amount=(_amount : String) #

def amount=(_amount : AttrType) #

def amount_changed? : Bool #

def amount_will_change! #

def created_at : Time? #

def created_at! #

def created_at=(_created_at : Union(Time, Nil)) #

def created_at=(_created_at : String) #

def created_at=(_created_at : AttrType) #

def created_at_changed? : Bool #

def created_at_will_change! #

def description : String? #

def description! #

def description=(_description : Union(String, Nil)) #

def description=(_description : AttrType) #

def description_changed? : Bool #

def description_will_change! #

def destroy : Bool #
Description copied from class Jennifer::Model::Base

Deletes object from db and calls all related callbacks.

It returns true if the object was successfully deleted.

Contact.first!.destroy # => true

def id : Int32? #

def id! #

def id=(_id : Union(Int32, Nil)) #

def id=(_id : String) #

def id=(_id : AttrType) #

def id_changed? : Bool #

def id_will_change! #

def track_timestamps_on_create #

[View source]
def track_timestamps_on_update #

[View source]
def type : String? #

def type! #

def type=(_type : Union(String, Nil)) #

def type=(_type : AttrType) #

def type_changed? : Bool #

def type_will_change! #

def updated_at : Time? #

def updated_at! #

def updated_at=(_updated_at : Union(Time, Nil)) #

def updated_at=(_updated_at : String) #

def updated_at=(_updated_at : AttrType) #

def updated_at_changed? : Bool #

def updated_at_will_change! #