Bug 8798: DBIx::Class base classes for all Koha tables
[koha.git] / Koha / Schema / Result / Aqorder.pm
1 package Koha::Schema::Result::Aqorder;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::Aqorder
15
16 =cut
17
18 __PACKAGE__->table("aqorders");
19
20 =head1 ACCESSORS
21
22 =head2 ordernumber
23
24   data_type: 'integer'
25   is_auto_increment: 1
26   is_nullable: 0
27
28 =head2 biblionumber
29
30   data_type: 'integer'
31   is_foreign_key: 1
32   is_nullable: 1
33
34 =head2 entrydate
35
36   data_type: 'date'
37   is_nullable: 1
38
39 =head2 quantity
40
41   data_type: 'smallint'
42   is_nullable: 1
43
44 =head2 currency
45
46   data_type: 'varchar'
47   is_nullable: 1
48   size: 3
49
50 =head2 listprice
51
52   data_type: 'decimal'
53   is_nullable: 1
54   size: [28,6]
55
56 =head2 totalamount
57
58   data_type: 'decimal'
59   is_nullable: 1
60   size: [28,6]
61
62 =head2 datereceived
63
64   data_type: 'date'
65   is_nullable: 1
66
67 =head2 invoiceid
68
69   data_type: 'integer'
70   is_foreign_key: 1
71   is_nullable: 1
72
73 =head2 freight
74
75   data_type: 'decimal'
76   is_nullable: 1
77   size: [28,6]
78
79 =head2 unitprice
80
81   data_type: 'decimal'
82   is_nullable: 1
83   size: [28,6]
84
85 =head2 quantityreceived
86
87   data_type: 'smallint'
88   default_value: 0
89   is_nullable: 0
90
91 =head2 cancelledby
92
93   data_type: 'varchar'
94   is_nullable: 1
95   size: 10
96
97 =head2 datecancellationprinted
98
99   data_type: 'date'
100   is_nullable: 1
101
102 =head2 notes
103
104   data_type: 'mediumtext'
105   is_nullable: 1
106
107 =head2 supplierreference
108
109   data_type: 'mediumtext'
110   is_nullable: 1
111
112 =head2 purchaseordernumber
113
114   data_type: 'mediumtext'
115   is_nullable: 1
116
117 =head2 subscription
118
119   data_type: 'tinyint'
120   is_nullable: 1
121
122 =head2 serialid
123
124   data_type: 'varchar'
125   is_nullable: 1
126   size: 30
127
128 =head2 basketno
129
130   data_type: 'integer'
131   is_foreign_key: 1
132   is_nullable: 1
133
134 =head2 biblioitemnumber
135
136   data_type: 'integer'
137   is_nullable: 1
138
139 =head2 timestamp
140
141   data_type: 'timestamp'
142   default_value: current_timestamp
143   is_nullable: 0
144
145 =head2 rrp
146
147   data_type: 'decimal'
148   is_nullable: 1
149   size: [13,2]
150
151 =head2 ecost
152
153   data_type: 'decimal'
154   is_nullable: 1
155   size: [13,2]
156
157 =head2 gst
158
159   data_type: 'decimal'
160   is_nullable: 1
161   size: [13,2]
162
163 =head2 budget_id
164
165   data_type: 'integer'
166   is_nullable: 0
167
168 =head2 budgetgroup_id
169
170   data_type: 'integer'
171   is_nullable: 0
172
173 =head2 budgetdate
174
175   data_type: 'date'
176   is_nullable: 1
177
178 =head2 sort1
179
180   data_type: 'varchar'
181   is_nullable: 1
182   size: 80
183
184 =head2 sort2
185
186   data_type: 'varchar'
187   is_nullable: 1
188   size: 80
189
190 =head2 sort1_authcat
191
192   data_type: 'varchar'
193   is_nullable: 1
194   size: 10
195
196 =head2 sort2_authcat
197
198   data_type: 'varchar'
199   is_nullable: 1
200   size: 10
201
202 =head2 uncertainprice
203
204   data_type: 'tinyint'
205   is_nullable: 1
206
207 =head2 claims_count
208
209   data_type: 'integer'
210   default_value: 0
211   is_nullable: 1
212
213 =head2 claimed_date
214
215   data_type: 'date'
216   is_nullable: 1
217
218 =head2 parent_ordernumber
219
220   data_type: 'integer'
221   is_nullable: 1
222
223 =cut
224
225 __PACKAGE__->add_columns(
226   "ordernumber",
227   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
228   "biblionumber",
229   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
230   "entrydate",
231   { data_type => "date", is_nullable => 1 },
232   "quantity",
233   { data_type => "smallint", is_nullable => 1 },
234   "currency",
235   { data_type => "varchar", is_nullable => 1, size => 3 },
236   "listprice",
237   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
238   "totalamount",
239   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
240   "datereceived",
241   { data_type => "date", is_nullable => 1 },
242   "invoiceid",
243   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
244   "freight",
245   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
246   "unitprice",
247   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
248   "quantityreceived",
249   { data_type => "smallint", default_value => 0, is_nullable => 0 },
250   "cancelledby",
251   { data_type => "varchar", is_nullable => 1, size => 10 },
252   "datecancellationprinted",
253   { data_type => "date", is_nullable => 1 },
254   "notes",
255   { data_type => "mediumtext", is_nullable => 1 },
256   "supplierreference",
257   { data_type => "mediumtext", is_nullable => 1 },
258   "purchaseordernumber",
259   { data_type => "mediumtext", is_nullable => 1 },
260   "subscription",
261   { data_type => "tinyint", is_nullable => 1 },
262   "serialid",
263   { data_type => "varchar", is_nullable => 1, size => 30 },
264   "basketno",
265   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
266   "biblioitemnumber",
267   { data_type => "integer", is_nullable => 1 },
268   "timestamp",
269   {
270     data_type     => "timestamp",
271     default_value => \"current_timestamp",
272     is_nullable   => 0,
273   },
274   "rrp",
275   { data_type => "decimal", is_nullable => 1, size => [13, 2] },
276   "ecost",
277   { data_type => "decimal", is_nullable => 1, size => [13, 2] },
278   "gst",
279   { data_type => "decimal", is_nullable => 1, size => [13, 2] },
280   "budget_id",
281   { data_type => "integer", is_nullable => 0 },
282   "budgetgroup_id",
283   { data_type => "integer", is_nullable => 0 },
284   "budgetdate",
285   { data_type => "date", is_nullable => 1 },
286   "sort1",
287   { data_type => "varchar", is_nullable => 1, size => 80 },
288   "sort2",
289   { data_type => "varchar", is_nullable => 1, size => 80 },
290   "sort1_authcat",
291   { data_type => "varchar", is_nullable => 1, size => 10 },
292   "sort2_authcat",
293   { data_type => "varchar", is_nullable => 1, size => 10 },
294   "uncertainprice",
295   { data_type => "tinyint", is_nullable => 1 },
296   "claims_count",
297   { data_type => "integer", default_value => 0, is_nullable => 1 },
298   "claimed_date",
299   { data_type => "date", is_nullable => 1 },
300   "parent_ordernumber",
301   { data_type => "integer", is_nullable => 1 },
302 );
303 __PACKAGE__->set_primary_key("ordernumber");
304
305 =head1 RELATIONS
306
307 =head2 basketno
308
309 Type: belongs_to
310
311 Related object: L<Koha::Schema::Result::Aqbasket>
312
313 =cut
314
315 __PACKAGE__->belongs_to(
316   "basketno",
317   "Koha::Schema::Result::Aqbasket",
318   { basketno => "basketno" },
319   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
320 );
321
322 =head2 biblionumber
323
324 Type: belongs_to
325
326 Related object: L<Koha::Schema::Result::Biblio>
327
328 =cut
329
330 __PACKAGE__->belongs_to(
331   "biblionumber",
332   "Koha::Schema::Result::Biblio",
333   { biblionumber => "biblionumber" },
334   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
335 );
336
337 =head2 invoiceid
338
339 Type: belongs_to
340
341 Related object: L<Koha::Schema::Result::Aqinvoice>
342
343 =cut
344
345 __PACKAGE__->belongs_to(
346   "invoiceid",
347   "Koha::Schema::Result::Aqinvoice",
348   { invoiceid => "invoiceid" },
349   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
350 );
351
352
353 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
354 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:McWqeFHBMTDvKV7pUEqJ3w
355
356
357 # You can replace this text with custom content, and it will be preserved on regeneration
358 1;