def self.primary_key_name : Symbol | Nil
#
class Specimen
Included Modules
- Avram::PrimaryKeyMethods
- DB::Mappable
- DB::Serializable
- LuckyCache::Cachable
Defined in:
models/specimen.crConstant Summary
-
ASSOCIATIONS =
[{type: Taxon, assoc_name: custom_taxon_info, foreign_key: :custom_taxon_info_id, relationship_type: :belongs_to, through: nil, base_query_class: nil}, {type: Taxon, assoc_name: default_taxon_info, foreign_key: :default_taxon_info_id, relationship_type: :belongs_to, through: nil, base_query_class: nil}, {type: CollectPoint, assoc_name: collect_point_info, foreign_key: :collect_point_info_id, relationship_type: :belongs_to, through: nil, base_query_class: nil}, {type: CollectionSetting, assoc_name: collection_settings_info, foreign_key: :collection_settings_info_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: UUID, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: date_last_modified, 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_code, type: Int32, nilable: false, autogenerated: false, value: 0, serialized: false, allow_blank: false}, {name: identified_by, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: date_identified, type: Time, nilable: false, autogenerated: false, value: Time.local, serialized: false, allow_blank: false}, {name: collecter, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: year, type: Int32, nilable: false, autogenerated: false, value: 0, serialized: false, allow_blank: false}, {name: month, type: Int32, nilable: false, autogenerated: false, value: 0, serialized: false, allow_blank: false}, {name: day, type: Int32, nilable: false, autogenerated: false, value: 0, serialized: false, allow_blank: false}, {name: sex, type: String, nilable: false, autogenerated: false, value: "U", serialized: false, allow_blank: true}, {name: preparation_type, type: String, nilable: false, autogenerated: false, value: "dry specimens", serialized: false, allow_blank: true}, {name: disposition, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: sampling_protocol, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: sampling_effort, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: lifestage, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: establishment_means, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: rights, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: custom_taxon_info_id, type: Taxon::PrimaryKeyType, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: default_taxon_info_id, type: Taxon::PrimaryKeyType, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: collect_point_info_id, type: CollectPoint::PrimaryKeyType, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: collection_settings_info_id, type: CollectionSetting::PrimaryKeyType, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: tour_id, type: Tour::PrimaryKeyType, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: note, type: String, nilable: false, autogenerated: false, value: "", serialized: false, allow_blank: true}, {name: allow_kojin_shuzo, type: Bool, nilable: false, autogenerated: false, value: false, serialized: false, allow_blank: false}, {name: published_kojin_shuzo, type: Bool, nilable: false, autogenerated: false, value: false, serialized: false, allow_blank: false}, {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}] of Nil
-
PRIMARY_KEY_NAME =
:id
-
PRIMARY_KEY_TYPE =
UUID
Constructors
- .new(id : UUID, date_last_modified : Time, user_id : Int32 | Nil, collection_code : Int32, identified_by : String, date_identified : Time, collecter : String, year : Int32, month : Int32, day : Int32, sex : String, preparation_type : String, disposition : String, sampling_protocol : String, sampling_effort : String, lifestage : String, establishment_means : String, rights : String, custom_taxon_info_id : UUID | Nil, default_taxon_info_id : UUID | Nil, collect_point_info_id : UUID | Nil, collection_settings_info_id : UUID | Nil, tour_id : UUID | Nil, note : String, allow_kojin_shuzo : Bool, published_kojin_shuzo : Bool, image1 : Nil | String, image2 : Nil | String, image3 : Nil | String, image4 : Nil | String, image5 : Nil | String)
- .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
- #allow_kojin_shuzo : Bool
- #allow_kojin_shuzo? : Bool
-
#base_query_class : ::Specimen::BaseQuery.class
This makes it easy for plugins and extensions to use the base SaveOperation
-
#collect_point_info : CollectPoint | Nil
採集地点情報
-
#collect_point_info! : CollectPoint | Nil
採集地点情報
-
#collect_point_info_count : Int64
採集地点情報
- #collect_point_info_id : CollectPoint::PrimaryKeyType | Nil
-
#collect_point_info_preloaded? : Bool
採集地点情報
- #collect_point_info_query
- #collecter : String
- #collection_code : Int32
-
#collection_settings_info : CollectionSetting | Nil
コレクション設定情報
-
#collection_settings_info! : CollectionSetting | Nil
コレクション設定情報
-
#collection_settings_info_count : Int64
コレクション設定情報
- #collection_settings_info_id : CollectionSetting::PrimaryKeyType | Nil
-
#collection_settings_info_preloaded? : Bool
コレクション設定情報
- #collection_settings_info_query
-
#custom_taxon_info : Taxon | Nil
以上でGBIFベースのカラム定義終了 以下はオリジナルの定義 カスタム分類情報
-
#custom_taxon_info! : Taxon | Nil
以上でGBIFベースのカラム定義終了 以下はオリジナルの定義 カスタム分類情報
-
#custom_taxon_info_count : Int64
以上でGBIFベースのカラム定義終了 以下はオリジナルの定義 カスタム分類情報
- #custom_taxon_info_id : Taxon::PrimaryKeyType | Nil
-
#custom_taxon_info_preloaded? : Bool
以上でGBIFベースのカラム定義終了 以下はオリジナルの定義 カスタム分類情報
- #custom_taxon_info_query
- #date_identified : Time
- #date_last_modified : Time
- #day : Int32
-
#default_taxon_info : Taxon | Nil
デフォルト分類情報
-
#default_taxon_info! : Taxon | Nil
デフォルト分類情報
-
#default_taxon_info_count : Int64
デフォルト分類情報
- #default_taxon_info_id : Taxon::PrimaryKeyType | Nil
-
#default_taxon_info_preloaded? : Bool
デフォルト分類情報
- #default_taxon_info_query
- #delete_operation_class : ::Specimen::DeleteOperation.class
- #disposition : String
- #establishment_means : String
- #id : UUID
- #identified_by : String
- #image1 : String | Nil
- #image2 : String | Nil
- #image3 : String | Nil
- #image4 : String | Nil
- #image5 : String | Nil
- #lifestage : String
- #month : Int32
- #note : String
- #preparation_type : String
- #published_kojin_shuzo : Bool
- #published_kojin_shuzo? : Bool
- #rights : String
- #sampling_effort : String
- #sampling_protocol : String
- #save_operation_class : ::Specimen::SaveOperation.class
- #sex : String
-
#tour : Tour | Nil
所属する採集行
-
#tour! : Tour | Nil
所属する採集行
-
#tour_count : Int64
所属する採集行
- #tour_id : Tour::PrimaryKeyType | Nil
-
#tour_preloaded? : Bool
所属する採集行
- #tour_query
- #user_id : Int32 | Nil
- #year : Int32
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, date_last_modified : Time, user_id : Int32 | Nil, collection_code : Int32, identified_by : String, date_identified : Time, collecter : String, year : Int32, month : Int32, day : Int32, sex : String, preparation_type : String, disposition : String, sampling_protocol : String, sampling_effort : String, lifestage : String, establishment_means : String, rights : String, custom_taxon_info_id : UUID | Nil, default_taxon_info_id : UUID | Nil, collect_point_info_id : UUID | Nil, collection_settings_info_id : UUID | Nil, tour_id : UUID | Nil, note : String, allow_kojin_shuzo : Bool, published_kojin_shuzo : Bool, image1 : Nil | String, image2 : Nil | String, image3 : Nil | String, image4 : Nil | String, image5 : Nil | String)
#
Class Method Detail
Macro Detail
Instance Method Detail
This makes it easy for plugins and extensions to use the base SaveOperation