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
159 __PACKAGE__->add_columns(
161 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
164 data_type => "integer",
170 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
173 data_type => "integer",
179 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
181 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
183 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
185 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
186 "cancellation_reason",
187 { data_type => "varchar", is_nullable => 1, size => 80 },
189 { data_type => "longtext", is_nullable => 1 },
191 { data_type => "smallint", default_value => 1, is_nullable => 0 },
193 { data_type => "varchar", is_nullable => 1, size => 1 },
196 data_type => "timestamp",
197 datetime_undef_if_invalid => 1,
198 default_value => \"current_timestamp",
202 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
204 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
206 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
209 accessor => "lowest_priority",
210 data_type => "tinyint",
215 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
218 data_type => "datetime",
219 datetime_undef_if_invalid => 1,
223 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
225 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
232 =item * L</reserve_id>
238 __PACKAGE__->set_primary_key("reserve_id");
246 Related object: L<Koha::Schema::Result::Biblio>
250 __PACKAGE__->belongs_to(
252 "Koha::Schema::Result::Biblio",
253 { biblionumber => "biblionumber" },
254 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
257 =head2 borrowernumber
261 Related object: L<Koha::Schema::Result::Borrower>
265 __PACKAGE__->belongs_to(
267 "Koha::Schema::Result::Borrower",
268 { borrowernumber => "borrowernumber" },
269 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
276 Related object: L<Koha::Schema::Result::Branch>
280 __PACKAGE__->belongs_to(
282 "Koha::Schema::Result::Branch",
283 { branchcode => "branchcode" },
287 on_delete => "CASCADE",
288 on_update => "CASCADE",
292 =head2 club_holds_to_patron_holds
296 Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold>
300 __PACKAGE__->has_many(
301 "club_holds_to_patron_holds",
302 "Koha::Schema::Result::ClubHoldsToPatronHold",
303 { "foreign.hold_id" => "self.reserve_id" },
304 { cascade_copy => 0, cascade_delete => 0 },
311 Related object: L<Koha::Schema::Result::Item>
315 __PACKAGE__->belongs_to(
317 "Koha::Schema::Result::Item",
318 { itemnumber => "itemnumber" },
322 on_delete => "CASCADE",
323 on_update => "CASCADE",
331 Related object: L<Koha::Schema::Result::Itemtype>
335 __PACKAGE__->belongs_to(
337 "Koha::Schema::Result::Itemtype",
338 { itemtype => "itemtype" },
342 on_delete => "CASCADE",
343 on_update => "CASCADE",
348 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-08-25 13:08:15
349 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qdEIwB+DOrraRb+zd4F6yQ
351 __PACKAGE__->belongs_to(
353 "Koha::Schema::Result::Item",
354 { itemnumber => "itemnumber" },
358 on_delete => "CASCADE",
359 on_update => "CASCADE",
363 __PACKAGE__->belongs_to(
365 "Koha::Schema::Result::Biblio",
366 { biblionumber => "biblionumber" },
370 on_delete => "CASCADE",
371 on_update => "CASCADE",
375 __PACKAGE__->add_columns(
376 '+item_level_hold' => { is_boolean => 1 },
377 '+lowestPriority' => { is_boolean => 1 },
378 '+suspend' => { is_boolean => 1 }
381 sub koha_object_class {
384 sub koha_objects_class {