Bug 12781: DBIx::Class schema update 08/2014
[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 constrainttype
50
51   data_type: 'varchar'
52   is_nullable: 1
53   size: 1
54
55 =head2 branchcode
56
57   data_type: 'varchar'
58   is_nullable: 1
59   size: 10
60
61 =head2 notificationdate
62
63   data_type: 'date'
64   datetime_undef_if_invalid: 1
65   is_nullable: 1
66
67 =head2 reminderdate
68
69   data_type: 'date'
70   datetime_undef_if_invalid: 1
71   is_nullable: 1
72
73 =head2 cancellationdate
74
75   data_type: 'date'
76   datetime_undef_if_invalid: 1
77   is_nullable: 1
78
79 =head2 reservenotes
80
81   data_type: 'mediumtext'
82   is_nullable: 1
83
84 =head2 priority
85
86   data_type: 'smallint'
87   is_nullable: 1
88
89 =head2 found
90
91   data_type: 'varchar'
92   is_nullable: 1
93   size: 1
94
95 =head2 timestamp
96
97   data_type: 'timestamp'
98   datetime_undef_if_invalid: 1
99   default_value: current_timestamp
100   is_nullable: 0
101
102 =head2 itemnumber
103
104   data_type: 'integer'
105   is_foreign_key: 1
106   is_nullable: 1
107
108 =head2 waitingdate
109
110   data_type: 'date'
111   datetime_undef_if_invalid: 1
112   is_nullable: 1
113
114 =head2 expirationdate
115
116   data_type: 'date'
117   datetime_undef_if_invalid: 1
118   is_nullable: 1
119
120 =head2 lowestPriority
121
122   accessor: 'lowest_priority'
123   data_type: 'tinyint'
124   is_nullable: 0
125
126 =head2 suspend
127
128   data_type: 'tinyint'
129   default_value: 0
130   is_nullable: 0
131
132 =head2 suspend_until
133
134   data_type: 'datetime'
135   datetime_undef_if_invalid: 1
136   is_nullable: 1
137
138 =cut
139
140 __PACKAGE__->add_columns(
141   "reserve_id",
142   { data_type => "integer", is_nullable => 0 },
143   "borrowernumber",
144   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
145   "reservedate",
146   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
147   "biblionumber",
148   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
149   "constrainttype",
150   { data_type => "varchar", is_nullable => 1, size => 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 => "mediumtext", 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   { accessor => "lowest_priority", data_type => "tinyint", is_nullable => 0 },
180   "suspend",
181   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
182   "suspend_until",
183   {
184     data_type => "datetime",
185     datetime_undef_if_invalid => 1,
186     is_nullable => 1,
187   },
188 );
189
190 =head1 PRIMARY KEY
191
192 =over 4
193
194 =item * L</reserve_id>
195
196 =back
197
198 =cut
199
200 __PACKAGE__->set_primary_key("reserve_id");
201
202 =head1 RELATIONS
203
204 =head2 biblionumber
205
206 Type: belongs_to
207
208 Related object: L<Koha::Schema::Result::Biblio>
209
210 =cut
211
212 __PACKAGE__->belongs_to(
213   "biblionumber",
214   "Koha::Schema::Result::Biblio",
215   { biblionumber => "biblionumber" },
216   {
217     is_deferrable => 1,
218     join_type     => "LEFT",
219     on_delete     => "SET NULL",
220     on_update     => "SET NULL",
221   },
222 );
223
224 =head2 borrowernumber
225
226 Type: belongs_to
227
228 Related object: L<Koha::Schema::Result::Borrower>
229
230 =cut
231
232 __PACKAGE__->belongs_to(
233   "borrowernumber",
234   "Koha::Schema::Result::Borrower",
235   { borrowernumber => "borrowernumber" },
236   {
237     is_deferrable => 1,
238     join_type     => "LEFT",
239     on_delete     => "SET NULL",
240     on_update     => "SET NULL",
241   },
242 );
243
244 =head2 itemnumber
245
246 Type: belongs_to
247
248 Related object: L<Koha::Schema::Result::Item>
249
250 =cut
251
252 __PACKAGE__->belongs_to(
253   "itemnumber",
254   "Koha::Schema::Result::Item",
255   { itemnumber => "itemnumber" },
256   {
257     is_deferrable => 1,
258     join_type     => "LEFT",
259     on_delete     => "SET NULL",
260     on_update     => "SET NULL",
261   },
262 );
263
264
265 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-08-18 13:01:05
266 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bCHe3BGidrVm0LIlC6h+ow
267
268
269 # You can replace this text with custom content, and it will be preserved on regeneration
270 1;