def self.primary_key_name : Symbol | Nil
#
class Chat
Included Modules
- Avram::PrimaryKeyMethods
- DB::Mappable
- LuckyCache::Cachable
Defined in:
models/chat.crConstant Summary
-
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
Class Method Summary
- .column_names : Array(Symbol)
- .columns : Array(NamedTuple(name: Symbol, nilable: Bool, type: String))
- .ensure_correct_column_mappings!
- .from_rs(__temp_141 : DB::ResultSet)
- .primary_key_name : Symbol | Nil
- .schema_enforcer_validations
- .table_name : String
Instance Method Summary
- #_preloaded_characters=(_preloaded_characters : Nil | Array(Character))
- #_preloaded_participants=(_preloaded_participants : Nil | Array(ChatParticipant))
-
#base_query_class : ::Chat::BaseQuery.class
This makes it easy for plugins and extensions to use the base SaveOperation
- #characters : Array(Character)
- #characters! : Array(Character)
- #characters_count : Int64
- #characters_query
- #creator : User
- #creator! : User
- #creator_count : Int64
- #creator_id : User::PrimaryKeyType
- #creator_id=(_creator_id : User::PrimaryKeyType::Lucky::ColumnType)
- #creator_query
- #delete_operation_class : ::Chat::DeleteOperation.class
- #id : UUID
- #id=(_id : UUID::Lucky::ColumnType)
- #name : String | Nil
- #name=(_name : String::Lucky::ColumnType | Nil)
- #participants : Array(ChatParticipant)
- #participants! : Array(ChatParticipant)
- #participants_count : Int64
- #participants_query
- #save_operation_class : ::Chat::SaveOperation.class
Macro Summary
Class methods inherited from class BaseModel
database : Avram::Database.class
database
Constructor Detail
Class Method Detail
Instance Method Detail
This makes it easy for plugins and extensions to use the base SaveOperation