Bug 13321: Update DBIx::Class schema files
[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_foreign_key: 1
53   is_nullable: 1
54   size: 10
55
56 =head2 listprice
57
58   data_type: 'decimal'
59   is_nullable: 1
60   size: [28,6]
61
62 =head2 datereceived
63
64   data_type: 'date'
65   datetime_undef_if_invalid: 1
66   is_nullable: 1
67
68 =head2 invoiceid
69
70   data_type: 'integer'
71   is_foreign_key: 1
72   is_nullable: 1
73
74 =head2 freight
75
76   data_type: 'decimal'
77   is_nullable: 1
78   size: [28,6]
79
80 =head2 unitprice
81
82   data_type: 'decimal'
83   is_nullable: 1
84   size: [28,6]
85
86 =head2 unitprice_tax_excluded
87
88   data_type: 'decimal'
89   is_nullable: 1
90   size: [28,6]
91
92 =head2 unitprice_tax_included
93
94   data_type: 'decimal'
95   is_nullable: 1
96   size: [28,6]
97
98 =head2 quantityreceived
99
100   data_type: 'smallint'
101   default_value: 0
102   is_nullable: 0
103
104 =head2 datecancellationprinted
105
106   data_type: 'date'
107   datetime_undef_if_invalid: 1
108   is_nullable: 1
109
110 =head2 cancellationreason
111
112   data_type: 'text'
113   is_nullable: 1
114
115 =head2 order_internalnote
116
117   data_type: 'mediumtext'
118   is_nullable: 1
119
120 =head2 order_vendornote
121
122   data_type: 'mediumtext'
123   is_nullable: 1
124
125 =head2 purchaseordernumber
126
127   data_type: 'mediumtext'
128   is_nullable: 1
129
130 =head2 basketno
131
132   data_type: 'integer'
133   is_foreign_key: 1
134   is_nullable: 1
135
136 =head2 timestamp
137
138   data_type: 'timestamp'
139   datetime_undef_if_invalid: 1
140   default_value: current_timestamp
141   is_nullable: 0
142
143 =head2 rrp
144
145   data_type: 'decimal'
146   is_nullable: 1
147   size: [13,2]
148
149 =head2 rrp_tax_excluded
150
151   data_type: 'decimal'
152   is_nullable: 1
153   size: [28,6]
154
155 =head2 rrp_tax_included
156
157   data_type: 'decimal'
158   is_nullable: 1
159   size: [28,6]
160
161 =head2 ecost
162
163   data_type: 'decimal'
164   is_nullable: 1
165   size: [13,2]
166
167 =head2 ecost_tax_excluded
168
169   data_type: 'decimal'
170   is_nullable: 1
171   size: [28,6]
172
173 =head2 ecost_tax_included
174
175   data_type: 'decimal'
176   is_nullable: 1
177   size: [28,6]
178
179 =head2 tax_rate
180
181   data_type: 'decimal'
182   is_nullable: 1
183   size: [6,4]
184
185 =head2 tax_value
186
187   data_type: 'decimal'
188   is_nullable: 1
189   size: [6,4]
190
191 =head2 discount
192
193   data_type: 'float'
194   is_nullable: 1
195   size: [6,4]
196
197 =head2 budget_id
198
199   data_type: 'integer'
200   is_foreign_key: 1
201   is_nullable: 0
202
203 =head2 budgetdate
204
205   data_type: 'date'
206   datetime_undef_if_invalid: 1
207   is_nullable: 1
208
209 =head2 sort1
210
211   data_type: 'varchar'
212   is_nullable: 1
213   size: 80
214
215 =head2 sort2
216
217   data_type: 'varchar'
218   is_nullable: 1
219   size: 80
220
221 =head2 sort1_authcat
222
223   data_type: 'varchar'
224   is_nullable: 1
225   size: 10
226
227 =head2 sort2_authcat
228
229   data_type: 'varchar'
230   is_nullable: 1
231   size: 10
232
233 =head2 uncertainprice
234
235   data_type: 'tinyint'
236   is_nullable: 1
237
238 =head2 claims_count
239
240   data_type: 'integer'
241   default_value: 0
242   is_nullable: 1
243
244 =head2 claimed_date
245
246   data_type: 'date'
247   datetime_undef_if_invalid: 1
248   is_nullable: 1
249
250 =head2 subscriptionid
251
252   data_type: 'integer'
253   is_foreign_key: 1
254   is_nullable: 1
255
256 =head2 parent_ordernumber
257
258   data_type: 'integer'
259   is_nullable: 1
260
261 =head2 orderstatus
262
263   data_type: 'varchar'
264   default_value: 'new'
265   is_nullable: 1
266   size: 16
267
268 =head2 line_item_id
269
270   data_type: 'varchar'
271   is_nullable: 1
272   size: 35
273
274 =head2 suppliers_reference_number
275
276   data_type: 'varchar'
277   is_nullable: 1
278   size: 35
279
280 =head2 suppliers_reference_qualifier
281
282   data_type: 'varchar'
283   is_nullable: 1
284   size: 3
285
286 =head2 suppliers_report
287
288   data_type: 'text'
289   is_nullable: 1
290
291 =cut
292
293 __PACKAGE__->add_columns(
294   "ordernumber",
295   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
296   "biblionumber",
297   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
298   "entrydate",
299   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
300   "quantity",
301   { data_type => "smallint", is_nullable => 1 },
302   "currency",
303   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
304   "listprice",
305   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
306   "datereceived",
307   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
308   "invoiceid",
309   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
310   "freight",
311   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
312   "unitprice",
313   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
314   "unitprice_tax_excluded",
315   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
316   "unitprice_tax_included",
317   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
318   "quantityreceived",
319   { data_type => "smallint", default_value => 0, is_nullable => 0 },
320   "datecancellationprinted",
321   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
322   "cancellationreason",
323   { data_type => "text", is_nullable => 1 },
324   "order_internalnote",
325   { data_type => "mediumtext", is_nullable => 1 },
326   "order_vendornote",
327   { data_type => "mediumtext", is_nullable => 1 },
328   "purchaseordernumber",
329   { data_type => "mediumtext", is_nullable => 1 },
330   "basketno",
331   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
332   "timestamp",
333   {
334     data_type => "timestamp",
335     datetime_undef_if_invalid => 1,
336     default_value => \"current_timestamp",
337     is_nullable => 0,
338   },
339   "rrp",
340   { data_type => "decimal", is_nullable => 1, size => [13, 2] },
341   "rrp_tax_excluded",
342   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
343   "rrp_tax_included",
344   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
345   "ecost",
346   { data_type => "decimal", is_nullable => 1, size => [13, 2] },
347   "ecost_tax_excluded",
348   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
349   "ecost_tax_included",
350   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
351   "tax_rate",
352   { data_type => "decimal", is_nullable => 1, size => [6, 4] },
353   "tax_value",
354   { data_type => "decimal", is_nullable => 1, size => [6, 4] },
355   "discount",
356   { data_type => "float", is_nullable => 1, size => [6, 4] },
357   "budget_id",
358   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
359   "budgetdate",
360   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
361   "sort1",
362   { data_type => "varchar", is_nullable => 1, size => 80 },
363   "sort2",
364   { data_type => "varchar", is_nullable => 1, size => 80 },
365   "sort1_authcat",
366   { data_type => "varchar", is_nullable => 1, size => 10 },
367   "sort2_authcat",
368   { data_type => "varchar", is_nullable => 1, size => 10 },
369   "uncertainprice",
370   { data_type => "tinyint", is_nullable => 1 },
371   "claims_count",
372   { data_type => "integer", default_value => 0, is_nullable => 1 },
373   "claimed_date",
374   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
375   "subscriptionid",
376   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
377   "parent_ordernumber",
378   { data_type => "integer", is_nullable => 1 },
379   "orderstatus",
380   {
381     data_type => "varchar",
382     default_value => "new",
383     is_nullable => 1,
384     size => 16,
385   },
386   "line_item_id",
387   { data_type => "varchar", is_nullable => 1, size => 35 },
388   "suppliers_reference_number",
389   { data_type => "varchar", is_nullable => 1, size => 35 },
390   "suppliers_reference_qualifier",
391   { data_type => "varchar", is_nullable => 1, size => 3 },
392   "suppliers_report",
393   { data_type => "text", is_nullable => 1 },
394 );
395
396 =head1 PRIMARY KEY
397
398 =over 4
399
400 =item * L</ordernumber>
401
402 =back
403
404 =cut
405
406 __PACKAGE__->set_primary_key("ordernumber");
407
408 =head1 RELATIONS
409
410 =head2 aqorder_users
411
412 Type: has_many
413
414 Related object: L<Koha::Schema::Result::AqorderUser>
415
416 =cut
417
418 __PACKAGE__->has_many(
419   "aqorder_users",
420   "Koha::Schema::Result::AqorderUser",
421   { "foreign.ordernumber" => "self.ordernumber" },
422   { cascade_copy => 0, cascade_delete => 0 },
423 );
424
425 =head2 aqorders_items
426
427 Type: has_many
428
429 Related object: L<Koha::Schema::Result::AqordersItem>
430
431 =cut
432
433 __PACKAGE__->has_many(
434   "aqorders_items",
435   "Koha::Schema::Result::AqordersItem",
436   { "foreign.ordernumber" => "self.ordernumber" },
437   { cascade_copy => 0, cascade_delete => 0 },
438 );
439
440 =head2 aqorders_transfers_ordernumber_from
441
442 Type: might_have
443
444 Related object: L<Koha::Schema::Result::AqordersTransfer>
445
446 =cut
447
448 __PACKAGE__->might_have(
449   "aqorders_transfers_ordernumber_from",
450   "Koha::Schema::Result::AqordersTransfer",
451   { "foreign.ordernumber_from" => "self.ordernumber" },
452   { cascade_copy => 0, cascade_delete => 0 },
453 );
454
455 =head2 aqorders_transfers_ordernumber_to
456
457 Type: might_have
458
459 Related object: L<Koha::Schema::Result::AqordersTransfer>
460
461 =cut
462
463 __PACKAGE__->might_have(
464   "aqorders_transfers_ordernumber_to",
465   "Koha::Schema::Result::AqordersTransfer",
466   { "foreign.ordernumber_to" => "self.ordernumber" },
467   { cascade_copy => 0, cascade_delete => 0 },
468 );
469
470 =head2 basketno
471
472 Type: belongs_to
473
474 Related object: L<Koha::Schema::Result::Aqbasket>
475
476 =cut
477
478 __PACKAGE__->belongs_to(
479   "basketno",
480   "Koha::Schema::Result::Aqbasket",
481   { basketno => "basketno" },
482   {
483     is_deferrable => 1,
484     join_type     => "LEFT",
485     on_delete     => "CASCADE",
486     on_update     => "CASCADE",
487   },
488 );
489
490 =head2 biblionumber
491
492 Type: belongs_to
493
494 Related object: L<Koha::Schema::Result::Biblio>
495
496 =cut
497
498 __PACKAGE__->belongs_to(
499   "biblionumber",
500   "Koha::Schema::Result::Biblio",
501   { biblionumber => "biblionumber" },
502   {
503     is_deferrable => 1,
504     join_type     => "LEFT",
505     on_delete     => "SET NULL",
506     on_update     => "CASCADE",
507   },
508 );
509
510 =head2 budget
511
512 Type: belongs_to
513
514 Related object: L<Koha::Schema::Result::Aqbudget>
515
516 =cut
517
518 __PACKAGE__->belongs_to(
519   "budget",
520   "Koha::Schema::Result::Aqbudget",
521   { budget_id => "budget_id" },
522   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
523 );
524
525 =head2 currency
526
527 Type: belongs_to
528
529 Related object: L<Koha::Schema::Result::Currency>
530
531 =cut
532
533 __PACKAGE__->belongs_to(
534   "currency",
535   "Koha::Schema::Result::Currency",
536   { currency => "currency" },
537   {
538     is_deferrable => 1,
539     join_type     => "LEFT",
540     on_delete     => "SET NULL",
541     on_update     => "SET NULL",
542   },
543 );
544
545 =head2 invoiceid
546
547 Type: belongs_to
548
549 Related object: L<Koha::Schema::Result::Aqinvoice>
550
551 =cut
552
553 __PACKAGE__->belongs_to(
554   "invoiceid",
555   "Koha::Schema::Result::Aqinvoice",
556   { invoiceid => "invoiceid" },
557   {
558     is_deferrable => 1,
559     join_type     => "LEFT",
560     on_delete     => "SET NULL",
561     on_update     => "CASCADE",
562   },
563 );
564
565 =head2 subscriptionid
566
567 Type: belongs_to
568
569 Related object: L<Koha::Schema::Result::Subscription>
570
571 =cut
572
573 __PACKAGE__->belongs_to(
574   "subscriptionid",
575   "Koha::Schema::Result::Subscription",
576   { subscriptionid => "subscriptionid" },
577   {
578     is_deferrable => 1,
579     join_type     => "LEFT",
580     on_delete     => "CASCADE",
581     on_update     => "CASCADE",
582   },
583 );
584
585 =head2 borrowernumbers
586
587 Type: many_to_many
588
589 Composing rels: L</aqorder_users> -> borrowernumber
590
591 =cut
592
593 __PACKAGE__->many_to_many("borrowernumbers", "aqorder_users", "borrowernumber");
594
595
596 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-09-09 13:43:30
597 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R2a+DkXI1AaEVnpb1YKu5Q
598
599
600 # You can replace this text with custom code or comments, and it will be preserved on regeneration
601 1;