Bug 22440: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomás Cohen Arazi 2023-05-05 09:10:31 -03:00
parent 50909d2266
commit 6a35d9fbed
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 41 additions and 5 deletions

View file

@ -330,6 +330,21 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 illrequests
Type: has_many
Related object: L<Koha::Schema::Result::Illrequest>
=cut
__PACKAGE__->has_many(
"illrequests",
"Koha::Schema::Result::Illrequest",
{ "foreign.biblio_id" => "self.biblionumber" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 item_groups
Type: has_many
@ -586,8 +601,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-06 14:23:57
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j4elmpNlSt3eMlzF1yXCxg
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-05-05 12:10:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xDa15D5QckMdwVzVy4FX2g
__PACKAGE__->has_many(
"biblioitem",

View file

@ -43,6 +43,7 @@ Patron associated with request
=head2 biblio_id
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
Potential bib linked to request
@ -187,7 +188,7 @@ __PACKAGE__->add_columns(
"borrowernumber",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"biblio_id",
{ data_type => "integer", is_nullable => 1 },
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"due_date",
{
data_type => "datetime",
@ -245,6 +246,26 @@ __PACKAGE__->set_primary_key("illrequest_id");
=head1 RELATIONS
=head2 biblio
Type: belongs_to
Related object: L<Koha::Schema::Result::Biblio>
=cut
__PACKAGE__->belongs_to(
"biblio",
"Koha::Schema::Result::Biblio",
{ biblionumber => "biblio_id" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "SET NULL",
on_update => "CASCADE",
},
);
=head2 borrowernumber
Type: belongs_to
@ -331,8 +352,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-06-23 18:44:13
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:on9OCRON/U0uR+m9aPIKPg
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-05-05 12:10:10
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1VhNc8tMnvCpBYaj90YOiQ
__PACKAGE__->has_many(
"comments",