+use utf8;
package Koha::Schema::Result::Reserve;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
+=head1 NAME
+
+Koha::Schema::Result::Reserve
+
+=cut
+
use strict;
use warnings;
use base 'DBIx::Class::Core';
-
-=head1 NAME
-
-Koha::Schema::Result::Reserve
+=head1 TABLE: C<reserves>
=cut
=head2 reservedate
data_type: 'date'
+ datetime_undef_if_invalid: 1
is_nullable: 1
=head2 biblionumber
is_foreign_key: 1
is_nullable: 0
-=head2 constrainttype
-
- data_type: 'varchar'
- is_nullable: 1
- size: 1
-
=head2 branchcode
data_type: 'varchar'
=head2 notificationdate
data_type: 'date'
+ datetime_undef_if_invalid: 1
is_nullable: 1
=head2 reminderdate
data_type: 'date'
+ datetime_undef_if_invalid: 1
is_nullable: 1
=head2 cancellationdate
data_type: 'date'
+ datetime_undef_if_invalid: 1
is_nullable: 1
=head2 reservenotes
- data_type: 'mediumtext'
+ data_type: 'longtext'
is_nullable: 1
=head2 priority
=head2 timestamp
data_type: 'timestamp'
+ datetime_undef_if_invalid: 1
default_value: current_timestamp
is_nullable: 0
=head2 waitingdate
data_type: 'date'
+ datetime_undef_if_invalid: 1
is_nullable: 1
=head2 expirationdate
data_type: 'date'
+ datetime_undef_if_invalid: 1
is_nullable: 1
-=head2 lowestpriority
+=head2 lowestPriority
+ accessor: 'lowest_priority'
data_type: 'tinyint'
+ default_value: 0
is_nullable: 0
=head2 suspend
=head2 suspend_until
data_type: 'datetime'
+ datetime_undef_if_invalid: 1
is_nullable: 1
-=head2 maxpickupdate
+=head2 itemtype
- data_type: 'date'
+ data_type: 'varchar'
+ is_foreign_key: 1
is_nullable: 1
+ size: 10
+
+=head2 item_level_hold
+
+ data_type: 'tinyint'
+ default_value: 0
+ is_nullable: 0
=cut
is_nullable => 0,
},
"reservedate",
- { data_type => "date", is_nullable => 1 },
+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
"biblionumber",
{
data_type => "integer",
is_foreign_key => 1,
is_nullable => 0,
},
- "constrainttype",
- { data_type => "varchar", is_nullable => 1, size => 1 },
"branchcode",
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
"notificationdate",
- { data_type => "date", is_nullable => 1 },
+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
"reminderdate",
- { data_type => "date", is_nullable => 1 },
+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
"cancellationdate",
- { data_type => "date", is_nullable => 1 },
+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
"reservenotes",
- { data_type => "mediumtext", is_nullable => 1 },
+ { data_type => "longtext", is_nullable => 1 },
"priority",
{ data_type => "smallint", is_nullable => 1 },
"found",
{ data_type => "varchar", is_nullable => 1, size => 1 },
"timestamp",
{
- data_type => "timestamp",
+ data_type => "timestamp",
+ datetime_undef_if_invalid => 1,
default_value => \"current_timestamp",
- is_nullable => 0,
+ is_nullable => 0,
},
"itemnumber",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"waitingdate",
- { data_type => "date", is_nullable => 1 },
+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
"expirationdate",
- { data_type => "date", is_nullable => 1 },
- "lowestpriority",
- { data_type => "tinyint", is_nullable => 0 },
+ { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
+ "lowestPriority",
+ {
+ accessor => "lowest_priority",
+ data_type => "tinyint",
+ default_value => 0,
+ is_nullable => 0,
+ },
"suspend",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"suspend_until",
- { data_type => "datetime", is_nullable => 1 },
- "maxpickupdate",
- { data_type => "date", is_nullable => 1 },
+ {
+ data_type => "datetime",
+ datetime_undef_if_invalid => 1,
+ is_nullable => 1,
+ },
+ "itemtype",
+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
+ "item_level_hold",
+ { data_type => "tinyint", default_value => 0, is_nullable => 0 },
);
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</reserve_id>
+
+=back
+
+=cut
+
__PACKAGE__->set_primary_key("reserve_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
"borrowernumber",
"Koha::Schema::Result::Borrower",
{ borrowernumber => "borrowernumber" },
- { on_delete => "CASCADE", on_update => "CASCADE" },
+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
-=head2 biblionumber
+=head2 branchcode
Type: belongs_to
-Related object: L<Koha::Schema::Result::Biblio>
+Related object: L<Koha::Schema::Result::Branch>
=cut
__PACKAGE__->belongs_to(
- "biblionumber",
- "Koha::Schema::Result::Biblio",
- { biblionumber => "biblionumber" },
- { on_delete => "CASCADE", on_update => "CASCADE" },
+ "branchcode",
+ "Koha::Schema::Result::Branch",
+ { branchcode => "branchcode" },
+ {
+ is_deferrable => 1,
+ join_type => "LEFT",
+ on_delete => "CASCADE",
+ on_update => "CASCADE",
+ },
);
=head2 itemnumber
"itemnumber",
"Koha::Schema::Result::Item",
{ itemnumber => "itemnumber" },
- { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
+ {
+ is_deferrable => 1,
+ join_type => "LEFT",
+ on_delete => "CASCADE",
+ on_update => "CASCADE",
+ },
);
-=head2 branchcode
+=head2 itemtype
Type: belongs_to
-Related object: L<Koha::Schema::Result::Branch>
+Related object: L<Koha::Schema::Result::Itemtype>
=cut
__PACKAGE__->belongs_to(
- "branchcode",
- "Koha::Schema::Result::Branch",
- { branchcode => "branchcode" },
- { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
+ "itemtype",
+ "Koha::Schema::Result::Itemtype",
+ { itemtype => "itemtype" },
+ {
+ is_deferrable => 1,
+ join_type => "LEFT",
+ on_delete => "CASCADE",
+ on_update => "CASCADE",
+ },
);
-# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RqJFYCoDl4dMH1cwZilLKA
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-06-17 07:24:39
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OMFqEWyKqFTcYj7vAFXy/g
+__PACKAGE__->belongs_to(
+ "item",
+ "Koha::Schema::Result::Item",
+ { itemnumber => "itemnumber" },
+ {
+ is_deferrable => 1,
+ join_type => "LEFT",
+ on_delete => "CASCADE",
+ on_update => "CASCADE",
+ },
+);
+
+__PACKAGE__->belongs_to(
+ "biblio",
+ "Koha::Schema::Result::Biblio",
+ { biblionumber => "biblionumber" },
+ {
+ is_deferrable => 1,
+ join_type => "LEFT",
+ on_delete => "CASCADE",
+ on_update => "CASCADE",
+ },
+);
+
+__PACKAGE__->add_columns(
+ '+item_level_hold' => { is_boolean => 1 },
+ '+lowestPriority' => { is_boolean => 1 },
+ '+suspend' => { is_boolean => 1 }
+);
-# You can replace this text with custom content, and it will be preserved on regeneration
1;