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