From fabb2bc896a8248405f183ec025e4475fc9b9a27 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 24 Feb 2025 14:57:44 +0000 Subject: [PATCH] Bug 38924: Add koha_object_class to Schema files --- Koha/Schema/Result/Issue.pm | 8 +++++++- Koha/Schema/Result/PatronQuota.pm | 21 ++++++++++++++++++++- Koha/Schema/Result/PatronQuotaUsage.pm | 21 ++++++++++++++++++++- 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm index ffb83a50e63..a90f1ca3310 100644 --- a/Koha/Schema/Result/Issue.pm +++ b/Koha/Schema/Result/Issue.pm @@ -468,13 +468,19 @@ __PACKAGE__->has_many( 'issue_id' ); +=head2 koha_object_class + +Returns the Koha object class for this result. + +=cut + sub koha_object_class { 'Koha::Checkout'; } =head2 koha_objects_class -Missing POD for koha_objects_class. +Returns the Koha objects class for this result. =cut diff --git a/Koha/Schema/Result/PatronQuota.pm b/Koha/Schema/Result/PatronQuota.pm index 42a7fb33a87..4dd24121b82 100644 --- a/Koha/Schema/Result/PatronQuota.pm +++ b/Koha/Schema/Result/PatronQuota.pm @@ -145,6 +145,25 @@ __PACKAGE__->has_many( # Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-01-30 16:04:36 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KG/MIjPSLcpeSlPypwli2Q +=head2 koha_object_class + +Returns the Koha object class for this result. + +=cut + +sub koha_object_class { + return 'Koha::Patron::Quota'; +} + +=head2 koha_objects_class + +Returns the Koha objects class for this result. + +=cut + +sub koha_objects_class { + return 'Koha::Patron::Quotas'; +} + -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/Koha/Schema/Result/PatronQuotaUsage.pm b/Koha/Schema/Result/PatronQuotaUsage.pm index dd54662f96a..ee82abbe1ce 100644 --- a/Koha/Schema/Result/PatronQuotaUsage.pm +++ b/Koha/Schema/Result/PatronQuotaUsage.pm @@ -173,5 +173,24 @@ __PACKAGE__->belongs_to( { join_type => 'left' } ); -# You can replace this text with custom code or comments, and it will be preserved on regeneration +=head2 koha_object_class + +Returns the Koha object class for this result. + +=cut + +sub koha_object_class { + return 'Koha::Patron::Quota::Usage'; +} + +=head2 koha_objects_class + +Returns the Koha objects class for this result. + +=cut + +sub koha_objects_class { + return 'Koha::Patron::Quota::Usages'; +} + 1; -- 2.39.5