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
95 data_type: 'timestamp'
96 datetime_undef_if_invalid: 1
97 default_value: current_timestamp
109 datetime_undef_if_invalid: 1
112 =head2 expirationdate
115 datetime_undef_if_invalid: 1
118 =head2 lowestPriority
120 accessor: 'lowest_priority'
133 data_type: 'datetime'
134 datetime_undef_if_invalid: 1
144 =head2 item_level_hold
152 __PACKAGE__
->add_columns(
154 { data_type
=> "integer", is_auto_increment
=> 1, is_nullable
=> 0 },
157 data_type
=> "integer",
163 { data_type
=> "date", datetime_undef_if_invalid
=> 1, is_nullable
=> 1 },
166 data_type
=> "integer",
172 { data_type
=> "varchar", is_foreign_key
=> 1, is_nullable
=> 1, size
=> 10 },
174 { data_type
=> "date", datetime_undef_if_invalid
=> 1, is_nullable
=> 1 },
176 { data_type
=> "date", datetime_undef_if_invalid
=> 1, is_nullable
=> 1 },
178 { data_type
=> "date", datetime_undef_if_invalid
=> 1, is_nullable
=> 1 },
180 { data_type
=> "longtext", is_nullable
=> 1 },
182 { data_type
=> "smallint", is_nullable
=> 1 },
184 { data_type
=> "varchar", is_nullable
=> 1, size
=> 1 },
187 data_type
=> "timestamp",
188 datetime_undef_if_invalid
=> 1,
189 default_value
=> \"current_timestamp
",
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 },
200 accessor => "lowest_priority
",
201 data_type => "tinyint
",
206 { data_type => "tinyint
", default_value => 0, is_nullable => 0 },
209 data_type => "datetime
",
210 datetime_undef_if_invalid => 1,
214 { data_type => "varchar
", is_foreign_key => 1, is_nullable => 1, size => 10 },
216 { data_type => "tinyint
", default_value => 0, is_nullable => 0 },
223 =item * L</reserve_id>
229 __PACKAGE__->set_primary_key("reserve_id
");
237 Related object: L<Koha::Schema::Result::Biblio>
241 __PACKAGE__->belongs_to(
243 "Koha
::Schema
::Result
::Biblio
",
244 { biblionumber => "biblionumber
" },
245 { is_deferrable => 1, on_delete => "CASCADE
", on_update => "CASCADE
" },
248 =head2 borrowernumber
252 Related object: L<Koha::Schema::Result::Borrower>
256 __PACKAGE__->belongs_to(
258 "Koha
::Schema
::Result
::Borrower
",
259 { borrowernumber => "borrowernumber
" },
260 { is_deferrable => 1, on_delete => "CASCADE
", on_update => "CASCADE
" },
267 Related object: L<Koha::Schema::Result::Branch>
271 __PACKAGE__->belongs_to(
273 "Koha
::Schema
::Result
::Branch
",
274 { branchcode => "branchcode
" },
278 on_delete => "CASCADE
",
279 on_update => "CASCADE
",
283 =head2 club_holds_to_patron_holds
287 Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold>
291 __PACKAGE__->has_many(
292 "club_holds_to_patron_holds
",
293 "Koha
::Schema
::Result
::ClubHoldsToPatronHold
",
294 { "foreign
.hold_id
" => "self
.reserve_id
" },
295 { cascade_copy => 0, cascade_delete => 0 },
302 Related object: L<Koha::Schema::Result::Item>
306 __PACKAGE__->belongs_to(
308 "Koha
::Schema
::Result
::Item
",
309 { itemnumber => "itemnumber
" },
313 on_delete => "CASCADE
",
314 on_update => "CASCADE
",
322 Related object: L<Koha::Schema::Result::Itemtype>
326 __PACKAGE__->belongs_to(
328 "Koha
::Schema
::Result
::Itemtype
",
329 { itemtype => "itemtype
" },
333 on_delete => "CASCADE
",
334 on_update => "CASCADE
",
339 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:48
340 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pc5zh5iFbdwko5KS51Y9Uw
342 __PACKAGE__->belongs_to(
344 "Koha
::Schema
::Result
::Item
",
345 { itemnumber => "itemnumber
" },
349 on_delete => "CASCADE
",
350 on_update => "CASCADE
",
354 __PACKAGE__->belongs_to(
356 "Koha
::Schema
::Result
::Biblio
",
357 { biblionumber => "biblionumber
" },
361 on_delete => "CASCADE
",
362 on_update => "CASCADE
",
366 __PACKAGE__->add_columns(
367 '+item_level_hold' => { is_boolean => 1 },
368 '+lowestPriority' => { is_boolean => 1 },
369 '+suspend' => { is_boolean => 1 }
372 sub koha_object_class {
375 sub koha_objects_class {