class SpecimenLabelLabelSpecimen

Overview

標本ラベルと標本の多対多アソシエーションを作るための中間テーブル用モデル

Included Modules

Defined in:

models/specimen_labels_label_specimens.cr

Constant Summary

ASSOCIATIONS = [{type: Specimen, assoc_name: specimen, foreign_key: :specimen_id, relationship_type: :belongs_to, through: nil, base_query_class: nil}, {type: SpecimenLabel, assoc_name: specimen_label, foreign_key: :specimenlabel_id, relationship_type: :belongs_to, through: nil, base_query_class: nil}] of Nil

標本ラベルと標本の多対多アソシエーションを作るための中間テーブル用モデル

COLUMNS = [{name: id, type: Int32, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: specimen_id, type: Specimen::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: specimenlabel_id, type: SpecimenLabel::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}] of Nil

標本ラベルと標本の多対多アソシエーションを作るための中間テーブル用モデル

PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = Int32

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 : Int32, specimen_id : UUID, specimenlabel_id : UUID) #

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 : ::SpecimenLabelLabelSpecimen::BaseQuery.class #

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


def delete_operation_class : ::SpecimenLabelLabelSpecimen::DeleteOperation.class #

def id : Int32 #

def save_operation_class : ::SpecimenLabelLabelSpecimen::SaveOperation.class #

def specimen : Specimen #

def specimen! : Specimen #

def specimen_count : Int64 #

def specimen_id : Specimen::PrimaryKeyType #

def specimen_label : SpecimenLabel #

def specimen_label! : SpecimenLabel #

def specimen_label_count : Int64 #

def specimen_label_preloaded? : Bool #

Returns true if the association has been preloaded


def specimen_label_query #

def specimen_preloaded? : Bool #

Returns true if the association has been preloaded


def specimen_query #

def specimenlabel_id : SpecimenLabel::PrimaryKeyType #