def self.primary_key_name : Symbol | Nil
#
class Tour
Overview
採集行モデル
Included Modules
- Avram::PrimaryKeyMethods
- DB::Mappable
- DB::Serializable
- LuckyCache::Cachable
Defined in:
models/tour.crConstant Summary
-
ASSOCIATIONS =
[{type: CollectPointsTour, assoc_name: collect_points_tour, foreign_key: :tour_id, relationship_type: :has_many, through: nil, base_query_class: CollectPointsTour::BaseQuery}, {type: CollectPoint, assoc_name: collect_points, foreign_key: :tour_id, relationship_type: :has_many, through: [:collect_points_tour, :collect_points], base_query_class: CollectPoint::BaseQuery}] 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: title, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: start_date, type: Time, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: end_date, type: Time, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: note, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: image1, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: image2, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: image3, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: image4, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: image5, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: user_id, type: Int32, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}] of Nil
-
採集行モデル
-
PRIMARY_KEY_NAME =
:id
-
PRIMARY_KEY_TYPE =
UUID
Constructors
- .new(id : UUID, created_at : Time, title : String, start_date : Time, end_date : Time, note : String, image1 : Nil | String, image2 : Nil | String, image3 : Nil | String, image4 : Nil | String, image5 : Nil | String, user_id : Int32 | Nil)
-
.new(rs : DB::ResultSet)
採集行モデル
Class Method Summary
- .column_names : Array(Symbol)
- .columns : Array(NamedTuple(name: Symbol, nilable: Bool, type: String))
- .ensure_correct_column_mappings!
-
.from_rs(rs : DB::ResultSet)
採集行モデル
- .primary_key_name : Symbol | Nil
- .schema_enforcer_validations
- .table_name : String
Macro Summary
Instance Method Summary
- #_preloaded_collect_points=(vals : Array(CollectPoint)) : Array(CollectPoint)
- #_preloaded_collect_points_tour=(vals : Array(CollectPointsTour)) : Array(CollectPointsTour)
-
#base_query_class : ::Tour::BaseQuery.class
This makes it easy for plugins and extensions to use the base SaveOperation
- #collect_points : Array(CollectPoint)
- #collect_points! : Array(CollectPoint)
- #collect_points_count : Int64
- #collect_points_preloaded? : Bool
- #collect_points_query
- #collect_points_tour : Array(CollectPointsTour)
- #collect_points_tour! : Array(CollectPointsTour)
- #collect_points_tour_count : Int64
- #collect_points_tour_preloaded? : Bool
- #collect_points_tour_query
- #created_at : Time
- #delete_operation_class : ::Tour::DeleteOperation.class
- #end_date : Time
- #id : UUID
- #image1 : String | Nil
- #image2 : String | Nil
- #image3 : String | Nil
- #image4 : String | Nil
- #image5 : String | Nil
- #note : String
- #save_operation_class : ::Tour::SaveOperation.class
- #start_date : Time
- #title : String
- #user_id : Int32 | Nil
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, title : String, start_date : Time, end_date : Time, note : String, image1 : Nil | String, image2 : Nil | String, image3 : Nil | String, image4 : Nil | String, image5 : Nil | String, user_id : Int32 | Nil)
#
Class Method Detail
Macro Detail
Instance Method Detail
This makes it easy for plugins and extensions to use the base SaveOperation