Bug 8798: (follow-up) update schema files
[koha.git] / Koha / Schema / Result / Reserve.pm
1 package Koha::Schema::Result::Reserve;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::Reserve
15
16 =cut
17
18 __PACKAGE__->table("reserves");
19
20 =head1 ACCESSORS
21
22 =head2 reserve_id
23
24   data_type: 'integer'
25   is_auto_increment: 1
26   is_nullable: 0
27
28 =head2 borrowernumber
29
30   data_type: 'integer'
31   default_value: 0
32   is_foreign_key: 1
33   is_nullable: 0
34
35 =head2 reservedate
36
37   data_type: 'date'
38   is_nullable: 1
39
40 =head2 biblionumber
41
42   data_type: 'integer'
43   default_value: 0
44   is_foreign_key: 1
45   is_nullable: 0
46
47 =head2 constrainttype
48
49   data_type: 'varchar'
50   is_nullable: 1
51   size: 1
52
53 =head2 branchcode
54
55   data_type: 'varchar'
56   is_foreign_key: 1
57   is_nullable: 1
58   size: 10
59
60 =head2 notificationdate
61
62   data_type: 'date'
63   is_nullable: 1
64
65 =head2 reminderdate
66
67   data_type: 'date'
68   is_nullable: 1
69
70 =head2 cancellationdate
71
72   data_type: 'date'
73   is_nullable: 1
74
75 =head2 reservenotes
76
77   data_type: 'mediumtext'
78   is_nullable: 1
79
80 =head2 priority
81
82   data_type: 'smallint'
83   is_nullable: 1
84
85 =head2 found
86
87   data_type: 'varchar'
88   is_nullable: 1
89   size: 1
90
91 =head2 timestamp
92
93   data_type: 'timestamp'
94   default_value: current_timestamp
95   is_nullable: 0
96
97 =head2 itemnumber
98
99   data_type: 'integer'
100   is_foreign_key: 1
101   is_nullable: 1
102
103 =head2 waitingdate
104
105   data_type: 'date'
106   is_nullable: 1
107
108 =head2 expirationdate
109
110   data_type: 'date'
111   is_nullable: 1
112
113 =head2 lowestpriority
114
115   data_type: 'tinyint'
116   is_nullable: 0
117
118 =head2 suspend
119
120   data_type: 'tinyint'
121   default_value: 0
122   is_nullable: 0
123
124 =head2 suspend_until
125
126   data_type: 'datetime'
127   is_nullable: 1
128
129 =head2 maxpickupdate
130
131   data_type: 'date'
132   is_nullable: 1
133
134 =cut
135
136 __PACKAGE__->add_columns(
137   "reserve_id",
138   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
139   "borrowernumber",
140   {
141     data_type      => "integer",
142     default_value  => 0,
143     is_foreign_key => 1,
144     is_nullable    => 0,
145   },
146   "reservedate",
147   { data_type => "date", is_nullable => 1 },
148   "biblionumber",
149   {
150     data_type      => "integer",
151     default_value  => 0,
152     is_foreign_key => 1,
153     is_nullable    => 0,
154   },
155   "constrainttype",
156   { data_type => "varchar", is_nullable => 1, size => 1 },
157   "branchcode",
158   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
159   "notificationdate",
160   { data_type => "date", is_nullable => 1 },
161   "reminderdate",
162   { data_type => "date", is_nullable => 1 },
163   "cancellationdate",
164   { data_type => "date", is_nullable => 1 },
165   "reservenotes",
166   { data_type => "mediumtext", is_nullable => 1 },
167   "priority",
168   { data_type => "smallint", is_nullable => 1 },
169   "found",
170   { data_type => "varchar", is_nullable => 1, size => 1 },
171   "timestamp",
172   {
173     data_type     => "timestamp",
174     default_value => \"current_timestamp",
175     is_nullable   => 0,
176   },
177   "itemnumber",
178   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
179   "waitingdate",
180   { data_type => "date", is_nullable => 1 },
181   "expirationdate",
182   { data_type => "date", is_nullable => 1 },
183   "lowestpriority",
184   { data_type => "tinyint", is_nullable => 0 },
185   "suspend",
186   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
187   "suspend_until",
188   { data_type => "datetime", is_nullable => 1 },
189   "maxpickupdate",
190   { data_type => "date", is_nullable => 1 },
191 );
192 __PACKAGE__->set_primary_key("reserve_id");
193
194 =head1 RELATIONS
195
196 =head2 borrowernumber
197
198 Type: belongs_to
199
200 Related object: L<Koha::Schema::Result::Borrower>
201
202 =cut
203
204 __PACKAGE__->belongs_to(
205   "borrowernumber",
206   "Koha::Schema::Result::Borrower",
207   { borrowernumber => "borrowernumber" },
208   { on_delete => "CASCADE", on_update => "CASCADE" },
209 );
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   { on_delete => "CASCADE", on_update => "CASCADE" },
224 );
225
226 =head2 itemnumber
227
228 Type: belongs_to
229
230 Related object: L<Koha::Schema::Result::Item>
231
232 =cut
233
234 __PACKAGE__->belongs_to(
235   "itemnumber",
236   "Koha::Schema::Result::Item",
237   { itemnumber => "itemnumber" },
238   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
239 );
240
241 =head2 branchcode
242
243 Type: belongs_to
244
245 Related object: L<Koha::Schema::Result::Branch>
246
247 =cut
248
249 __PACKAGE__->belongs_to(
250   "branchcode",
251   "Koha::Schema::Result::Branch",
252   { branchcode => "branchcode" },
253   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
254 );
255
256
257 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57
258 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RqJFYCoDl4dMH1cwZilLKA
259
260
261 # You can replace this text with custom content, and it will be preserved on regeneration
262 1;