From 10c90d08f617cae1ea11c4fb38706eb6e1183f2a Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 6 Mar 2023 11:24:40 -0300 Subject: [PATCH] Bug 31028: DBIC schema Signed-off-by: Tomas Cohen Arazi --- Koha/Schema/Result/Biblio.pm | 19 +++++++++++-- Koha/Schema/Result/Borrower.pm | 49 ++++++++++++++++++++++++++++++++-- 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm index 2d9abfb7e0..1862646c2c 100644 --- a/Koha/Schema/Result/Biblio.pm +++ b/Koha/Schema/Result/Biblio.pm @@ -540,6 +540,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 tickets + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "tickets", + "Koha::Schema::Result::Ticket", + { "foreign.biblio_id" => "self.biblionumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 tmp_holdsqueues Type: has_many @@ -571,8 +586,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-07-13 12:25:59 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:C1RZYgDcw6WrZ5laTaKV6w +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-06 14:23:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j4elmpNlSt3eMlzF1yXCxg __PACKAGE__->has_many( "biblioitem", diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm index c8f4f32dd2..1f01994cd9 100644 --- a/Koha/Schema/Result/Borrower.pm +++ b/Koha/Schema/Result/Borrower.pm @@ -1932,6 +1932,51 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 ticket_updates + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "ticket_updates", + "Koha::Schema::Result::TicketUpdate", + { "foreign.user_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + +=head2 tickets_reporters + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "tickets_reporters", + "Koha::Schema::Result::Ticket", + { "foreign.reporter_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + +=head2 tickets_resolvers + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "tickets_resolvers", + "Koha::Schema::Result::Ticket", + { "foreign.resolver_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 tmp_holdsqueues Type: has_many @@ -2058,8 +2103,8 @@ Composing rels: L -> permission __PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-10 17:43:30 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5hh2lGCcKclyTnY7KNPkvg +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-06 14:23:57 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/63fcorna7WyO+DyLg8qLA __PACKAGE__->has_many( "restrictions", -- 2.39.5