Bug 24474: (QA follow-up) Fix failing test
[koha.git] / Koha / Schema / Result / OldReserve.pm
blob85e604d288cb19bee92053ae96102316976989ab
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 notificationdate
57 data_type: 'date'
58 datetime_undef_if_invalid: 1
59 is_nullable: 1
61 =head2 reminderdate
63 data_type: 'date'
64 datetime_undef_if_invalid: 1
65 is_nullable: 1
67 =head2 cancellationdate
69 data_type: 'date'
70 datetime_undef_if_invalid: 1
71 is_nullable: 1
73 =head2 reservenotes
75 data_type: 'longtext'
76 is_nullable: 1
78 =head2 priority
80 data_type: 'smallint'
81 default_value: 1
82 is_nullable: 0
84 =head2 found
86 data_type: 'varchar'
87 is_nullable: 1
88 size: 1
90 =head2 timestamp
92 data_type: 'timestamp'
93 datetime_undef_if_invalid: 1
94 default_value: current_timestamp
95 is_nullable: 0
97 =head2 itemnumber
99 data_type: 'integer'
100 is_foreign_key: 1
101 is_nullable: 1
103 =head2 waitingdate
105 data_type: 'date'
106 datetime_undef_if_invalid: 1
107 is_nullable: 1
109 =head2 expirationdate
111 data_type: 'date'
112 datetime_undef_if_invalid: 1
113 is_nullable: 1
115 =head2 lowestPriority
117 accessor: 'lowest_priority'
118 data_type: 'tinyint'
119 default_value: 0
120 is_nullable: 0
122 =head2 suspend
124 data_type: 'tinyint'
125 default_value: 0
126 is_nullable: 0
128 =head2 suspend_until
130 data_type: 'datetime'
131 datetime_undef_if_invalid: 1
132 is_nullable: 1
134 =head2 itemtype
136 data_type: 'varchar'
137 is_foreign_key: 1
138 is_nullable: 1
139 size: 10
141 =head2 item_level_hold
143 data_type: 'tinyint'
144 default_value: 0
145 is_nullable: 0
147 =cut
149 __PACKAGE__->add_columns(
150 "reserve_id",
151 { data_type => "integer", is_nullable => 0 },
152 "borrowernumber",
153 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
154 "reservedate",
155 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
156 "biblionumber",
157 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
158 "branchcode",
159 { data_type => "varchar", is_nullable => 1, size => 10 },
160 "notificationdate",
161 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
162 "reminderdate",
163 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
164 "cancellationdate",
165 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
166 "reservenotes",
167 { data_type => "longtext", is_nullable => 1 },
168 "priority",
169 { data_type => "smallint", default_value => 1, is_nullable => 0 },
170 "found",
171 { data_type => "varchar", is_nullable => 1, size => 1 },
172 "timestamp",
174 data_type => "timestamp",
175 datetime_undef_if_invalid => 1,
176 default_value => \"current_timestamp",
177 is_nullable => 0,
179 "itemnumber",
180 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
181 "waitingdate",
182 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
183 "expirationdate",
184 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
185 "lowestPriority",
187 accessor => "lowest_priority",
188 data_type => "tinyint",
189 default_value => 0,
190 is_nullable => 0,
192 "suspend",
193 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
194 "suspend_until",
196 data_type => "datetime",
197 datetime_undef_if_invalid => 1,
198 is_nullable => 1,
200 "itemtype",
201 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
202 "item_level_hold",
203 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
206 =head1 PRIMARY KEY
208 =over 4
210 =item * L</reserve_id>
212 =back
214 =cut
216 __PACKAGE__->set_primary_key("reserve_id");
218 =head1 RELATIONS
220 =head2 biblionumber
222 Type: belongs_to
224 Related object: L<Koha::Schema::Result::Biblio>
226 =cut
228 __PACKAGE__->belongs_to(
229 "biblionumber",
230 "Koha::Schema::Result::Biblio",
231 { biblionumber => "biblionumber" },
233 is_deferrable => 1,
234 join_type => "LEFT",
235 on_delete => "SET NULL",
236 on_update => "SET NULL",
240 =head2 borrowernumber
242 Type: belongs_to
244 Related object: L<Koha::Schema::Result::Borrower>
246 =cut
248 __PACKAGE__->belongs_to(
249 "borrowernumber",
250 "Koha::Schema::Result::Borrower",
251 { borrowernumber => "borrowernumber" },
253 is_deferrable => 1,
254 join_type => "LEFT",
255 on_delete => "SET NULL",
256 on_update => "SET NULL",
260 =head2 itemnumber
262 Type: belongs_to
264 Related object: L<Koha::Schema::Result::Item>
266 =cut
268 __PACKAGE__->belongs_to(
269 "itemnumber",
270 "Koha::Schema::Result::Item",
271 { itemnumber => "itemnumber" },
273 is_deferrable => 1,
274 join_type => "LEFT",
275 on_delete => "SET NULL",
276 on_update => "SET NULL",
280 =head2 itemtype
282 Type: belongs_to
284 Related object: L<Koha::Schema::Result::Itemtype>
286 =cut
288 __PACKAGE__->belongs_to(
289 "itemtype",
290 "Koha::Schema::Result::Itemtype",
291 { itemtype => "itemtype" },
293 is_deferrable => 1,
294 join_type => "LEFT",
295 on_delete => "SET NULL",
296 on_update => "SET NULL",
301 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-18 12:43:15
302 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4vMUC/1kSr3vgQ7n0Pmuug
304 sub koha_object_class {
305 'Koha::Old::Hold';
307 sub koha_objects_class {
308 'Koha::Old::Holds';