class Pessoa

Included Modules

Defined in:

models/pessoa.cr

Constant Summary

ASSOCIATIONS = [] of Nil
COLUMNS = [{name: id, type: UUID, nilable: false, autogenerated: true, value: nil, serialized: false}, {name: apelido, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: nome, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: nascimento, type: Time, nilable: true, autogenerated: false, value: nil, serialized: false}, {name: stack, type: String, nilable: true, autogenerated: false, value: nil, serialized: false}] of Nil
PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = UUID

Constructors

Class Method Summary

Instance Method Summary

Class methods inherited from class BaseModel

database : Avram::Database.class database

Constructor Detail

def self.new(id : UUID, apelido : String, nome : String, nascimento : Time | Nil, stack : Nil | String) #

def self.new(__temp_99 : 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_params(params) #

[View source]
def self.from_rs(__temp_99 : DB::ResultSet) #

def self.primary_key_name : Symbol | Nil #

def self.schema_enforcer_validations #

def self.table_name : String #

Instance Method Detail

def apelido : String #

def apelido=(_apelido : String::Lucky::ColumnType) #

def base_query_class : ::Pessoa::BaseQuery.class #

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


def delete_operation_class : ::Pessoa::DeleteOperation.class #

def id : UUID #

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

def nascimento : Time | Nil #

def nascimento=(_nascimento : Time::Lucky::ColumnType | Nil) #

def nascimento_as_string #

[View source]
def nascimento_as_string=(value : String | Nil) #

[View source]
def nome : String #

def nome=(_nome : String::Lucky::ColumnType) #

def save_operation_class : ::Pessoa::SaveOperation.class #

def stack : String | Nil #

def stack=(_stack : String::Lucky::ColumnType | Nil) #

def stack_as_array : Array(String) #

[View source]
def to_tuple : PessoaTuple #

[View source]