Bug 11502: make library filter in "Holds To Pull" more precise
[koha.git] / Koha / Schema / Result / OldReserve.pm
blob84ba18c78a38b2cc0a3e99d26df54ae66a266f99
1 use utf8;
2 package Koha::Schema::Result::OldReserve;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::OldReserve
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<old_reserves>
20 =cut
22 __PACKAGE__->table("old_reserves");
24 =head1 ACCESSORS
26 =head2 reserve_id
28 data_type: 'integer'
29 is_nullable: 0
31 =head2 borrowernumber
33 data_type: 'integer'
34 is_foreign_key: 1
35 is_nullable: 1
37 =head2 reservedate
39 data_type: 'date'
40 datetime_undef_if_invalid: 1
41 is_nullable: 1
43 =head2 biblionumber
45 data_type: 'integer'
46 is_foreign_key: 1
47 is_nullable: 1
49 =head2 constrainttype
51 data_type: 'varchar'
52 is_nullable: 1
53 size: 1
55 =head2 branchcode
57 data_type: 'varchar'
58 is_nullable: 1
59 size: 10
61 =head2 notificationdate
63 data_type: 'date'
64 datetime_undef_if_invalid: 1
65 is_nullable: 1
67 =head2 reminderdate
69 data_type: 'date'
70 datetime_undef_if_invalid: 1
71 is_nullable: 1
73 =head2 cancellationdate
75 data_type: 'date'
76 datetime_undef_if_invalid: 1
77 is_nullable: 1
79 =head2 reservenotes
81 data_type: 'mediumtext'
82 is_nullable: 1
84 =head2 priority
86 data_type: 'smallint'
87 is_nullable: 1
89 =head2 found
91 data_type: 'varchar'
92 is_nullable: 1
93 size: 1
95 =head2 timestamp
97 data_type: 'timestamp'
98 datetime_undef_if_invalid: 1
99 default_value: current_timestamp
100 is_nullable: 0
102 =head2 itemnumber
104 data_type: 'integer'
105 is_foreign_key: 1
106 is_nullable: 1
108 =head2 waitingdate
110 data_type: 'date'
111 datetime_undef_if_invalid: 1
112 is_nullable: 1
114 =head2 expirationdate
116 data_type: 'date'
117 datetime_undef_if_invalid: 1
118 is_nullable: 1
120 =head2 lowestpriority
122 data_type: 'tinyint'
123 is_nullable: 0
125 =head2 suspend
127 data_type: 'tinyint'
128 default_value: 0
129 is_nullable: 0
131 =head2 suspend_until
133 data_type: 'datetime'
134 datetime_undef_if_invalid: 1
135 is_nullable: 1
137 =cut
139 __PACKAGE__->add_columns(
140 "reserve_id",
141 { data_type => "integer", is_nullable => 0 },
142 "borrowernumber",
143 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
144 "reservedate",
145 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
146 "biblionumber",
147 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
148 "constrainttype",
149 { data_type => "varchar", is_nullable => 1, size => 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",
166 data_type => "timestamp",
167 datetime_undef_if_invalid => 1,
168 default_value => \"current_timestamp",
169 is_nullable => 0,
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 { data_type => "tinyint", is_nullable => 0 },
179 "suspend",
180 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
181 "suspend_until",
183 data_type => "datetime",
184 datetime_undef_if_invalid => 1,
185 is_nullable => 1,
189 =head1 PRIMARY KEY
191 =over 4
193 =item * L</reserve_id>
195 =back
197 =cut
199 __PACKAGE__->set_primary_key("reserve_id");
201 =head1 RELATIONS
203 =head2 biblionumber
205 Type: belongs_to
207 Related object: L<Koha::Schema::Result::Biblio>
209 =cut
211 __PACKAGE__->belongs_to(
212 "biblionumber",
213 "Koha::Schema::Result::Biblio",
214 { biblionumber => "biblionumber" },
216 is_deferrable => 1,
217 join_type => "LEFT",
218 on_delete => "CASCADE",
219 on_update => "CASCADE",
223 =head2 borrowernumber
225 Type: belongs_to
227 Related object: L<Koha::Schema::Result::Borrower>
229 =cut
231 __PACKAGE__->belongs_to(
232 "borrowernumber",
233 "Koha::Schema::Result::Borrower",
234 { borrowernumber => "borrowernumber" },
236 is_deferrable => 1,
237 join_type => "LEFT",
238 on_delete => "CASCADE",
239 on_update => "CASCADE",
243 =head2 itemnumber
245 Type: belongs_to
247 Related object: L<Koha::Schema::Result::Item>
249 =cut
251 __PACKAGE__->belongs_to(
252 "itemnumber",
253 "Koha::Schema::Result::Item",
254 { itemnumber => "itemnumber" },
256 is_deferrable => 1,
257 join_type => "LEFT",
258 on_delete => "CASCADE",
259 on_update => "CASCADE",
264 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
265 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g/WiYGPOyzJGtMWiAHvIxA
268 # You can replace this text with custom content, and it will be preserved on regeneration