Bug 25501: Supress warnings on installing translation
[koha.git] / Koha / Schema / Result / Reserve.pm
blobc5460e34da52f6424c057b5a9031fbd37e21785b
1 use utf8;
2 package Koha::Schema::Result::Reserve;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Reserve
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<reserves>
20 =cut
22 __PACKAGE__->table("reserves");
24 =head1 ACCESSORS
26 =head2 reserve_id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 borrowernumber
34 data_type: 'integer'
35 default_value: 0
36 is_foreign_key: 1
37 is_nullable: 0
39 =head2 reservedate
41 data_type: 'date'
42 datetime_undef_if_invalid: 1
43 is_nullable: 1
45 =head2 biblionumber
47 data_type: 'integer'
48 default_value: 0
49 is_foreign_key: 1
50 is_nullable: 0
52 =head2 branchcode
54 data_type: 'varchar'
55 is_foreign_key: 1
56 is_nullable: 1
57 size: 10
59 =head2 notificationdate
61 data_type: 'date'
62 datetime_undef_if_invalid: 1
63 is_nullable: 1
65 =head2 reminderdate
67 data_type: 'date'
68 datetime_undef_if_invalid: 1
69 is_nullable: 1
71 =head2 cancellationdate
73 data_type: 'date'
74 datetime_undef_if_invalid: 1
75 is_nullable: 1
77 =head2 reservenotes
79 data_type: 'longtext'
80 is_nullable: 1
82 =head2 priority
84 data_type: 'smallint'
85 default_value: 1
86 is_nullable: 0
88 =head2 found
90 data_type: 'varchar'
91 is_nullable: 1
92 size: 1
94 =head2 timestamp
96 data_type: 'timestamp'
97 datetime_undef_if_invalid: 1
98 default_value: current_timestamp
99 is_nullable: 0
101 =head2 itemnumber
103 data_type: 'integer'
104 is_foreign_key: 1
105 is_nullable: 1
107 =head2 waitingdate
109 data_type: 'date'
110 datetime_undef_if_invalid: 1
111 is_nullable: 1
113 =head2 expirationdate
115 data_type: 'date'
116 datetime_undef_if_invalid: 1
117 is_nullable: 1
119 =head2 lowestPriority
121 accessor: 'lowest_priority'
122 data_type: 'tinyint'
123 default_value: 0
124 is_nullable: 0
126 =head2 suspend
128 data_type: 'tinyint'
129 default_value: 0
130 is_nullable: 0
132 =head2 suspend_until
134 data_type: 'datetime'
135 datetime_undef_if_invalid: 1
136 is_nullable: 1
138 =head2 itemtype
140 data_type: 'varchar'
141 is_foreign_key: 1
142 is_nullable: 1
143 size: 10
145 =head2 item_level_hold
147 data_type: 'tinyint'
148 default_value: 0
149 is_nullable: 0
151 =cut
153 __PACKAGE__->add_columns(
154 "reserve_id",
155 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
156 "borrowernumber",
158 data_type => "integer",
159 default_value => 0,
160 is_foreign_key => 1,
161 is_nullable => 0,
163 "reservedate",
164 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
165 "biblionumber",
167 data_type => "integer",
168 default_value => 0,
169 is_foreign_key => 1,
170 is_nullable => 0,
172 "branchcode",
173 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
174 "notificationdate",
175 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
176 "reminderdate",
177 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
178 "cancellationdate",
179 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
180 "reservenotes",
181 { data_type => "longtext", is_nullable => 1 },
182 "priority",
183 { data_type => "smallint", default_value => 1, is_nullable => 0 },
184 "found",
185 { data_type => "varchar", is_nullable => 1, size => 1 },
186 "timestamp",
188 data_type => "timestamp",
189 datetime_undef_if_invalid => 1,
190 default_value => \"current_timestamp",
191 is_nullable => 0,
193 "itemnumber",
194 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
195 "waitingdate",
196 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
197 "expirationdate",
198 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
199 "lowestPriority",
201 accessor => "lowest_priority",
202 data_type => "tinyint",
203 default_value => 0,
204 is_nullable => 0,
206 "suspend",
207 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
208 "suspend_until",
210 data_type => "datetime",
211 datetime_undef_if_invalid => 1,
212 is_nullable => 1,
214 "itemtype",
215 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
216 "item_level_hold",
217 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
220 =head1 PRIMARY KEY
222 =over 4
224 =item * L</reserve_id>
226 =back
228 =cut
230 __PACKAGE__->set_primary_key("reserve_id");
232 =head1 RELATIONS
234 =head2 biblionumber
236 Type: belongs_to
238 Related object: L<Koha::Schema::Result::Biblio>
240 =cut
242 __PACKAGE__->belongs_to(
243 "biblionumber",
244 "Koha::Schema::Result::Biblio",
245 { biblionumber => "biblionumber" },
246 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
249 =head2 borrowernumber
251 Type: belongs_to
253 Related object: L<Koha::Schema::Result::Borrower>
255 =cut
257 __PACKAGE__->belongs_to(
258 "borrowernumber",
259 "Koha::Schema::Result::Borrower",
260 { borrowernumber => "borrowernumber" },
261 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
264 =head2 branchcode
266 Type: belongs_to
268 Related object: L<Koha::Schema::Result::Branch>
270 =cut
272 __PACKAGE__->belongs_to(
273 "branchcode",
274 "Koha::Schema::Result::Branch",
275 { branchcode => "branchcode" },
277 is_deferrable => 1,
278 join_type => "LEFT",
279 on_delete => "CASCADE",
280 on_update => "CASCADE",
284 =head2 club_holds_to_patron_holds
286 Type: has_many
288 Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold>
290 =cut
292 __PACKAGE__->has_many(
293 "club_holds_to_patron_holds",
294 "Koha::Schema::Result::ClubHoldsToPatronHold",
295 { "foreign.hold_id" => "self.reserve_id" },
296 { cascade_copy => 0, cascade_delete => 0 },
299 =head2 itemnumber
301 Type: belongs_to
303 Related object: L<Koha::Schema::Result::Item>
305 =cut
307 __PACKAGE__->belongs_to(
308 "itemnumber",
309 "Koha::Schema::Result::Item",
310 { itemnumber => "itemnumber" },
312 is_deferrable => 1,
313 join_type => "LEFT",
314 on_delete => "CASCADE",
315 on_update => "CASCADE",
319 =head2 itemtype
321 Type: belongs_to
323 Related object: L<Koha::Schema::Result::Itemtype>
325 =cut
327 __PACKAGE__->belongs_to(
328 "itemtype",
329 "Koha::Schema::Result::Itemtype",
330 { itemtype => "itemtype" },
332 is_deferrable => 1,
333 join_type => "LEFT",
334 on_delete => "CASCADE",
335 on_update => "CASCADE",
340 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-18 12:43:15
341 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VH7h5kYo9WhlGobXb3N3Jg
343 __PACKAGE__->belongs_to(
344 "item",
345 "Koha::Schema::Result::Item",
346 { itemnumber => "itemnumber" },
348 is_deferrable => 1,
349 join_type => "LEFT",
350 on_delete => "CASCADE",
351 on_update => "CASCADE",
355 __PACKAGE__->belongs_to(
356 "biblio",
357 "Koha::Schema::Result::Biblio",
358 { biblionumber => "biblionumber" },
360 is_deferrable => 1,
361 join_type => "LEFT",
362 on_delete => "CASCADE",
363 on_update => "CASCADE",
367 __PACKAGE__->add_columns(
368 '+item_level_hold' => { is_boolean => 1 },
369 '+lowestPriority' => { is_boolean => 1 },
370 '+suspend' => { is_boolean => 1 }
373 sub koha_object_class {
374 'Koha::Hold';
376 sub koha_objects_class {
377 'Koha::Holds';