Bug 13007: DBIC updates
[koha.git] / Koha / Schema / Result / Suggestion.pm
1 use utf8;
2 package Koha::Schema::Result::Suggestion;
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::Suggestion
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<suggestions>
19
20 =cut
21
22 __PACKAGE__->table("suggestions");
23
24 =head1 ACCESSORS
25
26 =head2 suggestionid
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 suggestedby
33
34   data_type: 'integer'
35   default_value: 0
36   is_nullable: 0
37
38 =head2 suggesteddate
39
40   data_type: 'date'
41   datetime_undef_if_invalid: 1
42   is_nullable: 0
43
44 =head2 managedby
45
46   data_type: 'integer'
47   is_nullable: 1
48
49 =head2 manageddate
50
51   data_type: 'date'
52   datetime_undef_if_invalid: 1
53   is_nullable: 1
54
55 =head2 acceptedby
56
57   data_type: 'integer'
58   is_nullable: 1
59
60 =head2 accepteddate
61
62   data_type: 'date'
63   datetime_undef_if_invalid: 1
64   is_nullable: 1
65
66 =head2 rejectedby
67
68   data_type: 'integer'
69   is_nullable: 1
70
71 =head2 rejecteddate
72
73   data_type: 'date'
74   datetime_undef_if_invalid: 1
75   is_nullable: 1
76
77 =head2 STATUS
78
79   accessor: 'status'
80   data_type: 'varchar'
81   default_value: (empty string)
82   is_nullable: 0
83   size: 10
84
85 =head2 note
86
87   data_type: 'mediumtext'
88   is_nullable: 1
89
90 =head2 author
91
92   data_type: 'varchar'
93   is_nullable: 1
94   size: 80
95
96 =head2 title
97
98   data_type: 'varchar'
99   is_nullable: 1
100   size: 255
101
102 =head2 copyrightdate
103
104   data_type: 'smallint'
105   is_nullable: 1
106
107 =head2 publishercode
108
109   data_type: 'varchar'
110   is_nullable: 1
111   size: 255
112
113 =head2 date
114
115   data_type: 'timestamp'
116   datetime_undef_if_invalid: 1
117   default_value: current_timestamp
118   is_nullable: 0
119
120 =head2 volumedesc
121
122   data_type: 'varchar'
123   is_nullable: 1
124   size: 255
125
126 =head2 publicationyear
127
128   data_type: 'smallint'
129   default_value: 0
130   is_nullable: 1
131
132 =head2 place
133
134   data_type: 'varchar'
135   is_nullable: 1
136   size: 255
137
138 =head2 isbn
139
140   data_type: 'varchar'
141   is_nullable: 1
142   size: 30
143
144 =head2 mailoverseeing
145
146   data_type: 'smallint'
147   default_value: 0
148   is_nullable: 1
149
150 =head2 biblionumber
151
152   data_type: 'integer'
153   is_nullable: 1
154
155 =head2 reason
156
157   data_type: 'text'
158   is_nullable: 1
159
160 =head2 patronreason
161
162   data_type: 'text'
163   is_nullable: 1
164
165 =head2 budgetid
166
167   data_type: 'integer'
168   is_foreign_key: 1
169   is_nullable: 1
170
171 =head2 branchcode
172
173   data_type: 'varchar'
174   is_nullable: 1
175   size: 10
176
177 =head2 collectiontitle
178
179   data_type: 'text'
180   is_nullable: 1
181
182 =head2 itemtype
183
184   data_type: 'varchar'
185   is_nullable: 1
186   size: 30
187
188 =head2 quantity
189
190   data_type: 'smallint'
191   is_nullable: 1
192
193 =head2 currency
194
195   data_type: 'varchar'
196   is_nullable: 1
197   size: 3
198
199 =head2 price
200
201   data_type: 'decimal'
202   is_nullable: 1
203   size: [28,6]
204
205 =head2 total
206
207   data_type: 'decimal'
208   is_nullable: 1
209   size: [28,6]
210
211 =cut
212
213 __PACKAGE__->add_columns(
214   "suggestionid",
215   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
216   "suggestedby",
217   { data_type => "integer", default_value => 0, is_nullable => 0 },
218   "suggesteddate",
219   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 },
220   "managedby",
221   { data_type => "integer", is_nullable => 1 },
222   "manageddate",
223   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
224   "acceptedby",
225   { data_type => "integer", is_nullable => 1 },
226   "accepteddate",
227   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
228   "rejectedby",
229   { data_type => "integer", is_nullable => 1 },
230   "rejecteddate",
231   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
232   "STATUS",
233   {
234     accessor => "status",
235     data_type => "varchar",
236     default_value => "",
237     is_nullable => 0,
238     size => 10,
239   },
240   "note",
241   { data_type => "mediumtext", is_nullable => 1 },
242   "author",
243   { data_type => "varchar", is_nullable => 1, size => 80 },
244   "title",
245   { data_type => "varchar", is_nullable => 1, size => 255 },
246   "copyrightdate",
247   { data_type => "smallint", is_nullable => 1 },
248   "publishercode",
249   { data_type => "varchar", is_nullable => 1, size => 255 },
250   "date",
251   {
252     data_type => "timestamp",
253     datetime_undef_if_invalid => 1,
254     default_value => \"current_timestamp",
255     is_nullable => 0,
256   },
257   "volumedesc",
258   { data_type => "varchar", is_nullable => 1, size => 255 },
259   "publicationyear",
260   { data_type => "smallint", default_value => 0, is_nullable => 1 },
261   "place",
262   { data_type => "varchar", is_nullable => 1, size => 255 },
263   "isbn",
264   { data_type => "varchar", is_nullable => 1, size => 30 },
265   "mailoverseeing",
266   { data_type => "smallint", default_value => 0, is_nullable => 1 },
267   "biblionumber",
268   { data_type => "integer", is_nullable => 1 },
269   "reason",
270   { data_type => "text", is_nullable => 1 },
271   "patronreason",
272   { data_type => "text", is_nullable => 1 },
273   "budgetid",
274   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
275   "branchcode",
276   { data_type => "varchar", is_nullable => 1, size => 10 },
277   "collectiontitle",
278   { data_type => "text", is_nullable => 1 },
279   "itemtype",
280   { data_type => "varchar", is_nullable => 1, size => 30 },
281   "quantity",
282   { data_type => "smallint", is_nullable => 1 },
283   "currency",
284   { data_type => "varchar", is_nullable => 1, size => 3 },
285   "price",
286   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
287   "total",
288   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
289 );
290
291 =head1 PRIMARY KEY
292
293 =over 4
294
295 =item * L</suggestionid>
296
297 =back
298
299 =cut
300
301 __PACKAGE__->set_primary_key("suggestionid");
302
303 =head1 RELATIONS
304
305 =head2 budgetid
306
307 Type: belongs_to
308
309 Related object: L<Koha::Schema::Result::Aqbudget>
310
311 =cut
312
313 __PACKAGE__->belongs_to(
314   "budgetid",
315   "Koha::Schema::Result::Aqbudget",
316   { budget_id => "budgetid" },
317   {
318     is_deferrable => 1,
319     join_type     => "LEFT",
320     on_delete     => "SET NULL",
321     on_update     => "CASCADE",
322   },
323 );
324
325
326 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-02-09 15:51:54
327 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:k7YUEiU7g+VxpMsEuOiizg
328
329
330 # You can replace this text with custom content, and it will be preserved on regeneration
331 1;