def self.primary_key_name : Symbol | Nil
#
class Event
Included Modules
- Avram::PrimaryKeyMethods
- DB::Mappable
- DB::Serializable
- LuckyCache::Cachable
Defined in:
models/event.crConstant Summary
-
ASSOCIATIONS =
[{type: Slot, assoc_name: slots, foreign_key: :event_id, relationship_type: :has_many, through: nil, base_query_class: Slot::BaseQuery}, {type: Guest, assoc_name: guests, foreign_key: :event_id, relationship_type: :has_many, through: nil, base_query_class: Guest::BaseQuery}] 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: host_name, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: event_uuid, type: String, nilable: false, autogenerated: false, value: UUID.v7.to_s, 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, host_name : String, event_uuid : String)
- .new(rs : DB::ResultSet)
Class Method Summary
- .column_names : Array(Symbol)
- .columns : Array(NamedTuple(name: Symbol, nilable: Bool, type: String))
- .ensure_correct_column_mappings!
- .from_rs(rs : DB::ResultSet)
- .primary_key_name : Symbol | Nil
- .schema_enforcer_validations
- .table_name : String
Instance Method Summary
- #_preloaded_guests=(vals : Array(Guest)) : Array(Guest)
- #_preloaded_slots=(vals : Array(Slot)) : Array(Slot)
-
#base_query_class : ::Event::BaseQuery.class
This makes it easy for plugins and extensions to use the base SaveOperation
- #created_at : Time
- #delete_operation_class : ::Event::DeleteOperation.class
- #event_uuid : String
- #guests : Array(Guest)
- #guests! : Array(Guest)
- #guests_count : Int64
- #guests_preloaded? : Bool
- #guests_query
- #host_name : String
- #id : Int64
- #name : String
- #save_operation_class : ::Event::SaveOperation.class
- #slots : Array(Slot)
- #slots! : Array(Slot)
- #slots_count : Int64
- #slots_preloaded? : Bool
- #slots_query
- #updated_at : Time
Constructor methods inherited from class BaseModel
new(rs : DB::ResultSet)
new
Class methods inherited from class BaseModel
database : Avram::Database.class
database,
from_rs(rs : DB::ResultSet)
from_rs
Constructor Detail
def self.new(id : Int64, created_at : Time, updated_at : Time, name : String, host_name : String, event_uuid : String)
#
Class Method Detail
Instance Method Detail
This makes it easy for plugins and extensions to use the base SaveOperation