class

Task

Inherits Avram::PrimaryKeyMethods < DB::Mappable < DB::Serializable < LuckyCache::Cachable < BaseModel < DB::Mappable < DB::Serializable < LuckyCache::Cachable < Avram::Model < Avram::SchemaEnforcer < Avram::Polymorphic < Avram::Associations < Avram::Associations::BelongsTo < Avram::Associations::HasOne < Avram::Associations::HasMany < Reference < Object

Constants

ASSOCIATIONS = [{type: Event, assoc_name: event, foreign_key: :event_id, relationship_type: :belongs_to, through: nil, base_query_class: nil}, {type: Guest, assoc_name: guest, foreign_key: :guest_id, relationship_type: :belongs_to, through: nil, base_query_class: nil}] of Nil
COLUMNS = [{name: id, type: Int64, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: created_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: updated_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: name, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: status, type: Task::Status, nilable: false, autogenerated: false, value: Task::Status::Pending, serialized: false, allow_blank: false}, {name: completed_at, type: Time, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: position, type: Int32, nilable: false, autogenerated: false, value: 0, serialized: false, allow_blank: false}, {name: category, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: notes, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: cost, type: Float64, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: event_id, type: Event::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: guest_id, type: Guest::PrimaryKeyType, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}] of Nil
PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = Int64

Constructors

new(id : Int64, created_at : Time, updated_at : Time, name : String, status : Int32 | Int64, completed_at : Time | Nil, position : Int32, category : Nil | String, notes : Nil | String, cost : Float64 | PG::Numeric | Nil, event_id : Int64, guest_id : Int64 | Nil)
new(rs : DB::ResultSet)

Class methods

column_names
columns
ensure_correct_column_mappings!
from_rs(rs : DB::ResultSet)
primary_key_name
schema_enforcer_validations
table_name

Instance methods

base_query_class

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

category
comments
Source
completed_at
cost
created_at
delete_operation_class
event
event!
event_count
event_id
event_preloaded?

Returns true if the association has been preloaded

event_query
guest
guest!
guest_count
guest_id
guest_preloaded?

Returns true if the association has been preloaded

guest_query
id
name
notes
position
save_operation_class
status
updated_at

Nested types