primary_key_name
Deck
Inherits DB::Mappable < Avram::PrimaryKeyMethods < LuckyCache::Cachable < BaseModel < LuckyCache::Cachable < Avram::Model < Avram::SchemaEnforcer < Avram::Polymorphic < Avram::Associations < Avram::Associations::BelongsTo < Avram::Associations::HasOne < Avram::Associations::HasMany < Reference < Object
Constants
ASSOCIATIONS = [{type: LeitnerBox, assoc_name: leitner_box, foreign_key: :leitner_box_id,
relationship_type: :belongs_to,
through: nil}, {type: Card, assoc_name: cards, foreign_key: :deck_id,
relationship_type: :has_many, through: 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: leitner_box_id, type: LeitnerBox::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: period_unit, type: Int32, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: period_type, type: Deck::Period, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: level, type: Int32, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}] of Nil
PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = Int64
Constructors
new(__temp_152 : DB::ResultSet)
Class methods
column_names
columns
ensure_correct_column_mappings!
from_rs(__temp_152 : DB::ResultSet)
schema_enforcer_validations
table_name
Instance methods
base_query_class
This makes it easy for plugins and extensions to use the base SaveOperation
cards
cards!
cards_count
cards_preloaded?
cards_query
cards_to_study
Sourcecreated_at
created_at=(_created_at : Time::Lucky::ColumnType)
delete_operation_class
id
id=(_id : Int64::Lucky::ColumnType)
leitner_box
leitner_box!
leitner_box_count
leitner_box_id
leitner_box_id=(_leitner_box_id : LeitnerBox::PrimaryKeyType::Lucky::ColumnType)
leitner_box_preloaded?
Returns true if the association has been preloaded
leitner_box_query
level
level=(_level : Int32::Lucky::ColumnType)
period_type
period_type=(_period_type : Deck::Period::Lucky::ColumnType)
period_unit
period_unit=(_period_unit : Int32::Lucky::ColumnType)
save_operation_class
updated_at
updated_at=(_updated_at : Time::Lucky::ColumnType)