@@ -, +, @@ --- C4/HoldsQueue.pm | 3 +- Koha/Hold/HoldsQueueItem.pm | 46 +++++++++++++++++++++++ Koha/Hold/HoldsQueueItems.pm | 57 +++++++++++++++++++++++++++++ Koha/Schema/Result/TmpHoldsqueue.pm | 12 +++++- 4 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 Koha/Hold/HoldsQueueItem.pm create mode 100644 Koha/Hold/HoldsQueueItems.pm --- a/C4/HoldsQueue.pm +++ a/C4/HoldsQueue.pm @@ -25,9 +25,10 @@ use warnings; use C4::Context; use C4::Circulation qw( GetBranchItemRule ); use Koha::DateUtils qw( dt_from_string ); +use Koha::HoldsQueueItems; use Koha::Items; -use Koha::Patrons; use Koha::Libraries; +use Koha::Patrons; use List::Util qw( shuffle ); use List::MoreUtils qw( any ); --- a/Koha/Hold/HoldsQueueItem.pm +++ a/Koha/Hold/HoldsQueueItem.pm @@ -0,0 +1,46 @@ +package Koha::Hold::HoldsQueueItem; + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use Koha::Database; + +use base qw(Koha::Object); + +=head1 NAME + +Koha::Hold::HoldsQueueItem - Koha hold cancellation request Object class + +=head1 API + +=head2 Internal methods + +=head3 _type + +=cut + +sub _type { + return 'TmpHoldsqueue'; +} + +=head1 AUTHORS + +Kyle Hall + +=cut + +1; --- a/Koha/Hold/HoldsQueueItems.pm +++ a/Koha/Hold/HoldsQueueItems.pm @@ -0,0 +1,57 @@ +package Koha::Hold::HoldsQueueItems; + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + + +use Koha::Database; + +use Koha::Hold::HoldsQueueItem; + +use base qw(Koha::Objects); + +=head1 NAME + +Koha::Hold::HoldsQueueItems - Koha hold cancellation requests Object set class + +=head1 API + +=head2 Internal methods + +=head3 _type + +=cut + +sub _type { + return 'TmpHoldsqueue'; +} + +=head3 object_class + +=cut + +sub object_class { + return 'Koha::Hold::HoldsQueueItem'; +} + +=head1 AUTHORS + +Kyle Hall + +=cut + +1; --- a/Koha/Schema/Result/TmpHoldsqueue.pm +++ a/Koha/Schema/Result/TmpHoldsqueue.pm @@ -220,6 +220,16 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-04 22:42:42 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RdIrLi+vbzj3ab/UP7e9pw +__PACKAGE__->add_columns( + '+item_level_request' => { is_boolean => 1 } +); + +sub koha_object_class { + 'Koha::HoldsQueueItem'; +} + +sub koha_objects_class { + 'Koha::HoldsQueueItems'; +} -# You can replace this text with custom content, and it will be preserved on regeneration 1; --