Bug 8798: DBIx::Class base classes for all Koha tables
[srvgit] / 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 =cut
130
131 __PACKAGE__->add_columns(
132   "reserve_id",
133   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
134   "borrowernumber",
135   {
136     data_type      => "integer",
137     default_value  => 0,
138     is_foreign_key => 1,
139     is_nullable    => 0,
140   },
141   "reservedate",
142   { data_type => "date", is_nullable => 1 },
143   "biblionumber",
144   {
145     data_type      => "integer",
146     default_value  => 0,
147     is_foreign_key => 1,
148     is_nullable    => 0,
149   },
150   "constrainttype",
151   { data_type => "varchar", is_nullable => 1, size => 1 },
152   "branchcode",
153   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
154   "notificationdate",
155   { data_type => "date", is_nullable => 1 },
156   "reminderdate",
157   { data_type => "date", is_nullable => 1 },
158   "cancellationdate",
159   { data_type => "date", is_nullable => 1 },
160   "reservenotes",
161   { data_type => "mediumtext", is_nullable => 1 },
162   "priority",
163   { data_type => "smallint", is_nullable => 1 },
164   "found",
165   { data_type => "varchar", is_nullable => 1, size => 1 },
166   "timestamp",
167   {
168     data_type     => "timestamp",
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", is_nullable => 1 },
176   "expirationdate",
177   { data_type => "date", is_nullable => 1 },
178   "lowestpriority",
179   { data_type => "tinyint", is_nullable => 0 },
180   "suspend",
181   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
182   "suspend_until",
183   { data_type => "datetime", is_nullable => 1 },
184 );
185 __PACKAGE__->set_primary_key("reserve_id");
186
187 =head1 RELATIONS
188
189 =head2 borrowernumber
190
191 Type: belongs_to
192
193 Related object: L<Koha::Schema::Result::Borrower>
194
195 =cut
196
197 __PACKAGE__->belongs_to(
198   "borrowernumber",
199   "Koha::Schema::Result::Borrower",
200   { borrowernumber => "borrowernumber" },
201   { on_delete => "CASCADE", on_update => "CASCADE" },
202 );
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   { on_delete => "CASCADE", on_update => "CASCADE" },
217 );
218
219 =head2 itemnumber
220
221 Type: belongs_to
222
223 Related object: L<Koha::Schema::Result::Item>
224
225 =cut
226
227 __PACKAGE__->belongs_to(
228   "itemnumber",
229   "Koha::Schema::Result::Item",
230   { itemnumber => "itemnumber" },
231   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
232 );
233
234 =head2 branchcode
235
236 Type: belongs_to
237
238 Related object: L<Koha::Schema::Result::Branch>
239
240 =cut
241
242 __PACKAGE__->belongs_to(
243   "branchcode",
244   "Koha::Schema::Result::Branch",
245   { branchcode => "branchcode" },
246   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
247 );
248
249
250 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
251 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+8kr13IjL7oHVHRXQzTReA
252
253
254 # You can replace this text with custom content, and it will be preserved on regeneration
255 1;