Bug 19532: [DBIx] Updated schema files

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Aleisha Amohia 2021-10-14 15:07:50 +13:00 committed by Fridolin Somers
parent 53aa7b523b
commit e56a85d5ae
6 changed files with 344 additions and 12 deletions

View file

@ -375,6 +375,21 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 recalls
Type: has_many
Related object: L<Koha::Schema::Result::Recall>
=cut
__PACKAGE__->has_many(
"recalls",
"Koha::Schema::Result::Recall",
{ "foreign.biblionumber" => "self.biblionumber" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 reserves
Type: has_many
@ -526,8 +541,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-20 12:00:15
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:troBZEbpX+2RhgH2jptVZQ
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-10-14 15:07:03
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6YO2t5VoWcG/tM+8uOP/wg
__PACKAGE__->has_many(
"biblioitem",

View file

@ -1559,6 +1559,21 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 recalls
Type: has_many
Related object: L<Koha::Schema::Result::Recall>
=cut
__PACKAGE__->has_many(
"recalls",
"Koha::Schema::Result::Recall",
{ "foreign.borrowernumber" => "self.borrowernumber" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 reserves
Type: has_many

View file

@ -761,6 +761,21 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 recalls
Type: has_many
Related object: L<Koha::Schema::Result::Recall>
=cut
__PACKAGE__->has_many(
"recalls",
"Koha::Schema::Result::Recall",
{ "foreign.branchcode" => "self.branchcode" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 repeatable_holidays
Type: has_many
@ -867,8 +882,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-11-19 14:20:11
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:v83MNP0UpFzlnax8rSQWSA
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2022-02-15 02:16:34
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PR2GOpldAnNtyB2DRLsE9g
__PACKAGE__->add_columns(
'+pickup_location' => { is_boolean => 1 },

View file

@ -103,11 +103,9 @@ any comments related to the transfer
=head2 reason
data_type: 'enum'
extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve","TransferCancellation"]}
extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve","Recall","CancelRecall"]}
is_nullable: 1
what triggered the transfer
=head2 cancellation_reason
data_type: 'enum'
@ -185,7 +183,8 @@ __PACKAGE__->add_columns(
"Reserve",
"LostReserve",
"CancelReserve",
"TransferCancellation",
"Recall",
"CancelRecall",
],
},
is_nullable => 1,
@ -272,8 +271,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-06-08 08:13:08
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+ABUZOo6IHbiRH1LTy3t+A
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-10-14 15:07:03
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:APOPxPO4uRpPHgSEhXbnTw
sub koha_object_class {
'Koha::Item::Transfer';

View file

@ -789,6 +789,21 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 recalls
Type: has_many
Related object: L<Koha::Schema::Result::Recall>
=cut
__PACKAGE__->has_many(
"recalls",
"Koha::Schema::Result::Recall",
{ "foreign.itemnumber" => "self.itemnumber" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 reserves
Type: has_many
@ -865,8 +880,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-27 08:42:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SjZn3haOtUZWu1jrMigjNQ
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-10-14 15:07:03
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yRbholcHil9qRF5t+83jdA
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );

View file

@ -0,0 +1,273 @@
use utf8;
package Koha::Schema::Result::Recall;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Koha::Schema::Result::Recall
=cut
use strict;
use warnings;
use base 'DBIx::Class::Core';
=head1 TABLE: C<recalls>
=cut
__PACKAGE__->table("recalls");
=head1 ACCESSORS
=head2 recall_id
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 borrowernumber
data_type: 'integer'
default_value: 0
is_foreign_key: 1
is_nullable: 0
=head2 recalldate
data_type: 'datetime'
datetime_undef_if_invalid: 1
is_nullable: 1
=head2 biblionumber
data_type: 'integer'
default_value: 0
is_foreign_key: 1
is_nullable: 0
=head2 branchcode
data_type: 'varchar'
is_foreign_key: 1
is_nullable: 1
size: 10
=head2 cancellationdate
data_type: 'datetime'
datetime_undef_if_invalid: 1
is_nullable: 1
=head2 recallnotes
data_type: 'mediumtext'
is_nullable: 1
=head2 priority
data_type: 'smallint'
is_nullable: 1
=head2 status
data_type: 'varchar'
is_nullable: 1
size: 1
=head2 timestamp
data_type: 'timestamp'
datetime_undef_if_invalid: 1
default_value: current_timestamp
is_nullable: 0
=head2 itemnumber
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
=head2 waitingdate
data_type: 'datetime'
datetime_undef_if_invalid: 1
is_nullable: 1
=head2 expirationdate
data_type: 'datetime'
datetime_undef_if_invalid: 1
is_nullable: 1
=head2 old
data_type: 'tinyint'
is_nullable: 1
=head2 item_level_recall
data_type: 'tinyint'
default_value: 0
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"recall_id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"borrowernumber",
{
data_type => "integer",
default_value => 0,
is_foreign_key => 1,
is_nullable => 0,
},
"recalldate",
{
data_type => "datetime",
datetime_undef_if_invalid => 1,
is_nullable => 1,
},
"biblionumber",
{
data_type => "integer",
default_value => 0,
is_foreign_key => 1,
is_nullable => 0,
},
"branchcode",
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
"cancellationdate",
{
data_type => "datetime",
datetime_undef_if_invalid => 1,
is_nullable => 1,
},
"recallnotes",
{ data_type => "mediumtext", is_nullable => 1 },
"priority",
{ data_type => "smallint", is_nullable => 1 },
"status",
{ data_type => "varchar", is_nullable => 1, size => 1 },
"timestamp",
{
data_type => "timestamp",
datetime_undef_if_invalid => 1,
default_value => \"current_timestamp",
is_nullable => 0,
},
"itemnumber",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"waitingdate",
{
data_type => "datetime",
datetime_undef_if_invalid => 1,
is_nullable => 1,
},
"expirationdate",
{
data_type => "datetime",
datetime_undef_if_invalid => 1,
is_nullable => 1,
},
"old",
{ data_type => "tinyint", is_nullable => 1 },
"item_level_recall",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</recall_id>
=back
=cut
__PACKAGE__->set_primary_key("recall_id");
=head1 RELATIONS
=head2 biblionumber
Type: belongs_to
Related object: L<Koha::Schema::Result::Biblio>
=cut
__PACKAGE__->belongs_to(
"biblionumber",
"Koha::Schema::Result::Biblio",
{ biblionumber => "biblionumber" },
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
=head2 borrowernumber
Type: belongs_to
Related object: L<Koha::Schema::Result::Borrower>
=cut
__PACKAGE__->belongs_to(
"borrowernumber",
"Koha::Schema::Result::Borrower",
{ borrowernumber => "borrowernumber" },
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
=head2 branchcode
Type: belongs_to
Related object: L<Koha::Schema::Result::Branch>
=cut
__PACKAGE__->belongs_to(
"branchcode",
"Koha::Schema::Result::Branch",
{ branchcode => "branchcode" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "CASCADE",
on_update => "CASCADE",
},
);
=head2 itemnumber
Type: belongs_to
Related object: L<Koha::Schema::Result::Item>
=cut
__PACKAGE__->belongs_to(
"itemnumber",
"Koha::Schema::Result::Item",
{ itemnumber => "itemnumber" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "CASCADE",
on_update => "CASCADE",
},
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-10-14 15:07:03
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3OJBkRJzqxZpuRp0GYGixw
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;