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
48 Potential bib linked to request
53 datetime_undef_if_invalid: 1
56 Custom date due specified by backend, leave NULL for default date_due calculation
65 The branch associated with the request
73 Current Koha status of request
82 Foreign key to relevant authorised_values.authorised_value
87 datetime_undef_if_invalid: 1
90 Date the request was placed
95 datetime_undef_if_invalid: 1
102 data_type: 'timestamp'
103 datetime_undef_if_invalid: 1
104 default_value: current_timestamp
110 datetime_undef_if_invalid: 1
113 Date the request was completed
121 The Koha request type
129 Potential URL for accessing item
137 Quotes cost of request
145 Final cost of request
149 data_type: 'mediumtext'
152 Patron notes attached to request
156 data_type: 'mediumtext'
159 Staff notes attached to request
167 Backend id attached to request
175 The backend used to create request
179 __PACKAGE__->add_columns(
182 data_type => "bigint",
183 extra => { unsigned => 1 },
184 is_auto_increment => 1,
188 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
190 { data_type => "integer", is_nullable => 1 },
193 data_type => "datetime",
194 datetime_undef_if_invalid => 1,
198 { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 50 },
200 { data_type => "varchar", is_nullable => 1, size => 50 },
202 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
204 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
206 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
209 data_type => "timestamp",
210 datetime_undef_if_invalid => 1,
211 default_value => \"current_timestamp",
215 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
217 { data_type => "varchar", is_nullable => 1, size => 30 },
219 { data_type => "varchar", is_nullable => 1, size => 500 },
221 { data_type => "varchar", is_nullable => 1, size => 20 },
223 { data_type => "varchar", is_nullable => 1, size => 20 },
225 { data_type => "mediumtext", is_nullable => 1 },
227 { data_type => "mediumtext", is_nullable => 1 },
229 { data_type => "varchar", is_nullable => 1, size => 50 },
231 { data_type => "varchar", is_nullable => 1, size => 20 },
238 =item * L</illrequest_id>
244 __PACKAGE__->set_primary_key("illrequest_id");
248 =head2 borrowernumber
252 Related object: L<Koha::Schema::Result::Borrower>
256 __PACKAGE__->belongs_to(
258 "Koha::Schema::Result::Borrower",
259 { borrowernumber => "borrowernumber" },
263 on_delete => "CASCADE",
264 on_update => "CASCADE",
272 Related object: L<Koha::Schema::Result::Branch>
276 __PACKAGE__->belongs_to(
278 "Koha::Schema::Result::Branch",
279 { branchcode => "branchcode" },
280 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
287 Related object: L<Koha::Schema::Result::Illcomment>
291 __PACKAGE__->has_many(
293 "Koha::Schema::Result::Illcomment",
294 { "foreign.illrequest_id" => "self.illrequest_id" },
295 { cascade_copy => 0, cascade_delete => 0 },
298 =head2 illrequestattributes
302 Related object: L<Koha::Schema::Result::Illrequestattribute>
306 __PACKAGE__->has_many(
307 "illrequestattributes",
308 "Koha::Schema::Result::Illrequestattribute",
309 { "foreign.illrequest_id" => "self.illrequest_id" },
310 { cascade_copy => 0, cascade_delete => 0 },
317 Related object: L<Koha::Schema::Result::AuthorisedValue>
321 __PACKAGE__->belongs_to(
323 "Koha::Schema::Result::AuthorisedValue",
324 { authorised_value => "status_alias" },
328 on_delete => "SET NULL",
329 on_update => "CASCADE",
334 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-06-23 18:44:13
335 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:on9OCRON/U0uR+m9aPIKPg
337 __PACKAGE__->has_many(
339 "Koha::Schema::Result::Illcomment",
340 { "foreign.illrequest_id" => "self.illrequest_id" },
341 { cascade_copy => 0, cascade_delete => 0 },
344 __PACKAGE__->has_many(
345 "ill_extended_attributes",
346 "Koha::Schema::Result::Illrequestattribute",
347 { "foreign.illrequest_id" => "self.illrequest_id" },
348 { cascade_copy => 0, cascade_delete => 0 },
351 __PACKAGE__->belongs_to(
353 "Koha::Schema::Result::Branch",
354 { branchcode => "branchcode" },
355 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
358 __PACKAGE__->belongs_to(
360 "Koha::Schema::Result::Borrower",
361 { borrowernumber => "borrowernumber" },
365 on_delete => "CASCADE",
366 on_update => "CASCADE",