2 package Koha::Schema::Result::ArticleRequest;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::ArticleRequest
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<article_requests>
22 __PACKAGE__->table("article_requests");
59 data_type: 'mediumtext'
64 data_type: 'mediumtext'
69 data_type: 'mediumtext'
74 data_type: 'mediumtext'
79 data_type: 'mediumtext'
84 data_type: 'mediumtext'
89 data_type: 'mediumtext'
94 data_type: 'mediumtext'
100 default_value: 'REQUESTED'
101 extra: {list => ["REQUESTED","PENDING","PROCESSING","COMPLETED","CANCELED"]}
106 data_type: 'mediumtext'
112 default_value: 'PHOTOCOPY'
113 extra: {list => ["PHOTOCOPY","SCAN"]}
118 data_type: 'mediumtext'
121 =head2 cancellation_reason
127 optional authorised value AR_CANCELLATION
135 Debit line with cost for article scan request
139 data_type: 'timestamp'
140 datetime_undef_if_invalid: 1
143 Be careful with two timestamps in one table not allowing NULL
147 data_type: 'timestamp'
148 datetime_undef_if_invalid: 1
149 default_value: current_timestamp
158 borrower requested table of contents
162 __PACKAGE__->add_columns(
164 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
166 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
168 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
170 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
172 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
174 { data_type => "mediumtext", is_nullable => 1 },
176 { data_type => "mediumtext", is_nullable => 1 },
178 { data_type => "mediumtext", is_nullable => 1 },
180 { data_type => "mediumtext", is_nullable => 1 },
182 { data_type => "mediumtext", is_nullable => 1 },
184 { data_type => "mediumtext", is_nullable => 1 },
186 { data_type => "mediumtext", is_nullable => 1 },
188 { data_type => "mediumtext", is_nullable => 1 },
192 default_value => "REQUESTED",
194 list => ["REQUESTED", "PENDING", "PROCESSING", "COMPLETED", "CANCELED"],
199 { data_type => "mediumtext", is_nullable => 1 },
203 default_value => "PHOTOCOPY",
204 extra => { list => ["PHOTOCOPY", "SCAN"] },
208 { data_type => "mediumtext", is_nullable => 1 },
209 "cancellation_reason",
210 { data_type => "varchar", is_nullable => 1, size => 80 },
212 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
215 data_type => "timestamp",
216 datetime_undef_if_invalid => 1,
221 data_type => "timestamp",
222 datetime_undef_if_invalid => 1,
223 default_value => \"current_timestamp",
227 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
240 __PACKAGE__->set_primary_key("id");
248 Related object: L<Koha::Schema::Result::Biblio>
252 __PACKAGE__->belongs_to(
254 "Koha::Schema::Result::Biblio",
255 { biblionumber => "biblionumber" },
256 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
259 =head2 borrowernumber
263 Related object: L<Koha::Schema::Result::Borrower>
267 __PACKAGE__->belongs_to(
269 "Koha::Schema::Result::Borrower",
270 { borrowernumber => "borrowernumber" },
271 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
278 Related object: L<Koha::Schema::Result::Branch>
282 __PACKAGE__->belongs_to(
284 "Koha::Schema::Result::Branch",
285 { branchcode => "branchcode" },
289 on_delete => "SET NULL",
290 on_update => "CASCADE",
298 Related object: L<Koha::Schema::Result::Accountline>
302 __PACKAGE__->belongs_to(
304 "Koha::Schema::Result::Accountline",
305 { accountlines_id => "debit_id" },
309 on_delete => "SET NULL",
310 on_update => "CASCADE",
318 Related object: L<Koha::Schema::Result::Item>
322 __PACKAGE__->belongs_to(
324 "Koha::Schema::Result::Item",
325 { itemnumber => "itemnumber" },
329 on_delete => "SET NULL",
330 on_update => "CASCADE",
335 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-01-28 20:21:02
336 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/mPsUO8VPK6DVIX7Rynk0A
339 # You can replace this text with custom code or comments, and it will be preserved on regeneration