class ChatParticipant

Included Modules

Defined in:

models/chat_participant.cr

Constant Summary

ASSOCIATIONS = [{type: Chat, assoc_name: chat, foreign_key: :chat_id, relationship_type: :belongs_to, through: nil}, {type: Character, assoc_name: character, foreign_key: :character_id, relationship_type: :belongs_to, through: nil}] of Nil
COLUMNS = [{name: id, type: Int64, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: chat_id, type: Chat::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: character_id, type: Character::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false}] of Nil
PRIMARY_KEY_NAME = :id

Avram. See: https://github.com/luckyframework/avram/issues/129

PRIMARY_KEY_TYPE = Int64

Avram. See: https://github.com/luckyframework/avram/issues/129

Constructors

Class Method Summary

Instance Method Summary

Macro Summary

Class methods inherited from class BaseModel

database : Avram::Database.class database

Constructor Detail

def self.new(id : Int64, chat_id : UUID, character_id : Int64) #

def self.new(__temp_149 : DB::ResultSet) #

Class Method Detail

def self.column_names : Array(Symbol) #

def self.columns : Array(NamedTuple(name: Symbol, nilable: Bool, type: String)) #

def self.ensure_correct_column_mappings! #

def self.from_rs(__temp_149 : DB::ResultSet) #

def self.primary_key_name : Symbol | Nil #

Avram. See: https://github.com/luckyframework/avram/issues/129


[View source]
def self.schema_enforcer_validations #

def self.table_name : String #

Instance Method Detail

def base_query_class : ::ChatParticipant::BaseQuery.class #

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


def character : Character #

def character! : Character #

def character_count : Int64 #

def character_id : Character::PrimaryKeyType #

def character_id=(_character_id : Character::PrimaryKeyType::Lucky::ColumnType) #

def character_query #

def chat : Chat #

def chat! : Chat #

def chat_count : Int64 #

def chat_id : Chat::PrimaryKeyType #

def chat_id=(_chat_id : Chat::PrimaryKeyType::Lucky::ColumnType) #

def chat_query #

def delete_operation_class : ::ChatParticipant::DeleteOperation.class #

def id : Int64 #

def id=(_id : Int64::Lucky::ColumnType) #

def save_operation_class : ::ChatParticipant::SaveOperation.class #

Macro Detail

macro default_columns #

[View source]