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