Bug 23152: Implement koha_object[s]_class when needed
[koha-equinox.git] / Koha / Schema / Result / Reserve.pm
index 4d56006..086b621 100644 (file)
@@ -76,7 +76,7 @@ __PACKAGE__->table("reserves");
 
 =head2 reservenotes
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 priority
@@ -119,6 +119,7 @@ __PACKAGE__->table("reserves");
 
   accessor: 'lowest_priority'
   data_type: 'tinyint'
+  default_value: 0
   is_nullable: 0
 
 =head2 suspend
@@ -140,6 +141,12 @@ __PACKAGE__->table("reserves");
   is_nullable: 1
   size: 10
 
+=head2 item_level_hold
+
+  data_type: 'tinyint'
+  default_value: 0
+  is_nullable: 0
+
 =cut
 
 __PACKAGE__->add_columns(
@@ -170,7 +177,7 @@ __PACKAGE__->add_columns(
   "cancellationdate",
   { 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",
@@ -189,7 +196,12 @@ __PACKAGE__->add_columns(
   "expirationdate",
   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
   "lowestPriority",
-  { accessor => "lowest_priority", data_type => "tinyint", is_nullable => 0 },
+  {
+    accessor      => "lowest_priority",
+    data_type     => "tinyint",
+    default_value => 0,
+    is_nullable   => 0,
+  },
   "suspend",
   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
   "suspend_until",
@@ -200,6 +212,8 @@ __PACKAGE__->add_columns(
   },
   "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
@@ -307,8 +321,8 @@ __PACKAGE__->belongs_to(
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-12-26 12:22:09
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:v9+wPKUT381CLNlusQ4LMA
+# 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",
@@ -334,4 +348,17 @@ __PACKAGE__->belongs_to(
   },
 );
 
+__PACKAGE__->add_columns(
+    '+item_level_hold' => { is_boolean => 1 },
+    '+lowestPriority'  => { is_boolean => 1 },
+    '+suspend'         => { is_boolean => 1 }
+);
+
+sub koha_object_class {
+    'Koha::Hold';
+}
+sub koha_objects_class {
+    'Koha::Holds';
+}
+
 1;