class

Bonspiel

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: User, assoc_name: owner, foreign_key: :owner_id, relationship_type: :belongs_to, through: nil}, {type: Draw, assoc_name: draws, foreign_key: :bonspiel_id, relationship_type: :has_many, through: nil}, {type: Game, assoc_name: games, foreign_key: :bonspiel_id, relationship_type: :has_many, through: [:draws, :games]}, {type: Game, assoc_name: presenting_game, foreign_key: :presenting_game_id, relationship_type: :belongs_to, through: nil}] of Nil
COLUMNS = [{name: id, type: Int64, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: created_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: updated_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: name, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: start_at, type: Time, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: end_at, type: Time, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: sheets, type: Int16, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: owner_id, type: User::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: presenting_game_id, type: Game::PrimaryKeyType, nilable: true, autogenerated: false, value: nil, serialized: false}] of Nil
PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = Int64

Constructors

new(id : Int64, created_at : Time, updated_at : Time, name : String, start_at : Time, end_at : Time, sheets : Int16, owner_id : Int64, presenting_game_id : Int64 | Nil)
new(__temp_170 : DB::ResultSet)

Class methods

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

Instance methods

_preloaded_draws=(_preloaded_draws : Nil | Array(Draw))
_preloaded_games=(_preloaded_games : Nil | Array(Game))
base_query_class

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

created_at
created_at=(_created_at : Time::Lucky::ColumnType)
delete_operation_class
draws
draws!
draws_count
draws_query
end_at
end_at=(_end_at : Time::Lucky::ColumnType)
games
games!
games_count
games_query
id
id=(_id : Int64::Lucky::ColumnType)
name
name=(_name : String::Lucky::ColumnType)
owner
owner!
owner_count
owner_id
owner_id=(_owner_id : User::PrimaryKeyType::Lucky::ColumnType)
owner_query
presenting_game
presenting_game!
presenting_game_count
presenting_game_id
presenting_game_id=(_presenting_game_id : Game::PrimaryKeyType::Lucky::ColumnType | Nil)
presenting_game_query
save_operation_class
sheets
sheets=(_sheets : Int16::Lucky::ColumnType)
start_at
start_at=(_start_at : Time::Lucky::ColumnType)
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source
updated_at
updated_at=(_updated_at : Time::Lucky::ColumnType)

Nested types