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");
100 default_value: 'PENDING'
101 extra: {list => ["PENDING","PROCESSING","COMPLETED","CANCELED"]}
111 data_type: 'timestamp'
112 datetime_undef_if_invalid: 1
113 default_value: current_timestamp
118 data_type: 'timestamp'
119 datetime_undef_if_invalid: 1
124 __PACKAGE__->add_columns(
126 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
128 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
130 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
132 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
134 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
136 { data_type => "text", is_nullable => 1 },
138 { data_type => "text", is_nullable => 1 },
140 { data_type => "text", is_nullable => 1 },
142 { data_type => "text", is_nullable => 1 },
144 { data_type => "text", is_nullable => 1 },
146 { data_type => "text", is_nullable => 1 },
148 { data_type => "text", is_nullable => 1 },
150 { data_type => "text", is_nullable => 1 },
154 default_value => "PENDING",
155 extra => { list => ["PENDING", "PROCESSING", "COMPLETED", "CANCELED"] },
159 { data_type => "text", is_nullable => 1 },
162 data_type => "timestamp",
163 datetime_undef_if_invalid => 1,
164 default_value => \"current_timestamp",
169 data_type => "timestamp",
170 datetime_undef_if_invalid => 1,
185 __PACKAGE__->set_primary_key("id");
193 Related object: L<Koha::Schema::Result::Biblio>
197 __PACKAGE__->belongs_to(
199 "Koha::Schema::Result::Biblio",
200 { biblionumber => "biblionumber" },
201 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
204 =head2 borrowernumber
208 Related object: L<Koha::Schema::Result::Borrower>
212 __PACKAGE__->belongs_to(
214 "Koha::Schema::Result::Borrower",
215 { borrowernumber => "borrowernumber" },
216 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
223 Related object: L<Koha::Schema::Result::Branch>
227 __PACKAGE__->belongs_to(
229 "Koha::Schema::Result::Branch",
230 { branchcode => "branchcode" },
234 on_delete => "SET NULL",
235 on_update => "CASCADE",
243 Related object: L<Koha::Schema::Result::Item>
247 __PACKAGE__->belongs_to(
249 "Koha::Schema::Result::Item",
250 { itemnumber => "itemnumber" },
254 on_delete => "SET NULL",
255 on_update => "CASCADE",
260 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-25 13:08:54
261 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UcnwdgEHzMcmRY6vP9B61A
264 # You can replace this text with custom code or comments, and it will be preserved on regeneration