class Paper

Included Modules

Defined in:

models/paper.cr

Constant Summary

ASSOCIATIONS = [] of Nil
COLUMNS = [{name: id, type: UUID, 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: name, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: summary, type: String, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: published_year, type: Int32, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: published_month, type: Int32, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: published_day, type: Int32, nilable: false, autogenerated: false, value: nil, serialized: false}, {name: recorded_species, type: Array(String), nilable: false, autogenerated: false, value: [] of String, serialized: false}, {name: used_specimens, type: Array(String), nilable: false, autogenerated: false, value: [] of String, serialized: false}, {name: links, type: Array(String), nilable: false, autogenerated: false, value: [] of String, 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, created_at : Time, updated_at : Time, name : String, summary : String, published_year : Int32, published_month : Int32, published_day : Int32, recorded_species : Array(String), used_specimens : Array(String), links : Array(String)) #

def self.new(__temp_111 : 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_111 : DB::ResultSet) #

def self.primary_key_name : Symbol | Nil #

def self.schema_enforcer_validations #

def self.table_name : String #

Instance Method Detail

def base_query_class : ::Paper::BaseQuery.class #

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


def created_at : Time #

def created_at=(_created_at : Time::Lucky::ColumnType) #

def delete_operation_class : ::Paper::DeleteOperation.class #

def id : UUID #

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

def links : Array(String) #

def links=(_links : Array(String)) #

def name : String #

def name=(_name : String::Lucky::ColumnType) #

def published_day : Int32 #

def published_day=(_published_day : Int32::Lucky::ColumnType) #

def published_month : Int32 #

def published_month=(_published_month : Int32::Lucky::ColumnType) #

def published_year : Int32 #

def published_year=(_published_year : Int32::Lucky::ColumnType) #

def recorded_species : Array(String) #

def recorded_species=(_recorded_species : Array(String)) #

def save_operation_class : ::Paper::SaveOperation.class #

def summary : String #

def summary=(_summary : String::Lucky::ColumnType) #

def updated_at : Time #

def updated_at=(_updated_at : Time::Lucky::ColumnType) #

def used_specimens : Array(String) #

def used_specimens=(_used_specimens : Array(String)) #