Line 0
Link Here
|
|
|
1 |
use utf8; |
2 |
package Koha::Schema::Result::ArticleRequest; |
3 |
|
4 |
# Created by DBIx::Class::Schema::Loader |
5 |
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
6 |
|
7 |
=head1 NAME |
8 |
|
9 |
Koha::Schema::Result::ArticleRequest |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<article_requests> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("article_requests"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 id |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
=head2 borrowernumber |
33 |
|
34 |
data_type: 'integer' |
35 |
is_foreign_key: 1 |
36 |
is_nullable: 0 |
37 |
|
38 |
=head2 biblionumber |
39 |
|
40 |
data_type: 'integer' |
41 |
is_foreign_key: 1 |
42 |
is_nullable: 0 |
43 |
|
44 |
=head2 itemnumber |
45 |
|
46 |
data_type: 'integer' |
47 |
is_foreign_key: 1 |
48 |
is_nullable: 1 |
49 |
|
50 |
=head2 branchcode |
51 |
|
52 |
data_type: 'varchar' |
53 |
is_foreign_key: 1 |
54 |
is_nullable: 1 |
55 |
size: 10 |
56 |
|
57 |
=head2 title |
58 |
|
59 |
data_type: 'text' |
60 |
is_nullable: 1 |
61 |
|
62 |
=head2 author |
63 |
|
64 |
data_type: 'text' |
65 |
is_nullable: 1 |
66 |
|
67 |
=head2 volume |
68 |
|
69 |
data_type: 'text' |
70 |
is_nullable: 1 |
71 |
|
72 |
=head2 issue |
73 |
|
74 |
data_type: 'text' |
75 |
is_nullable: 1 |
76 |
|
77 |
=head2 date |
78 |
|
79 |
data_type: 'text' |
80 |
is_nullable: 1 |
81 |
|
82 |
=head2 pages |
83 |
|
84 |
data_type: 'text' |
85 |
is_nullable: 1 |
86 |
|
87 |
=head2 chapters |
88 |
|
89 |
data_type: 'text' |
90 |
is_nullable: 1 |
91 |
|
92 |
=head2 status |
93 |
|
94 |
data_type: 'enum' |
95 |
default_value: 'PENDING' |
96 |
extra: {list => ["PENDING","PROCESSING","COMPLETED","CANCELED"]} |
97 |
is_nullable: 0 |
98 |
|
99 |
=head2 notes |
100 |
|
101 |
data_type: 'text' |
102 |
is_nullable: 1 |
103 |
|
104 |
=head2 created_on |
105 |
|
106 |
data_type: 'timestamp' |
107 |
datetime_undef_if_invalid: 1 |
108 |
default_value: current_timestamp |
109 |
is_nullable: 0 |
110 |
|
111 |
=head2 updated_on |
112 |
|
113 |
data_type: 'timestamp' |
114 |
datetime_undef_if_invalid: 1 |
115 |
is_nullable: 1 |
116 |
|
117 |
=cut |
118 |
|
119 |
__PACKAGE__->add_columns( |
120 |
"id", |
121 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
122 |
"borrowernumber", |
123 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
124 |
"biblionumber", |
125 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
126 |
"itemnumber", |
127 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
128 |
"branchcode", |
129 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, |
130 |
"title", |
131 |
{ data_type => "text", is_nullable => 1 }, |
132 |
"author", |
133 |
{ data_type => "text", is_nullable => 1 }, |
134 |
"volume", |
135 |
{ data_type => "text", is_nullable => 1 }, |
136 |
"issue", |
137 |
{ data_type => "text", is_nullable => 1 }, |
138 |
"date", |
139 |
{ data_type => "text", is_nullable => 1 }, |
140 |
"pages", |
141 |
{ data_type => "text", is_nullable => 1 }, |
142 |
"chapters", |
143 |
{ data_type => "text", is_nullable => 1 }, |
144 |
"status", |
145 |
{ |
146 |
data_type => "enum", |
147 |
default_value => "PENDING", |
148 |
extra => { list => ["PENDING", "PROCESSING", "COMPLETED", "CANCELED"] }, |
149 |
is_nullable => 0, |
150 |
}, |
151 |
"notes", |
152 |
{ data_type => "text", is_nullable => 1 }, |
153 |
"created_on", |
154 |
{ |
155 |
data_type => "timestamp", |
156 |
datetime_undef_if_invalid => 1, |
157 |
default_value => \"current_timestamp", |
158 |
is_nullable => 0, |
159 |
}, |
160 |
"updated_on", |
161 |
{ |
162 |
data_type => "timestamp", |
163 |
datetime_undef_if_invalid => 1, |
164 |
is_nullable => 1, |
165 |
}, |
166 |
); |
167 |
|
168 |
=head1 PRIMARY KEY |
169 |
|
170 |
=over 4 |
171 |
|
172 |
=item * L</id> |
173 |
|
174 |
=back |
175 |
|
176 |
=cut |
177 |
|
178 |
__PACKAGE__->set_primary_key("id"); |
179 |
|
180 |
=head1 RELATIONS |
181 |
|
182 |
=head2 biblionumber |
183 |
|
184 |
Type: belongs_to |
185 |
|
186 |
Related object: L<Koha::Schema::Result::Biblio> |
187 |
|
188 |
=cut |
189 |
|
190 |
__PACKAGE__->belongs_to( |
191 |
"biblionumber", |
192 |
"Koha::Schema::Result::Biblio", |
193 |
{ biblionumber => "biblionumber" }, |
194 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
195 |
); |
196 |
|
197 |
=head2 borrowernumber |
198 |
|
199 |
Type: belongs_to |
200 |
|
201 |
Related object: L<Koha::Schema::Result::Borrower> |
202 |
|
203 |
=cut |
204 |
|
205 |
__PACKAGE__->belongs_to( |
206 |
"borrowernumber", |
207 |
"Koha::Schema::Result::Borrower", |
208 |
{ borrowernumber => "borrowernumber" }, |
209 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
210 |
); |
211 |
|
212 |
=head2 branchcode |
213 |
|
214 |
Type: belongs_to |
215 |
|
216 |
Related object: L<Koha::Schema::Result::Branch> |
217 |
|
218 |
=cut |
219 |
|
220 |
__PACKAGE__->belongs_to( |
221 |
"branchcode", |
222 |
"Koha::Schema::Result::Branch", |
223 |
{ branchcode => "branchcode" }, |
224 |
{ |
225 |
is_deferrable => 1, |
226 |
join_type => "LEFT", |
227 |
on_delete => "SET NULL", |
228 |
on_update => "CASCADE", |
229 |
}, |
230 |
); |
231 |
|
232 |
=head2 itemnumber |
233 |
|
234 |
Type: belongs_to |
235 |
|
236 |
Related object: L<Koha::Schema::Result::Item> |
237 |
|
238 |
=cut |
239 |
|
240 |
__PACKAGE__->belongs_to( |
241 |
"itemnumber", |
242 |
"Koha::Schema::Result::Item", |
243 |
{ itemnumber => "itemnumber" }, |
244 |
{ |
245 |
is_deferrable => 1, |
246 |
join_type => "LEFT", |
247 |
on_delete => "SET NULL", |
248 |
on_update => "CASCADE", |
249 |
}, |
250 |
); |
251 |
|
252 |
|
253 |
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-12 11:47:10 |
254 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N8Ziim4bGMg5jUDmN8HpxQ |
255 |
|
256 |
|
257 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
258 |
1; |