Bug 7162: Update DBIx
[koha_ffzg] / Koha / Schema / Result / Aqorder.pm
1 use utf8;
2 package Koha::Schema::Result::Aqorder;
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::Aqorder
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<aqorders>
19
20 =cut
21
22 __PACKAGE__->table("aqorders");
23
24 =head1 ACCESSORS
25
26 =head2 ordernumber
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 biblionumber
33
34   data_type: 'integer'
35   is_foreign_key: 1
36   is_nullable: 1
37
38 =head2 entrydate
39
40   data_type: 'date'
41   datetime_undef_if_invalid: 1
42   is_nullable: 1
43
44 =head2 quantity
45
46   data_type: 'smallint'
47   is_nullable: 1
48
49 =head2 currency
50
51   data_type: 'varchar'
52   is_nullable: 1
53   size: 3
54
55 =head2 listprice
56
57   data_type: 'decimal'
58   is_nullable: 1
59   size: [28,6]
60
61 =head2 totalamount
62
63   data_type: 'decimal'
64   is_nullable: 1
65   size: [28,6]
66
67 =head2 datereceived
68
69   data_type: 'date'
70   datetime_undef_if_invalid: 1
71   is_nullable: 1
72
73 =head2 invoiceid
74
75   data_type: 'integer'
76   is_foreign_key: 1
77   is_nullable: 1
78
79 =head2 freight
80
81   data_type: 'decimal'
82   is_nullable: 1
83   size: [28,6]
84
85 =head2 unitprice
86
87   data_type: 'decimal'
88   is_nullable: 1
89   size: [28,6]
90
91 =head2 quantityreceived
92
93   data_type: 'smallint'
94   default_value: 0
95   is_nullable: 0
96
97 =head2 datecancellationprinted
98
99   data_type: 'date'
100   datetime_undef_if_invalid: 1
101   is_nullable: 1
102
103 =head2 cancellationreason
104
105   data_type: 'text'
106   is_nullable: 1
107
108 =head2 order_internalnote
109
110   data_type: 'mediumtext'
111   is_nullable: 1
112
113 =head2 order_vendornote
114
115   data_type: 'mediumtext'
116   is_nullable: 1
117
118 =head2 supplierreference
119
120   data_type: 'mediumtext'
121   is_nullable: 1
122
123 =head2 purchaseordernumber
124
125   data_type: 'mediumtext'
126   is_nullable: 1
127
128 =head2 basketno
129
130   data_type: 'integer'
131   is_foreign_key: 1
132   is_nullable: 1
133
134 =head2 timestamp
135
136   data_type: 'timestamp'
137   datetime_undef_if_invalid: 1
138   default_value: current_timestamp
139   is_nullable: 0
140
141 =head2 rrp
142
143   data_type: 'decimal'
144   is_nullable: 1
145   size: [13,2]
146
147 =head2 ecost
148
149   data_type: 'decimal'
150   is_nullable: 1
151   size: [13,2]
152
153 =head2 gstrate
154
155   data_type: 'decimal'
156   is_nullable: 1
157   size: [6,4]
158
159 =head2 discount
160
161   data_type: 'float'
162   is_nullable: 1
163   size: [6,4]
164
165 =head2 budget_id
166
167   data_type: 'integer'
168   is_nullable: 0
169
170 =head2 budgetgroup_id
171
172   data_type: 'integer'
173   is_nullable: 0
174
175 =head2 budgetdate
176
177   data_type: 'date'
178   datetime_undef_if_invalid: 1
179   is_nullable: 1
180
181 =head2 sort1
182
183   data_type: 'varchar'
184   is_nullable: 1
185   size: 80
186
187 =head2 sort2
188
189   data_type: 'varchar'
190   is_nullable: 1
191   size: 80
192
193 =head2 sort1_authcat
194
195   data_type: 'varchar'
196   is_nullable: 1
197   size: 10
198
199 =head2 sort2_authcat
200
201   data_type: 'varchar'
202   is_nullable: 1
203   size: 10
204
205 =head2 uncertainprice
206
207   data_type: 'tinyint'
208   is_nullable: 1
209
210 =head2 claims_count
211
212   data_type: 'integer'
213   default_value: 0
214   is_nullable: 1
215
216 =head2 claimed_date
217
218   data_type: 'date'
219   datetime_undef_if_invalid: 1
220   is_nullable: 1
221
222 =head2 subscriptionid
223
224   data_type: 'integer'
225   is_foreign_key: 1
226   is_nullable: 1
227
228 =head2 parent_ordernumber
229
230   data_type: 'integer'
231   is_nullable: 1
232
233 =head2 orderstatus
234
235   data_type: 'varchar'
236   default_value: 'new'
237   is_nullable: 1
238   size: 16
239
240 =cut
241
242 __PACKAGE__->add_columns(
243   "ordernumber",
244   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
245   "biblionumber",
246   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
247   "entrydate",
248   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
249   "quantity",
250   { data_type => "smallint", is_nullable => 1 },
251   "currency",
252   { data_type => "varchar", is_nullable => 1, size => 3 },
253   "listprice",
254   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
255   "totalamount",
256   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
257   "datereceived",
258   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
259   "invoiceid",
260   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
261   "freight",
262   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
263   "unitprice",
264   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
265   "quantityreceived",
266   { data_type => "smallint", default_value => 0, is_nullable => 0 },
267   "datecancellationprinted",
268   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
269   "cancellationreason",
270   { data_type => "text", is_nullable => 1 },
271   "order_internalnote",
272   { data_type => "mediumtext", is_nullable => 1 },
273   "order_vendornote",
274   { data_type => "mediumtext", is_nullable => 1 },
275   "supplierreference",
276   { data_type => "mediumtext", is_nullable => 1 },
277   "purchaseordernumber",
278   { data_type => "mediumtext", is_nullable => 1 },
279   "basketno",
280   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
281   "timestamp",
282   {
283     data_type => "timestamp",
284     datetime_undef_if_invalid => 1,
285     default_value => \"current_timestamp",
286     is_nullable => 0,
287   },
288   "rrp",
289   { data_type => "decimal", is_nullable => 1, size => [13, 2] },
290   "ecost",
291   { data_type => "decimal", is_nullable => 1, size => [13, 2] },
292   "gstrate",
293   { data_type => "decimal", is_nullable => 1, size => [6, 4] },
294   "discount",
295   { data_type => "float", is_nullable => 1, size => [6, 4] },
296   "budget_id",
297   { data_type => "integer", is_nullable => 0 },
298   "budgetgroup_id",
299   { data_type => "integer", is_nullable => 0 },
300   "budgetdate",
301   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
302   "sort1",
303   { data_type => "varchar", is_nullable => 1, size => 80 },
304   "sort2",
305   { data_type => "varchar", is_nullable => 1, size => 80 },
306   "sort1_authcat",
307   { data_type => "varchar", is_nullable => 1, size => 10 },
308   "sort2_authcat",
309   { data_type => "varchar", is_nullable => 1, size => 10 },
310   "uncertainprice",
311   { data_type => "tinyint", is_nullable => 1 },
312   "claims_count",
313   { data_type => "integer", default_value => 0, is_nullable => 1 },
314   "claimed_date",
315   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
316   "subscriptionid",
317   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
318   "parent_ordernumber",
319   { data_type => "integer", is_nullable => 1 },
320   "orderstatus",
321   {
322     data_type => "varchar",
323     default_value => "new",
324     is_nullable => 1,
325     size => 16,
326   },
327 );
328
329 =head1 PRIMARY KEY
330
331 =over 4
332
333 =item * L</ordernumber>
334
335 =back
336
337 =cut
338
339 __PACKAGE__->set_primary_key("ordernumber");
340
341 =head1 RELATIONS
342
343 =head2 aqorders_items
344
345 Type: has_many
346
347 Related object: L<Koha::Schema::Result::AqordersItem>
348
349 =cut
350
351 __PACKAGE__->has_many(
352   "aqorders_items",
353   "Koha::Schema::Result::AqordersItem",
354   { "foreign.ordernumber" => "self.ordernumber" },
355   { cascade_copy => 0, cascade_delete => 0 },
356 );
357
358 =head2 aqorders_transfers_ordernumber_from
359
360 Type: might_have
361
362 Related object: L<Koha::Schema::Result::AqordersTransfer>
363
364 =cut
365
366 __PACKAGE__->might_have(
367   "aqorders_transfers_ordernumber_from",
368   "Koha::Schema::Result::AqordersTransfer",
369   { "foreign.ordernumber_from" => "self.ordernumber" },
370   { cascade_copy => 0, cascade_delete => 0 },
371 );
372
373 =head2 aqorders_transfers_ordernumber_to
374
375 Type: might_have
376
377 Related object: L<Koha::Schema::Result::AqordersTransfer>
378
379 =cut
380
381 __PACKAGE__->might_have(
382   "aqorders_transfers_ordernumber_to",
383   "Koha::Schema::Result::AqordersTransfer",
384   { "foreign.ordernumber_to" => "self.ordernumber" },
385   { cascade_copy => 0, cascade_delete => 0 },
386 );
387
388 =head2 basketno
389
390 Type: belongs_to
391
392 Related object: L<Koha::Schema::Result::Aqbasket>
393
394 =cut
395
396 __PACKAGE__->belongs_to(
397   "basketno",
398   "Koha::Schema::Result::Aqbasket",
399   { basketno => "basketno" },
400   {
401     is_deferrable => 1,
402     join_type     => "LEFT",
403     on_delete     => "CASCADE",
404     on_update     => "CASCADE",
405   },
406 );
407
408 =head2 biblionumber
409
410 Type: belongs_to
411
412 Related object: L<Koha::Schema::Result::Biblio>
413
414 =cut
415
416 __PACKAGE__->belongs_to(
417   "biblionumber",
418   "Koha::Schema::Result::Biblio",
419   { biblionumber => "biblionumber" },
420   {
421     is_deferrable => 1,
422     join_type     => "LEFT",
423     on_delete     => "SET NULL",
424     on_update     => "CASCADE",
425   },
426 );
427
428 =head2 invoiceid
429
430 Type: belongs_to
431
432 Related object: L<Koha::Schema::Result::Aqinvoice>
433
434 =cut
435
436 __PACKAGE__->belongs_to(
437   "invoiceid",
438   "Koha::Schema::Result::Aqinvoice",
439   { invoiceid => "invoiceid" },
440   {
441     is_deferrable => 1,
442     join_type     => "LEFT",
443     on_delete     => "SET NULL",
444     on_update     => "CASCADE",
445   },
446 );
447
448 =head2 subscriptionid
449
450 Type: belongs_to
451
452 Related object: L<Koha::Schema::Result::Subscription>
453
454 =cut
455
456 __PACKAGE__->belongs_to(
457   "subscriptionid",
458   "Koha::Schema::Result::Subscription",
459   { subscriptionid => "subscriptionid" },
460   {
461     is_deferrable => 1,
462     join_type     => "LEFT",
463     on_delete     => "CASCADE",
464     on_update     => "CASCADE",
465   },
466 );
467
468
469 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-10-30 01:04:01
470 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M+R6T+KIk4lqzdYjbYvg9w
471
472
473 # You can replace this text with custom content, and it will be preserved on regeneration
474 1;