primary_key_name
SecretSantaAssignment
Inherits Avram::PrimaryKeyMethods < DB::Mappable < DB::Serializable < LuckyCache::Cachable < BaseModel < DB::Mappable < DB::Serializable < LuckyCache::Cachable < Avram::Model < Avram::SchemaEnforcer < Avram::Polymorphic < Avram::Associations < Avram::Associations::BelongsTo < Avram::Associations::HasOne < Avram::Associations::HasMany < Reference < Object
Constants
ASSOCIATIONS = [{type: SecretSanta, assoc_name: secret_santa, foreign_key: :secret_santa_id,
relationship_type: :belongs_to,
through: nil, base_query_class: nil}, {type: Guest, assoc_name: giver, foreign_key: :giver_id,
relationship_type: :belongs_to,
through: nil, base_query_class: nil}, {type: Guest, assoc_name: receiver, foreign_key: :receiver_id,
relationship_type: :belongs_to,
through: nil, base_query_class: nil}] of Nil
COLUMNS = [{name: id, type: Int64, 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: updated_at, type: Time, nilable: false, autogenerated: true, value: nil, serialized: false, allow_blank: false}, {name: status, type: SecretSantaAssignment::Status, nilable: false, autogenerated: false, value: SecretSantaAssignment::Status::Pending,
serialized: false, allow_blank: false}, {name: notes, type: String, nilable: true, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: secret_santa_id, type: SecretSanta::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: giver_id, type: Guest::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}, {name: receiver_id, type: Guest::PrimaryKeyType, nilable: false, autogenerated: false, value: nil, serialized: false, allow_blank: false}] of Nil
PRIMARY_KEY_NAME = :id
PRIMARY_KEY_TYPE = Int64
Constructors
new(rs : DB::ResultSet)
Class methods
column_names
columns
ensure_correct_column_mappings!
from_rs(rs : DB::ResultSet)
schema_enforcer_validations
table_name
Instance methods
base_query_class
This makes it easy for plugins and extensions to use the base SaveOperation
created_at
delete_operation_class
giver
giver!
giver_count
giver_id
giver_preloaded?
Returns true if the association has been preloaded
giver_query
id
notes
receiver
receiver!
receiver_count
receiver_id
receiver_preloaded?
Returns true if the association has been preloaded
receiver_query
save_operation_class
secret_santa
secret_santa!
secret_santa_count
secret_santa_id
secret_santa_preloaded?
Returns true if the association has been preloaded
secret_santa_query
status
updated_at