Bug 12781: DBIx::Class schema update 08/2014
[koha-ffzg.git] / Koha / Schema / Result / Reserve.pm
1 use utf8;
2 package Koha::Schema::Result::Reserve;
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::Reserve
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<reserves>
19
20 =cut
21
22 __PACKAGE__->table("reserves");
23
24 =head1 ACCESSORS
25
26 =head2 reserve_id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 borrowernumber
33
34   data_type: 'integer'
35   default_value: 0
36   is_foreign_key: 1
37   is_nullable: 0
38
39 =head2 reservedate
40
41   data_type: 'date'
42   datetime_undef_if_invalid: 1
43   is_nullable: 1
44
45 =head2 biblionumber
46
47   data_type: 'integer'
48   default_value: 0
49   is_foreign_key: 1
50   is_nullable: 0
51
52 =head2 constrainttype
53
54   data_type: 'varchar'
55   is_nullable: 1
56   size: 1
57
58 =head2 branchcode
59
60   data_type: 'varchar'
61   is_foreign_key: 1
62   is_nullable: 1
63   size: 10
64
65 =head2 notificationdate
66
67   data_type: 'date'
68   datetime_undef_if_invalid: 1
69   is_nullable: 1
70
71 =head2 reminderdate
72
73   data_type: 'date'
74   datetime_undef_if_invalid: 1
75   is_nullable: 1
76
77 =head2 cancellationdate
78
79   data_type: 'date'
80   datetime_undef_if_invalid: 1
81   is_nullable: 1
82
83 =head2 reservenotes
84
85   data_type: 'mediumtext'
86   is_nullable: 1
87
88 =head2 priority
89
90   data_type: 'smallint'
91   is_nullable: 1
92
93 =head2 found
94
95   data_type: 'varchar'
96   is_nullable: 1
97   size: 1
98
99 =head2 timestamp
100
101   data_type: 'timestamp'
102   datetime_undef_if_invalid: 1
103   default_value: current_timestamp
104   is_nullable: 0
105
106 =head2 itemnumber
107
108   data_type: 'integer'
109   is_foreign_key: 1
110   is_nullable: 1
111
112 =head2 waitingdate
113
114   data_type: 'date'
115   datetime_undef_if_invalid: 1
116   is_nullable: 1
117
118 =head2 expirationdate
119
120   data_type: 'date'
121   datetime_undef_if_invalid: 1
122   is_nullable: 1
123
124 =head2 lowestPriority
125
126   accessor: 'lowest_priority'
127   data_type: 'tinyint'
128   is_nullable: 0
129
130 =head2 suspend
131
132   data_type: 'tinyint'
133   default_value: 0
134   is_nullable: 0
135
136 =head2 suspend_until
137
138   data_type: 'datetime'
139   datetime_undef_if_invalid: 1
140   is_nullable: 1
141
142 =cut
143
144 __PACKAGE__->add_columns(
145   "reserve_id",
146   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
147   "borrowernumber",
148   {
149     data_type      => "integer",
150     default_value  => 0,
151     is_foreign_key => 1,
152     is_nullable    => 0,
153   },
154   "reservedate",
155   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
156   "biblionumber",
157   {
158     data_type      => "integer",
159     default_value  => 0,
160     is_foreign_key => 1,
161     is_nullable    => 0,
162   },
163   "constrainttype",
164   { data_type => "varchar", is_nullable => 1, size => 1 },
165   "branchcode",
166   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
167   "notificationdate",
168   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
169   "reminderdate",
170   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
171   "cancellationdate",
172   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
173   "reservenotes",
174   { data_type => "mediumtext", is_nullable => 1 },
175   "priority",
176   { data_type => "smallint", is_nullable => 1 },
177   "found",
178   { data_type => "varchar", is_nullable => 1, size => 1 },
179   "timestamp",
180   {
181     data_type => "timestamp",
182     datetime_undef_if_invalid => 1,
183     default_value => \"current_timestamp",
184     is_nullable => 0,
185   },
186   "itemnumber",
187   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
188   "waitingdate",
189   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
190   "expirationdate",
191   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
192   "lowestPriority",
193   { accessor => "lowest_priority", data_type => "tinyint", is_nullable => 0 },
194   "suspend",
195   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
196   "suspend_until",
197   {
198     data_type => "datetime",
199     datetime_undef_if_invalid => 1,
200     is_nullable => 1,
201   },
202 );
203
204 =head1 PRIMARY KEY
205
206 =over 4
207
208 =item * L</reserve_id>
209
210 =back
211
212 =cut
213
214 __PACKAGE__->set_primary_key("reserve_id");
215
216 =head1 RELATIONS
217
218 =head2 biblionumber
219
220 Type: belongs_to
221
222 Related object: L<Koha::Schema::Result::Biblio>
223
224 =cut
225
226 __PACKAGE__->belongs_to(
227   "biblionumber",
228   "Koha::Schema::Result::Biblio",
229   { biblionumber => "biblionumber" },
230   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
231 );
232
233 =head2 borrowernumber
234
235 Type: belongs_to
236
237 Related object: L<Koha::Schema::Result::Borrower>
238
239 =cut
240
241 __PACKAGE__->belongs_to(
242   "borrowernumber",
243   "Koha::Schema::Result::Borrower",
244   { borrowernumber => "borrowernumber" },
245   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
246 );
247
248 =head2 branchcode
249
250 Type: belongs_to
251
252 Related object: L<Koha::Schema::Result::Branch>
253
254 =cut
255
256 __PACKAGE__->belongs_to(
257   "branchcode",
258   "Koha::Schema::Result::Branch",
259   { branchcode => "branchcode" },
260   {
261     is_deferrable => 1,
262     join_type     => "LEFT",
263     on_delete     => "CASCADE",
264     on_update     => "CASCADE",
265   },
266 );
267
268 =head2 itemnumber
269
270 Type: belongs_to
271
272 Related object: L<Koha::Schema::Result::Item>
273
274 =cut
275
276 __PACKAGE__->belongs_to(
277   "itemnumber",
278   "Koha::Schema::Result::Item",
279   { itemnumber => "itemnumber" },
280   {
281     is_deferrable => 1,
282     join_type     => "LEFT",
283     on_delete     => "CASCADE",
284     on_update     => "CASCADE",
285   },
286 );
287
288
289 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-08-18 13:01:05
290 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jzng9D1Pns0I2PUF7Wssiw
291
292 __PACKAGE__->belongs_to(
293   "item",
294   "Koha::Schema::Result::Item",
295   { itemnumber => "itemnumber" },
296   {
297     is_deferrable => 1,
298     join_type     => "LEFT",
299     on_delete     => "CASCADE",
300     on_update     => "CASCADE",
301   },
302 );
303
304 __PACKAGE__->belongs_to(
305   "biblio",
306   "Koha::Schema::Result::Biblio",
307   { biblionumber => "biblionumber" },
308   {
309     is_deferrable => 1,
310     join_type     => "LEFT",
311     on_delete     => "CASCADE",
312     on_update     => "CASCADE",
313   },
314 );
315
316 1;