2 package Koha::Schema::Result::Reserve;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Reserve
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<reserves>
22 __PACKAGE__->table("reserves");
42 datetime_undef_if_invalid: 1
65 =head2 notificationdate
68 datetime_undef_if_invalid: 1
74 datetime_undef_if_invalid: 1
77 =head2 cancellationdate
80 datetime_undef_if_invalid: 1
83 =head2 cancellation_reason
108 data_type: 'timestamp'
109 datetime_undef_if_invalid: 1
110 default_value: current_timestamp
122 datetime_undef_if_invalid: 1
125 =head2 expirationdate
128 datetime_undef_if_invalid: 1
131 =head2 lowestPriority
133 accessor: 'lowest_priority'
146 data_type: 'datetime'
147 datetime_undef_if_invalid: 1
157 =head2 item_level_hold
171 __PACKAGE__->add_columns(
173 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
176 data_type => "integer",
182 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
185 data_type => "integer",
191 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
193 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
195 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
197 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
199 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
200 "cancellation_reason",
201 { data_type => "varchar", is_nullable => 1, size => 80 },
203 { data_type => "longtext", is_nullable => 1 },
205 { data_type => "smallint", default_value => 1, is_nullable => 0 },
207 { data_type => "varchar", is_nullable => 1, size => 1 },
210 data_type => "timestamp",
211 datetime_undef_if_invalid => 1,
212 default_value => \"current_timestamp",
216 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
218 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
220 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
223 accessor => "lowest_priority",
224 data_type => "tinyint",
229 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
232 data_type => "datetime",
233 datetime_undef_if_invalid => 1,
237 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
239 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
241 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
248 =item * L</reserve_id>
254 __PACKAGE__->set_primary_key("reserve_id");
262 Related object: L<Koha::Schema::Result::Biblio>
266 __PACKAGE__->belongs_to(
268 "Koha::Schema::Result::Biblio",
269 { biblionumber => "biblionumber" },
270 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
273 =head2 borrowernumber
277 Related object: L<Koha::Schema::Result::Borrower>
281 __PACKAGE__->belongs_to(
283 "Koha::Schema::Result::Borrower",
284 { borrowernumber => "borrowernumber" },
285 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
292 Related object: L<Koha::Schema::Result::Branch>
296 __PACKAGE__->belongs_to(
298 "Koha::Schema::Result::Branch",
299 { branchcode => "branchcode" },
303 on_delete => "CASCADE",
304 on_update => "CASCADE",
308 =head2 club_holds_to_patron_holds
312 Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold>
316 __PACKAGE__->has_many(
317 "club_holds_to_patron_holds",
318 "Koha::Schema::Result::ClubHoldsToPatronHold",
319 { "foreign.hold_id" => "self.reserve_id" },
320 { cascade_copy => 0, cascade_delete => 0 },
327 Related object: L<Koha::Schema::Result::Desk>
331 __PACKAGE__->belongs_to(
333 "Koha::Schema::Result::Desk",
334 { desk_id => "desk_id" },
338 on_delete => "SET NULL",
339 on_update => "CASCADE",
347 Related object: L<Koha::Schema::Result::Item>
351 __PACKAGE__->belongs_to(
353 "Koha::Schema::Result::Item",
354 { itemnumber => "itemnumber" },
358 on_delete => "CASCADE",
359 on_update => "CASCADE",
367 Related object: L<Koha::Schema::Result::Itemtype>
371 __PACKAGE__->belongs_to(
373 "Koha::Schema::Result::Itemtype",
374 { itemtype => "itemtype" },
378 on_delete => "CASCADE",
379 on_update => "CASCADE",
384 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-11-06 11:00:40
385 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ue2kNBP+lq8+9NthPiYrrw
387 __PACKAGE__->belongs_to(
389 "Koha::Schema::Result::Item",
390 { itemnumber => "itemnumber" },
394 on_delete => "CASCADE",
395 on_update => "CASCADE",
399 __PACKAGE__->belongs_to(
401 "Koha::Schema::Result::Biblio",
402 { biblionumber => "biblionumber" },
406 on_delete => "CASCADE",
407 on_update => "CASCADE",
411 __PACKAGE__->add_columns(
412 '+item_level_hold' => { is_boolean => 1 },
413 '+lowestPriority' => { is_boolean => 1 },
414 '+suspend' => { is_boolean => 1 },
415 '+non_priority' => { is_boolean => 1 }
418 sub koha_object_class {
421 sub koha_objects_class {