Bug 15533 - Allow patrons and librarians to select itemtype when placing hold
[koha.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: 'mediumtext'
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   is_nullable: 0
119
120 =head2 suspend
121
122   data_type: 'tinyint'
123   default_value: 0
124   is_nullable: 0
125
126 =head2 suspend_until
127
128   data_type: 'datetime'
129   datetime_undef_if_invalid: 1
130   is_nullable: 1
131
132 =head2 itemtype
133
134   data_type: 'varchar'
135   is_foreign_key: 1
136   is_nullable: 1
137   size: 10
138
139 =cut
140
141 __PACKAGE__->add_columns(
142   "reserve_id",
143   { data_type => "integer", is_nullable => 0 },
144   "borrowernumber",
145   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
146   "reservedate",
147   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
148   "biblionumber",
149   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
150   "branchcode",
151   { data_type => "varchar", is_nullable => 1, size => 10 },
152   "notificationdate",
153   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
154   "reminderdate",
155   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
156   "cancellationdate",
157   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
158   "reservenotes",
159   { data_type => "mediumtext", is_nullable => 1 },
160   "priority",
161   { data_type => "smallint", is_nullable => 1 },
162   "found",
163   { data_type => "varchar", is_nullable => 1, size => 1 },
164   "timestamp",
165   {
166     data_type => "timestamp",
167     datetime_undef_if_invalid => 1,
168     default_value => \"current_timestamp",
169     is_nullable => 0,
170   },
171   "itemnumber",
172   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
173   "waitingdate",
174   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
175   "expirationdate",
176   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
177   "lowestPriority",
178   { accessor => "lowest_priority", data_type => "tinyint", is_nullable => 0 },
179   "suspend",
180   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
181   "suspend_until",
182   {
183     data_type => "datetime",
184     datetime_undef_if_invalid => 1,
185     is_nullable => 1,
186   },
187   "itemtype",
188   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
189 );
190
191 =head1 PRIMARY KEY
192
193 =over 4
194
195 =item * L</reserve_id>
196
197 =back
198
199 =cut
200
201 __PACKAGE__->set_primary_key("reserve_id");
202
203 =head1 RELATIONS
204
205 =head2 biblionumber
206
207 Type: belongs_to
208
209 Related object: L<Koha::Schema::Result::Biblio>
210
211 =cut
212
213 __PACKAGE__->belongs_to(
214   "biblionumber",
215   "Koha::Schema::Result::Biblio",
216   { biblionumber => "biblionumber" },
217   {
218     is_deferrable => 1,
219     join_type     => "LEFT",
220     on_delete     => "SET NULL",
221     on_update     => "SET NULL",
222   },
223 );
224
225 =head2 borrowernumber
226
227 Type: belongs_to
228
229 Related object: L<Koha::Schema::Result::Borrower>
230
231 =cut
232
233 __PACKAGE__->belongs_to(
234   "borrowernumber",
235   "Koha::Schema::Result::Borrower",
236   { borrowernumber => "borrowernumber" },
237   {
238     is_deferrable => 1,
239     join_type     => "LEFT",
240     on_delete     => "SET NULL",
241     on_update     => "SET NULL",
242   },
243 );
244
245 =head2 itemnumber
246
247 Type: belongs_to
248
249 Related object: L<Koha::Schema::Result::Item>
250
251 =cut
252
253 __PACKAGE__->belongs_to(
254   "itemnumber",
255   "Koha::Schema::Result::Item",
256   { itemnumber => "itemnumber" },
257   {
258     is_deferrable => 1,
259     join_type     => "LEFT",
260     on_delete     => "SET NULL",
261     on_update     => "SET NULL",
262   },
263 );
264
265 =head2 itemtype
266
267 Type: belongs_to
268
269 Related object: L<Koha::Schema::Result::Itemtype>
270
271 =cut
272
273 __PACKAGE__->belongs_to(
274   "itemtype",
275   "Koha::Schema::Result::Itemtype",
276   { itemtype => "itemtype" },
277   {
278     is_deferrable => 1,
279     join_type     => "LEFT",
280     on_delete     => "CASCADE",
281     on_update     => "CASCADE",
282   },
283 );
284
285
286 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-12-26 12:22:09
287 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:34jZVAc6xF4/49hChXdSEg
288
289
290 # You can replace this text with custom content, and it will be preserved on regeneration
291 1;