2 package Koha::Schema::Result::OldReserve;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::OldReserve
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<old_reserves>
22 __PACKAGE__->table("old_reserves");
39 foreign key from the borrowers table defining which patron this hold is for
44 datetime_undef_if_invalid: 1
47 the date the hold was places
55 foreign key from the biblio table defining which bib record this hold is on
63 foreign key from the branches table defining which branch the patron wishes to pick this hold up at
70 foreign key from the desks table defining which desk the patron should pick this hold up at
72 =head2 notificationdate
75 datetime_undef_if_invalid: 1
83 datetime_undef_if_invalid: 1
88 =head2 cancellationdate
91 datetime_undef_if_invalid: 1
94 the date this hold was cancelled
96 =head2 cancellation_reason
102 optional authorised value CANCELLATION_REASON
106 data_type: 'longtext'
109 notes related to this hold
113 data_type: 'smallint'
117 where in the queue the patron sits
125 a one letter code defining what the status is of the hold is after it has been confirmed
129 data_type: 'timestamp'
130 datetime_undef_if_invalid: 1
131 default_value: current_timestamp
134 the date and time this hold was last updated
142 foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with
147 datetime_undef_if_invalid: 1
150 the date the item was marked as waiting for the patron at the library
152 =head2 expirationdate
155 datetime_undef_if_invalid: 1
158 the date the hold expires (usually the date entered by the patron to say they don't need the hold after a certain date)
160 =head2 patron_expiration_date
163 datetime_undef_if_invalid: 1
166 the date the hold expires - usually the date entered by the patron to say they don't need the hold after a certain date
168 =head2 lowestPriority
170 accessor: 'lowest_priority'
175 has this hold been pinned to the lowest priority in the holds queue (1 for yes, 0 for no)
183 in this hold suspended (1 for yes, 0 for no)
187 data_type: 'datetime'
188 datetime_undef_if_invalid: 1
191 the date this hold is suspended until (NULL for infinitely)
200 If record level hold, the optional itemtype of the item the patron is requesting
202 =head2 item_level_hold
208 Is the hpld placed at item level
216 Is this a non priority hold
220 __PACKAGE__->add_columns(
222 { data_type => "integer", is_nullable => 0 },
224 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
226 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
228 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
230 { data_type => "varchar", is_nullable => 1, size => 10 },
232 { data_type => "integer", is_nullable => 1 },
234 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
236 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
238 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
239 "cancellation_reason",
240 { data_type => "varchar", is_nullable => 1, size => 80 },
242 { data_type => "longtext", is_nullable => 1 },
244 { data_type => "smallint", default_value => 1, is_nullable => 0 },
246 { data_type => "varchar", is_nullable => 1, size => 1 },
249 data_type => "timestamp",
250 datetime_undef_if_invalid => 1,
251 default_value => \"current_timestamp",
255 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
257 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
259 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
260 "patron_expiration_date",
261 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
264 accessor => "lowest_priority",
265 data_type => "tinyint",
270 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
273 data_type => "datetime",
274 datetime_undef_if_invalid => 1,
278 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
280 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
282 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
289 =item * L</reserve_id>
295 __PACKAGE__->set_primary_key("reserve_id");
303 Related object: L<Koha::Schema::Result::Biblio>
307 __PACKAGE__->belongs_to(
309 "Koha::Schema::Result::Biblio",
310 { biblionumber => "biblionumber" },
314 on_delete => "SET NULL",
315 on_update => "SET NULL",
319 =head2 borrowernumber
323 Related object: L<Koha::Schema::Result::Borrower>
327 __PACKAGE__->belongs_to(
329 "Koha::Schema::Result::Borrower",
330 { borrowernumber => "borrowernumber" },
334 on_delete => "SET NULL",
335 on_update => "SET NULL",
343 Related object: L<Koha::Schema::Result::Item>
347 __PACKAGE__->belongs_to(
349 "Koha::Schema::Result::Item",
350 { itemnumber => "itemnumber" },
354 on_delete => "SET NULL",
355 on_update => "SET NULL",
363 Related object: L<Koha::Schema::Result::Itemtype>
367 __PACKAGE__->belongs_to(
369 "Koha::Schema::Result::Itemtype",
370 { itemtype => "itemtype" },
374 on_delete => "SET NULL",
375 on_update => "SET NULL",
380 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-01-28 20:08:09
381 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A3iHpf4nDeIpPsapNzdv8w
383 __PACKAGE__->belongs_to(
385 "Koha::Schema::Result::Item",
386 { itemnumber => "itemnumber" },
390 on_delete => "CASCADE",
391 on_update => "CASCADE",
395 __PACKAGE__->belongs_to(
397 "Koha::Schema::Result::Biblio",
398 { biblionumber => "biblionumber" },
402 on_delete => "CASCADE",
403 on_update => "CASCADE",
407 __PACKAGE__->add_columns(
408 '+item_level_hold' => { is_boolean => 1 },
409 '+lowestPriority' => { is_boolean => 1 },
410 '+suspend' => { is_boolean => 1 },
411 '+non_priority' => { is_boolean => 1 }
414 sub koha_object_class {
417 sub koha_objects_class {