2 package Koha::Schema::Result::Recall;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Recall - Information related to recalls in Koha
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<recalls>
22 __PACKAGE__->table("recalls");
32 Unique identifier for this recall
41 Identifier for patron who requested recall
46 datetime_undef_if_invalid: 1
49 Date the recall was requested
58 Identifier for bibliographic record that has been recalled
60 =head2 pickup_library_id
67 Identifier for recall pickup library
72 datetime_undef_if_invalid: 1
75 Date the recall is completed (fulfilled, cancelled or expired)
79 data_type: 'mediumtext'
82 Notes related to the recall
89 Where in the queue the patron sits
94 default_value: 'requested'
95 extra: {list => ["requested","overdue","waiting","in_transit","cancelled","expired","fulfilled"]}
102 data_type: 'timestamp'
103 datetime_undef_if_invalid: 1
104 default_value: current_timestamp
107 Date and time the recall was last updated
115 Identifier for item record that was recalled, if an item-level recall
119 data_type: 'datetime'
120 datetime_undef_if_invalid: 1
123 Date an item was marked as waiting for the patron at the library
125 =head2 expiration_date
127 data_type: 'datetime'
128 datetime_undef_if_invalid: 1
131 Date recall is no longer required, or date recall will expire after waiting on shelf for pickup
139 Flag if recall is old and no longer active, i.e. expired, cancelled or completed
147 Flag if recall is for a specific item
151 __PACKAGE__->add_columns(
153 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
156 data_type => "integer",
163 data_type => "datetime",
164 datetime_undef_if_invalid => 1,
169 data_type => "integer",
175 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
178 data_type => "datetime",
179 datetime_undef_if_invalid => 1,
183 { data_type => "mediumtext", is_nullable => 1 },
185 { data_type => "smallint", is_nullable => 1 },
189 default_value => "requested",
205 data_type => "timestamp",
206 datetime_undef_if_invalid => 1,
207 default_value => \"current_timestamp",
211 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
214 data_type => "datetime",
215 datetime_undef_if_invalid => 1,
220 data_type => "datetime",
221 datetime_undef_if_invalid => 1,
225 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
227 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
234 =item * L</recall_id>
240 __PACKAGE__->set_primary_key("recall_id");
248 Related object: L<Koha::Schema::Result::Biblio>
252 __PACKAGE__->belongs_to(
254 "Koha::Schema::Result::Biblio",
255 { biblionumber => "biblio_id" },
256 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
263 Related object: L<Koha::Schema::Result::Item>
267 __PACKAGE__->belongs_to(
269 "Koha::Schema::Result::Item",
270 { itemnumber => "item_id" },
274 on_delete => "CASCADE",
275 on_update => "CASCADE",
283 Related object: L<Koha::Schema::Result::Borrower>
287 __PACKAGE__->belongs_to(
289 "Koha::Schema::Result::Borrower",
290 { borrowernumber => "patron_id" },
291 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
294 =head2 pickup_library
298 Related object: L<Koha::Schema::Result::Branch>
302 __PACKAGE__->belongs_to(
304 "Koha::Schema::Result::Branch",
305 { branchcode => "pickup_library_id" },
309 on_delete => "CASCADE",
310 on_update => "CASCADE",
315 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-04-29 11:14:14
316 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lUgwwMxaStiOS7pHL0UGJA
318 __PACKAGE__->add_columns(
319 '+completed' => { is_boolean => 1 },
320 '+item_level' => { is_boolean => 1 },
323 __PACKAGE__->belongs_to(
325 "Koha::Schema::Result::Branch",
326 { branchcode => "pickup_library_id" },
330 on_delete => "CASCADE",
331 on_update => "CASCADE",