Bug 24412: DBIC schema changes
[koha.git] / Koha / Schema / Result / OldReserve.pm
blobeae6d24d3b6cfe77d22dbae2d9ffcd44a9f2b195
1 use utf8;
2 package Koha::Schema::Result::OldReserve;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::OldReserve
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<old_reserves>
20 =cut
22 __PACKAGE__->table("old_reserves");
24 =head1 ACCESSORS
26 =head2 reserve_id
28 data_type: 'integer'
29 is_nullable: 0
31 =head2 borrowernumber
33 data_type: 'integer'
34 is_foreign_key: 1
35 is_nullable: 1
37 =head2 reservedate
39 data_type: 'date'
40 datetime_undef_if_invalid: 1
41 is_nullable: 1
43 =head2 biblionumber
45 data_type: 'integer'
46 is_foreign_key: 1
47 is_nullable: 1
49 =head2 branchcode
51 data_type: 'varchar'
52 is_nullable: 1
53 size: 10
55 =head2 desk_id
57 data_type: 'integer'
58 is_nullable: 1
60 =head2 notificationdate
62 data_type: 'date'
63 datetime_undef_if_invalid: 1
64 is_nullable: 1
66 =head2 reminderdate
68 data_type: 'date'
69 datetime_undef_if_invalid: 1
70 is_nullable: 1
72 =head2 cancellationdate
74 data_type: 'date'
75 datetime_undef_if_invalid: 1
76 is_nullable: 1
78 =head2 cancellation_reason
80 data_type: 'varchar'
81 is_nullable: 1
82 size: 80
84 =head2 reservenotes
86 data_type: 'longtext'
87 is_nullable: 1
89 =head2 priority
91 data_type: 'smallint'
92 default_value: 1
93 is_nullable: 0
95 =head2 found
97 data_type: 'varchar'
98 is_nullable: 1
99 size: 1
101 =head2 timestamp
103 data_type: 'timestamp'
104 datetime_undef_if_invalid: 1
105 default_value: current_timestamp
106 is_nullable: 0
108 =head2 itemnumber
110 data_type: 'integer'
111 is_foreign_key: 1
112 is_nullable: 1
114 =head2 waitingdate
116 data_type: 'date'
117 datetime_undef_if_invalid: 1
118 is_nullable: 1
120 =head2 expirationdate
122 data_type: 'date'
123 datetime_undef_if_invalid: 1
124 is_nullable: 1
126 =head2 lowestPriority
128 accessor: 'lowest_priority'
129 data_type: 'tinyint'
130 default_value: 0
131 is_nullable: 0
133 =head2 suspend
135 data_type: 'tinyint'
136 default_value: 0
137 is_nullable: 0
139 =head2 suspend_until
141 data_type: 'datetime'
142 datetime_undef_if_invalid: 1
143 is_nullable: 1
145 =head2 itemtype
147 data_type: 'varchar'
148 is_foreign_key: 1
149 is_nullable: 1
150 size: 10
152 =head2 item_level_hold
154 data_type: 'tinyint'
155 default_value: 0
156 is_nullable: 0
158 =head2 non_priority
160 data_type: 'tinyint'
161 default_value: 0
162 is_nullable: 0
164 =cut
166 __PACKAGE__->add_columns(
167 "reserve_id",
168 { data_type => "integer", is_nullable => 0 },
169 "borrowernumber",
170 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
171 "reservedate",
172 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
173 "biblionumber",
174 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
175 "branchcode",
176 { data_type => "varchar", is_nullable => 1, size => 10 },
177 "desk_id",
178 { data_type => "integer", is_nullable => 1 },
179 "notificationdate",
180 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
181 "reminderdate",
182 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
183 "cancellationdate",
184 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
185 "cancellation_reason",
186 { data_type => "varchar", is_nullable => 1, size => 80 },
187 "reservenotes",
188 { data_type => "longtext", is_nullable => 1 },
189 "priority",
190 { data_type => "smallint", default_value => 1, is_nullable => 0 },
191 "found",
192 { data_type => "varchar", is_nullable => 1, size => 1 },
193 "timestamp",
195 data_type => "timestamp",
196 datetime_undef_if_invalid => 1,
197 default_value => \"current_timestamp",
198 is_nullable => 0,
200 "itemnumber",
201 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
202 "waitingdate",
203 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
204 "expirationdate",
205 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
206 "lowestPriority",
208 accessor => "lowest_priority",
209 data_type => "tinyint",
210 default_value => 0,
211 is_nullable => 0,
213 "suspend",
214 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
215 "suspend_until",
217 data_type => "datetime",
218 datetime_undef_if_invalid => 1,
219 is_nullable => 1,
221 "itemtype",
222 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
223 "item_level_hold",
224 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
225 "non_priority",
226 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
229 =head1 PRIMARY KEY
231 =over 4
233 =item * L</reserve_id>
235 =back
237 =cut
239 __PACKAGE__->set_primary_key("reserve_id");
241 =head1 RELATIONS
243 =head2 biblionumber
245 Type: belongs_to
247 Related object: L<Koha::Schema::Result::Biblio>
249 =cut
251 __PACKAGE__->belongs_to(
252 "biblionumber",
253 "Koha::Schema::Result::Biblio",
254 { biblionumber => "biblionumber" },
256 is_deferrable => 1,
257 join_type => "LEFT",
258 on_delete => "SET NULL",
259 on_update => "SET NULL",
263 =head2 borrowernumber
265 Type: belongs_to
267 Related object: L<Koha::Schema::Result::Borrower>
269 =cut
271 __PACKAGE__->belongs_to(
272 "borrowernumber",
273 "Koha::Schema::Result::Borrower",
274 { borrowernumber => "borrowernumber" },
276 is_deferrable => 1,
277 join_type => "LEFT",
278 on_delete => "SET NULL",
279 on_update => "SET NULL",
283 =head2 itemnumber
285 Type: belongs_to
287 Related object: L<Koha::Schema::Result::Item>
289 =cut
291 __PACKAGE__->belongs_to(
292 "itemnumber",
293 "Koha::Schema::Result::Item",
294 { itemnumber => "itemnumber" },
296 is_deferrable => 1,
297 join_type => "LEFT",
298 on_delete => "SET NULL",
299 on_update => "SET NULL",
303 =head2 itemtype
305 Type: belongs_to
307 Related object: L<Koha::Schema::Result::Itemtype>
309 =cut
311 __PACKAGE__->belongs_to(
312 "itemtype",
313 "Koha::Schema::Result::Itemtype",
314 { itemtype => "itemtype" },
316 is_deferrable => 1,
317 join_type => "LEFT",
318 on_delete => "SET NULL",
319 on_update => "SET NULL",
324 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-11-06 11:00:40
325 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7weIpuc0RpZ/MxFn94E8dg
327 __PACKAGE__->add_columns(
328 '+item_level_hold' => { is_boolean => 1 },
329 '+lowestPriority' => { is_boolean => 1 },
330 '+suspend' => { is_boolean => 1 },
331 '+non_priority' => { is_boolean => 1 }
334 sub koha_object_class {
335 'Koha::Old::Hold';
337 sub koha_objects_class {
338 'Koha::Old::Holds';