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