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