class

Character

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: chat_participations, foreign_key: :character_id, relationship_type: :has_many, through: nil}, {type: Chat, assoc_name: chats, foreign_key: :character_id, relationship_type: :has_many, through: [:chat_participations, :chat]}] of Nil
COLUMNS = [{name: id, type: Int64, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: created_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: updated_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: slug, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: name, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: description, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: avatar_id, type: String, nilable: true, autogenerated: false, value: nil, serialized: false}, {name: greeting, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: persona, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: world_scenario, type: String, nilable: true, autogenerated: false, value: nil, serialized: false}, {name: example_chats, type: String, nilable: true, autogenerated: false, value: nil, serialized: false}, {name: visibility, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: is_contentious, type: Bool, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: creator_id, type: User::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false}] of Nil
PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = Int64
VALID_VISIBILITY_VALUES = ["public", "unlisted", "private"]

Constructors

new(id : Int64, created_at : Time, updated_at : Time, slug : String, name : String, description : String, avatar_id : Nil | String, greeting : String, persona : String, world_scenario : Nil | String, example_chats : Nil | String, visibility : String, is_contentious : Bool, creator_id : Int64)
new(__temp_131 : DB::ResultSet)

Class methods

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

Instance methods

_preloaded_chat_participations=(_preloaded_chat_participations : Nil | Array(ChatParticipant))
_preloaded_chats=(_preloaded_chats : Nil | Array(Chat))
avatar_id
avatar_id=(_avatar_id : String::Lucky::ColumnType | Nil)
base_query_class

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

chat_participations
chat_participations!
chat_participations_count
chat_participations_query
chats
chats!
chats_count
chats_query
created_at
created_at=(_created_at : Time::Lucky::ColumnType)
creator
creator!
creator_count
creator_id
creator_id=(_creator_id : User::PrimaryKeyType::Lucky::ColumnType)
creator_query
delete_operation_class
description
description=(_description : String::Lucky::ColumnType)
example_chats
example_chats=(_example_chats : String::Lucky::ColumnType | Nil)
greeting
greeting=(_greeting : String::Lucky::ColumnType)
id
id=(_id : Int64::Lucky::ColumnType)
is_contentious
is_contentious=(_is_contentious : Bool::Lucky::ColumnType)
is_contentious?
name
name=(_name : String::Lucky::ColumnType)
persona
persona=(_persona : String::Lucky::ColumnType)
save_operation_class
slug
slug=(_slug : String::Lucky::ColumnType)
updated_at
updated_at=(_updated_at : Time::Lucky::ColumnType)
visibility
visibility=(_visibility : String::Lucky::ColumnType)
world_scenario
world_scenario=(_world_scenario : String::Lucky::ColumnType | Nil)

Nested types