2 package Koha::Schema::Result::Illrequest;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Illrequest
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<illrequests>
22 __PACKAGE__->table("illrequests");
29 extra: {unsigned => 1}
41 Patron associated with request
49 Potential bib linked to request
51 =head2 deleted_biblio_id
56 Deleted bib linked to request
61 datetime_undef_if_invalid: 1
64 Custom date due specified by backend, leave NULL for default date_due calculation
73 The branch associated with the request
81 Current Koha status of request
90 Foreign key to relevant authorised_values.authorised_value
95 datetime_undef_if_invalid: 1
98 Date the request was placed
103 datetime_undef_if_invalid: 1
110 data_type: 'timestamp'
111 datetime_undef_if_invalid: 1
112 default_value: current_timestamp
118 datetime_undef_if_invalid: 1
121 Date the request was completed
129 The Koha request type
137 Potential URL for accessing item
145 Quotes cost of request
153 Final cost of request
157 data_type: 'mediumtext'
160 Patron notes attached to request
164 data_type: 'mediumtext'
167 Staff notes attached to request
175 Backend id attached to request
183 The backend used to create request
191 Optional ID of batch that this request belongs to
195 __PACKAGE__->add_columns(
198 data_type => "bigint",
199 extra => { unsigned => 1 },
200 is_auto_increment => 1,
204 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
206 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
208 { data_type => "integer", is_nullable => 1 },
211 data_type => "datetime",
212 datetime_undef_if_invalid => 1,
216 { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 50 },
218 { data_type => "varchar", is_nullable => 1, size => 50 },
220 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
222 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
224 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
227 data_type => "timestamp",
228 datetime_undef_if_invalid => 1,
229 default_value => \"current_timestamp",
233 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
235 { data_type => "varchar", is_nullable => 1, size => 30 },
237 { data_type => "varchar", is_nullable => 1, size => 500 },
239 { data_type => "varchar", is_nullable => 1, size => 20 },
241 { data_type => "varchar", is_nullable => 1, size => 20 },
243 { data_type => "mediumtext", is_nullable => 1 },
245 { data_type => "mediumtext", is_nullable => 1 },
247 { data_type => "varchar", is_nullable => 1, size => 50 },
249 { data_type => "varchar", is_nullable => 1, size => 20 },
251 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
258 =item * L</illrequest_id>
264 __PACKAGE__->set_primary_key("illrequest_id");
272 Related object: L<Koha::Schema::Result::Illbatch>
276 __PACKAGE__->belongs_to(
278 "Koha::Schema::Result::Illbatch",
279 { ill_batch_id => "batch_id" },
283 on_delete => "SET NULL",
284 on_update => "CASCADE",
292 Related object: L<Koha::Schema::Result::Biblio>
296 __PACKAGE__->belongs_to(
298 "Koha::Schema::Result::Biblio",
299 { biblionumber => "biblio_id" },
303 on_delete => "SET NULL",
304 on_update => "CASCADE",
308 =head2 borrowernumber
312 Related object: L<Koha::Schema::Result::Borrower>
316 __PACKAGE__->belongs_to(
318 "Koha::Schema::Result::Borrower",
319 { borrowernumber => "borrowernumber" },
323 on_delete => "CASCADE",
324 on_update => "CASCADE",
332 Related object: L<Koha::Schema::Result::Branch>
336 __PACKAGE__->belongs_to(
338 "Koha::Schema::Result::Branch",
339 { branchcode => "branchcode" },
340 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
347 Related object: L<Koha::Schema::Result::Illcomment>
351 __PACKAGE__->has_many(
353 "Koha::Schema::Result::Illcomment",
354 { "foreign.illrequest_id" => "self.illrequest_id" },
355 { cascade_copy => 0, cascade_delete => 0 },
358 =head2 illrequestattributes
362 Related object: L<Koha::Schema::Result::Illrequestattribute>
366 __PACKAGE__->has_many(
367 "illrequestattributes",
368 "Koha::Schema::Result::Illrequestattribute",
369 { "foreign.illrequest_id" => "self.illrequest_id" },
370 { cascade_copy => 0, cascade_delete => 0 },
377 Related object: L<Koha::Schema::Result::AuthorisedValue>
381 __PACKAGE__->belongs_to(
383 "Koha::Schema::Result::AuthorisedValue",
384 { authorised_value => "status_alias" },
388 on_delete => "SET NULL",
389 on_update => "CASCADE",
394 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-10-10 14:49:40
395 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DQl+7uwLCz5GeqU2hBFmMA
397 __PACKAGE__->has_many(
399 "Koha::Schema::Result::Illcomment",
400 { "foreign.illrequest_id" => "self.illrequest_id" },
401 { cascade_copy => 0, cascade_delete => 0 },
404 __PACKAGE__->has_many(
405 "extended_attributes",
406 "Koha::Schema::Result::Illrequestattribute",
407 { "foreign.illrequest_id" => "self.illrequest_id" },
408 { cascade_copy => 0, cascade_delete => 0 },
411 __PACKAGE__->belongs_to(
413 "Koha::Schema::Result::Illbatch",
414 { ill_batch_id => "batch_id" },
418 on_delete => "SET NULL",
419 on_update => "CASCADE",
423 __PACKAGE__->belongs_to(
425 "Koha::Schema::Result::Branch",
426 { branchcode => "branchcode" },
427 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
430 __PACKAGE__->belongs_to(
432 "Koha::Schema::Result::Borrower",
433 { borrowernumber => "borrowernumber" },
437 on_delete => "CASCADE",
438 on_update => "CASCADE",