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
59 =head2 notificationdate
62 datetime_undef_if_invalid: 1
68 datetime_undef_if_invalid: 1
71 =head2 cancellationdate
74 datetime_undef_if_invalid: 1
77 =head2 cancellation_reason
102 data_type: 'timestamp'
103 datetime_undef_if_invalid: 1
104 default_value: current_timestamp
116 datetime_undef_if_invalid: 1
119 =head2 expirationdate
122 datetime_undef_if_invalid: 1
125 =head2 lowestPriority
127 accessor: 'lowest_priority'
140 data_type: 'datetime'
141 datetime_undef_if_invalid: 1
151 =head2 item_level_hold
165 __PACKAGE__->add_columns(
167 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
170 data_type => "integer",
176 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
179 data_type => "integer",
185 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
187 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
189 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
191 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
192 "cancellation_reason",
193 { data_type => "varchar", is_nullable => 1, size => 80 },
195 { data_type => "longtext", is_nullable => 1 },
197 { data_type => "smallint", default_value => 1, is_nullable => 0 },
199 { data_type => "varchar", is_nullable => 1, size => 1 },
202 data_type => "timestamp",
203 datetime_undef_if_invalid => 1,
204 default_value => \"current_timestamp",
208 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
210 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
212 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
215 accessor => "lowest_priority",
216 data_type => "tinyint",
221 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
224 data_type => "datetime",
225 datetime_undef_if_invalid => 1,
229 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
231 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
233 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
240 =item * L</reserve_id>
246 __PACKAGE__->set_primary_key("reserve_id");
254 Related object: L<Koha::Schema::Result::Biblio>
258 __PACKAGE__->belongs_to(
260 "Koha::Schema::Result::Biblio",
261 { biblionumber => "biblionumber" },
262 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
265 =head2 borrowernumber
269 Related object: L<Koha::Schema::Result::Borrower>
273 __PACKAGE__->belongs_to(
275 "Koha::Schema::Result::Borrower",
276 { borrowernumber => "borrowernumber" },
277 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
284 Related object: L<Koha::Schema::Result::Branch>
288 __PACKAGE__->belongs_to(
290 "Koha::Schema::Result::Branch",
291 { branchcode => "branchcode" },
295 on_delete => "CASCADE",
296 on_update => "CASCADE",
300 =head2 club_holds_to_patron_holds
304 Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold>
308 __PACKAGE__->has_many(
309 "club_holds_to_patron_holds",
310 "Koha::Schema::Result::ClubHoldsToPatronHold",
311 { "foreign.hold_id" => "self.reserve_id" },
312 { cascade_copy => 0, cascade_delete => 0 },
319 Related object: L<Koha::Schema::Result::Item>
323 __PACKAGE__->belongs_to(
325 "Koha::Schema::Result::Item",
326 { itemnumber => "itemnumber" },
330 on_delete => "CASCADE",
331 on_update => "CASCADE",
339 Related object: L<Koha::Schema::Result::Itemtype>
343 __PACKAGE__->belongs_to(
345 "Koha::Schema::Result::Itemtype",
346 { itemtype => "itemtype" },
350 on_delete => "CASCADE",
351 on_update => "CASCADE",
356 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-08-31 14:16:48
357 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:goRy3ZQWpGNmicok5Av37Q
359 __PACKAGE__->belongs_to(
361 "Koha::Schema::Result::Item",
362 { itemnumber => "itemnumber" },
366 on_delete => "CASCADE",
367 on_update => "CASCADE",
371 __PACKAGE__->belongs_to(
373 "Koha::Schema::Result::Biblio",
374 { biblionumber => "biblionumber" },
378 on_delete => "CASCADE",
379 on_update => "CASCADE",
383 __PACKAGE__->add_columns(
384 '+item_level_hold' => { is_boolean => 1 },
385 '+lowestPriority' => { is_boolean => 1 },
386 '+suspend' => { is_boolean => 1 },
387 '+non_priority' => { is_boolean => 1 }
390 sub koha_object_class {
393 sub koha_objects_class {