class CollectionSetting

Overview

コレクション設定モデル

Included Modules

Defined in:

models/collection_setting.cr

Constant Summary

ASSOCIATIONS = [] of Nil

コレクション設定モデル

COLUMNS = [{name: id, type: UUID, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: created_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: user_id, type: Int32, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: collection_name, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: institution_code, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: latest_collection_code, type: Int32, nilable: false, autogenerated: false, value: 0, serialized: false, allow_blank: false}, {name: note, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}] of Nil

コレクション設定モデル

PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = UUID

Constructors

Class Method Summary

Macro Summary

Instance Method Summary

Constructor methods inherited from class BaseModel

new(rs : DB::ResultSet) new

Class methods inherited from class BaseModel

database : Avram::Database.class database, from_rs(rs : DB::ResultSet) from_rs

Macros inherited from class BaseModel

default_columns default_columns

Constructor Detail

def self.new(id : UUID, created_at : Time, user_id : Int32 | Nil, collection_name : String, institution_code : String, latest_collection_code : Int32, note : String) #

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

コレクション設定モデル


def self.primary_key_name : Symbol | Nil #

[View source]
def self.schema_enforcer_validations #

def self.table_name : String #

Macro Detail

macro default_columns #

[View source]

Instance Method Detail

def base_query_class : ::CollectionSetting::BaseQuery.class #

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


def collection_name : String #

def created_at : Time #

def delete_operation_class : ::CollectionSetting::DeleteOperation.class #

def id : UUID #

def institution_code : String #

def latest_collection_code : Int32 #

def note : String #

def save_operation_class : ::CollectionSetting::SaveOperation.class #

def user_id : Int32 | Nil #