Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / ArticleRequest.pm
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: 'mediumtext'
60   is_nullable: 1
61
62 =head2 author
63
64   data_type: 'mediumtext'
65   is_nullable: 1
66
67 =head2 volume
68
69   data_type: 'mediumtext'
70   is_nullable: 1
71
72 =head2 issue
73
74   data_type: 'mediumtext'
75   is_nullable: 1
76
77 =head2 date
78
79   data_type: 'mediumtext'
80   is_nullable: 1
81
82 =head2 pages
83
84   data_type: 'mediumtext'
85   is_nullable: 1
86
87 =head2 chapters
88
89   data_type: 'mediumtext'
90   is_nullable: 1
91
92 =head2 patron_notes
93
94   data_type: 'mediumtext'
95   is_nullable: 1
96
97 =head2 status
98
99   data_type: 'enum'
100   default_value: 'REQUESTED'
101   extra: {list => ["REQUESTED","PENDING","PROCESSING","COMPLETED","CANCELED"]}
102   is_nullable: 0
103
104 =head2 notes
105
106   data_type: 'mediumtext'
107   is_nullable: 1
108
109 =head2 format
110
111   data_type: 'enum'
112   default_value: 'PHOTOCOPY'
113   extra: {list => ["PHOTOCOPY","SCAN"]}
114   is_nullable: 0
115
116 =head2 urls
117
118   data_type: 'mediumtext'
119   is_nullable: 1
120
121 =head2 cancellation_reason
122
123   data_type: 'varchar'
124   is_nullable: 1
125   size: 80
126
127 optional authorised value AR_CANCELLATION
128
129 =head2 debit_id
130
131   data_type: 'integer'
132   is_foreign_key: 1
133   is_nullable: 1
134
135 Debit line with cost for article scan request
136
137 =head2 created_on
138
139   data_type: 'timestamp'
140   datetime_undef_if_invalid: 1
141   is_nullable: 1
142
143 Be careful with two timestamps in one table not allowing NULL
144
145 =head2 updated_on
146
147   data_type: 'timestamp'
148   datetime_undef_if_invalid: 1
149   default_value: current_timestamp
150   is_nullable: 0
151
152 =head2 toc_request
153
154   data_type: 'tinyint'
155   default_value: 0
156   is_nullable: 0
157
158 borrower requested table of contents
159
160 =cut
161
162 __PACKAGE__->add_columns(
163   "id",
164   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
165   "borrowernumber",
166   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
167   "biblionumber",
168   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
169   "itemnumber",
170   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
171   "branchcode",
172   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
173   "title",
174   { data_type => "mediumtext", is_nullable => 1 },
175   "author",
176   { data_type => "mediumtext", is_nullable => 1 },
177   "volume",
178   { data_type => "mediumtext", is_nullable => 1 },
179   "issue",
180   { data_type => "mediumtext", is_nullable => 1 },
181   "date",
182   { data_type => "mediumtext", is_nullable => 1 },
183   "pages",
184   { data_type => "mediumtext", is_nullable => 1 },
185   "chapters",
186   { data_type => "mediumtext", is_nullable => 1 },
187   "patron_notes",
188   { data_type => "mediumtext", is_nullable => 1 },
189   "status",
190   {
191     data_type => "enum",
192     default_value => "REQUESTED",
193     extra => {
194       list => ["REQUESTED", "PENDING", "PROCESSING", "COMPLETED", "CANCELED"],
195     },
196     is_nullable => 0,
197   },
198   "notes",
199   { data_type => "mediumtext", is_nullable => 1 },
200   "format",
201   {
202     data_type => "enum",
203     default_value => "PHOTOCOPY",
204     extra => { list => ["PHOTOCOPY", "SCAN"] },
205     is_nullable => 0,
206   },
207   "urls",
208   { data_type => "mediumtext", is_nullable => 1 },
209   "cancellation_reason",
210   { data_type => "varchar", is_nullable => 1, size => 80 },
211   "debit_id",
212   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
213   "created_on",
214   {
215     data_type => "timestamp",
216     datetime_undef_if_invalid => 1,
217     is_nullable => 1,
218   },
219   "updated_on",
220   {
221     data_type => "timestamp",
222     datetime_undef_if_invalid => 1,
223     default_value => \"current_timestamp",
224     is_nullable => 0,
225   },
226   "toc_request",
227   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
228 );
229
230 =head1 PRIMARY KEY
231
232 =over 4
233
234 =item * L</id>
235
236 =back
237
238 =cut
239
240 __PACKAGE__->set_primary_key("id");
241
242 =head1 RELATIONS
243
244 =head2 biblionumber
245
246 Type: belongs_to
247
248 Related object: L<Koha::Schema::Result::Biblio>
249
250 =cut
251
252 __PACKAGE__->belongs_to(
253   "biblionumber",
254   "Koha::Schema::Result::Biblio",
255   { biblionumber => "biblionumber" },
256   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
257 );
258
259 =head2 borrowernumber
260
261 Type: belongs_to
262
263 Related object: L<Koha::Schema::Result::Borrower>
264
265 =cut
266
267 __PACKAGE__->belongs_to(
268   "borrowernumber",
269   "Koha::Schema::Result::Borrower",
270   { borrowernumber => "borrowernumber" },
271   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
272 );
273
274 =head2 branchcode
275
276 Type: belongs_to
277
278 Related object: L<Koha::Schema::Result::Branch>
279
280 =cut
281
282 __PACKAGE__->belongs_to(
283   "branchcode",
284   "Koha::Schema::Result::Branch",
285   { branchcode => "branchcode" },
286   {
287     is_deferrable => 1,
288     join_type     => "LEFT",
289     on_delete     => "SET NULL",
290     on_update     => "CASCADE",
291   },
292 );
293
294 =head2 debit
295
296 Type: belongs_to
297
298 Related object: L<Koha::Schema::Result::Accountline>
299
300 =cut
301
302 __PACKAGE__->belongs_to(
303   "debit",
304   "Koha::Schema::Result::Accountline",
305   { accountlines_id => "debit_id" },
306   {
307     is_deferrable => 1,
308     join_type     => "LEFT",
309     on_delete     => "SET NULL",
310     on_update     => "CASCADE",
311   },
312 );
313
314 =head2 itemnumber
315
316 Type: belongs_to
317
318 Related object: L<Koha::Schema::Result::Item>
319
320 =cut
321
322 __PACKAGE__->belongs_to(
323   "itemnumber",
324   "Koha::Schema::Result::Item",
325   { itemnumber => "itemnumber" },
326   {
327     is_deferrable => 1,
328     join_type     => "LEFT",
329     on_delete     => "SET NULL",
330     on_update     => "CASCADE",
331   },
332 );
333
334
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
337
338
339 # You can replace this text with custom code or comments, and it will be preserved on regeneration
340 1;