primary_key_name
Location
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: User, assoc_name: creator, foreign_key: :creator_id,
relationship_type: :belongs_to,
through: nil, base_query_class: nil}, {type: Event, assoc_name: events, foreign_key: :location_id,
relationship_type: :has_many, through: nil,
base_query_class: Event::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: slug, type: String, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: description, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: address, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: city, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: country, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: postal_code, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: latitude, type: Float64, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: longitude, type: Float64, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: creator_id, type: User::PrimaryKeyType, nilable: false, 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, slug : String, description : Nil | String, address : Nil | String, city : Nil | String, country : Nil | String, postal_code : Nil | String, latitude : Float64 | PG::Numeric | Nil, longitude : Float64 | PG::Numeric | Nil, creator_id : Int64)
new(rs : DB::ResultSet)
Class methods
column_names
columns
ensure_correct_column_mappings!
from_rs(rs : DB::ResultSet)
schema_enforcer_validations
table_name
Instance methods
address
base_query_class
This makes it easy for plugins and extensions to use the base SaveOperation
city
country
created_at
creator
column is_private : Bool = true
creator!
column is_private : Bool = true
creator_count
column is_private : Bool = true
creator_id
creator_preloaded?
column is_private : Bool = true
creator_query
delete_operation_class
description
events
events!
events_count
events_preloaded?
events_query
id
latitude
longitude
name
postal_code
save_operation_class
slug
updated_at