class CollectPointsTour

Overview

採集地点と採集行の多対多アソシエーションを作るための中間テーブル用モデル

Included Modules

Defined in:

models/collect_points_tour.cr

Constant Summary

ASSOCIATIONS = [{type: CollectPoint, assoc_name: collect_point, foreign_key: :collectpoint_id, relationship_type: :belongs_to, through: nil, base_query_class: nil}, {type: Tour, assoc_name: tour, foreign_key: :tour_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: collectpoint_id, type: CollectPoint::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: tour_id, type: Tour::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, collectpoint_id : UUID, tour_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 : ::CollectPointsTour::BaseQuery.class #

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


def collect_point : CollectPoint #

def collect_point! : CollectPoint #

def collect_point_count : Int64 #

def collect_point_preloaded? : Bool #

def collect_point_query #

def collectpoint_id : CollectPoint::PrimaryKeyType #

def delete_operation_class : ::CollectPointsTour::DeleteOperation.class #

def id : Int32 #

def save_operation_class : ::CollectPointsTour::SaveOperation.class #

def tour : Tour #

def tour! : Tour #

def tour_count : Int64 #

def tour_id : Tour::PrimaryKeyType #

def tour_preloaded? : Bool #

def tour_query #