class

Chat

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: creator, foreign_key: :creator_id, relationship_type: :belongs_to, through: nil}, {type: ChatParticipant, assoc_name: participants, foreign_key: :chat_id, relationship_type: :has_many, through: nil}, {type: Character, assoc_name: characters, foreign_key: :chat_id, relationship_type: :has_many, through: [:participants, :character]}] of Nil
COLUMNS = [{name: id, type: UUID, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: creator_id, type: User::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: name, type: String, nilable: true, autogenerated: false, value: nil, serialized: false}] of Nil
PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = UUID

Constructors

new(id : UUID, creator_id : Int64, name : Nil | String)
new(__temp_161 : DB::ResultSet)

Class methods

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

Instance methods

_preloaded_characters=(_preloaded_characters : Nil | Array(Character))
_preloaded_participants=(_preloaded_participants : Nil | Array(ChatParticipant))
base_query_class

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

characters
characters!
characters_count
characters_query
creator
creator!
creator_count
creator_id
creator_id=(_creator_id : User::PrimaryKeyType::Lucky::ColumnType)
creator_query
delete_operation_class
id
id=(_id : UUID::Lucky::ColumnType)
name
name=(_name : String::Lucky::ColumnType | Nil)
participants
participants!
participants_count
participants_query
save_operation_class

Macros

default_columns
Source

Nested types