From d7dac21ad83b0cf0a679559646c373c22705590f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 11 Mar 2022 13:31:53 +0000 Subject: [PATCH] Bug 30275: DBIC Schema Additions Add checkout and old_checkout relations to CheckoutRenewal schema and mark 'seen' as a boolean. Signed-off-by: Owen Leonard Signed-off-by: Tomas Cohen Arazi --- Koha/Schema/Result/CheckoutRenewal.pm | 47 ++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/Koha/Schema/Result/CheckoutRenewal.pm b/Koha/Schema/Result/CheckoutRenewal.pm index 6963927e9a..2e230ca9a6 100644 --- a/Koha/Schema/Result/CheckoutRenewal.pm +++ b/Koha/Schema/Result/CheckoutRenewal.pm @@ -129,6 +129,51 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-11 16:33:50 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:agLgLnVeKYB5wdWS06xD0A +=head2 checkout + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "checkout", + "Koha::Schema::Result::Issue", + { issue_id => "issue_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + }, +); + +=head2 old_checkout + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "old_checkout", + "Koha::Schema::Result::OldIssue", + { issue_id => "issue_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + }, +); + +__PACKAGE__->add_columns( + '+seen' => { is_boolean => 1 } +); + +sub koha_objects_class { + 'Koha::Checkouts::Renewals'; +} +sub koha_object_class { + 'Koha::Checkouts::Renewal'; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; -- 2.39.5