Bug 12461 - Add patron clubs feature
[koha.git] / Koha / Schema / Result / ArticleRequest.pm
1 use utf8;
2 package Koha::Schema::Result::ArticleRequest;
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::ArticleRequest
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<article_requests>
19
20 =cut
21
22 __PACKAGE__->table("article_requests");
23
24 =head1 ACCESSORS
25
26 =head2 id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 borrowernumber
33
34   data_type: 'integer'
35   is_foreign_key: 1
36   is_nullable: 0
37
38 =head2 biblionumber
39
40   data_type: 'integer'
41   is_foreign_key: 1
42   is_nullable: 0
43
44 =head2 itemnumber
45
46   data_type: 'integer'
47   is_foreign_key: 1
48   is_nullable: 1
49
50 =head2 branchcode
51
52   data_type: 'varchar'
53   is_foreign_key: 1
54   is_nullable: 1
55   size: 10
56
57 =head2 title
58
59   data_type: 'text'
60   is_nullable: 1
61
62 =head2 author
63
64   data_type: 'text'
65   is_nullable: 1
66
67 =head2 volume
68
69   data_type: 'text'
70   is_nullable: 1
71
72 =head2 issue
73
74   data_type: 'text'
75   is_nullable: 1
76
77 =head2 date
78
79   data_type: 'text'
80   is_nullable: 1
81
82 =head2 pages
83
84   data_type: 'text'
85   is_nullable: 1
86
87 =head2 chapters
88
89   data_type: 'text'
90   is_nullable: 1
91
92 =head2 patron_notes
93
94   data_type: 'text'
95   is_nullable: 1
96
97 =head2 status
98
99   data_type: 'enum'
100   default_value: 'PENDING'
101   extra: {list => ["PENDING","PROCESSING","COMPLETED","CANCELED"]}
102   is_nullable: 0
103
104 =head2 notes
105
106   data_type: 'text'
107   is_nullable: 1
108
109 =head2 created_on
110
111   data_type: 'timestamp'
112   datetime_undef_if_invalid: 1
113   default_value: current_timestamp
114   is_nullable: 0
115
116 =head2 updated_on
117
118   data_type: 'timestamp'
119   datetime_undef_if_invalid: 1
120   is_nullable: 1
121
122 =cut
123
124 __PACKAGE__->add_columns(
125   "id",
126   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
127   "borrowernumber",
128   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
129   "biblionumber",
130   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
131   "itemnumber",
132   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
133   "branchcode",
134   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
135   "title",
136   { data_type => "text", is_nullable => 1 },
137   "author",
138   { data_type => "text", is_nullable => 1 },
139   "volume",
140   { data_type => "text", is_nullable => 1 },
141   "issue",
142   { data_type => "text", is_nullable => 1 },
143   "date",
144   { data_type => "text", is_nullable => 1 },
145   "pages",
146   { data_type => "text", is_nullable => 1 },
147   "chapters",
148   { data_type => "text", is_nullable => 1 },
149   "patron_notes",
150   { data_type => "text", is_nullable => 1 },
151   "status",
152   {
153     data_type => "enum",
154     default_value => "PENDING",
155     extra => { list => ["PENDING", "PROCESSING", "COMPLETED", "CANCELED"] },
156     is_nullable => 0,
157   },
158   "notes",
159   { data_type => "text", is_nullable => 1 },
160   "created_on",
161   {
162     data_type => "timestamp",
163     datetime_undef_if_invalid => 1,
164     default_value => \"current_timestamp",
165     is_nullable => 0,
166   },
167   "updated_on",
168   {
169     data_type => "timestamp",
170     datetime_undef_if_invalid => 1,
171     is_nullable => 1,
172   },
173 );
174
175 =head1 PRIMARY KEY
176
177 =over 4
178
179 =item * L</id>
180
181 =back
182
183 =cut
184
185 __PACKAGE__->set_primary_key("id");
186
187 =head1 RELATIONS
188
189 =head2 biblionumber
190
191 Type: belongs_to
192
193 Related object: L<Koha::Schema::Result::Biblio>
194
195 =cut
196
197 __PACKAGE__->belongs_to(
198   "biblionumber",
199   "Koha::Schema::Result::Biblio",
200   { biblionumber => "biblionumber" },
201   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
202 );
203
204 =head2 borrowernumber
205
206 Type: belongs_to
207
208 Related object: L<Koha::Schema::Result::Borrower>
209
210 =cut
211
212 __PACKAGE__->belongs_to(
213   "borrowernumber",
214   "Koha::Schema::Result::Borrower",
215   { borrowernumber => "borrowernumber" },
216   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
217 );
218
219 =head2 branchcode
220
221 Type: belongs_to
222
223 Related object: L<Koha::Schema::Result::Branch>
224
225 =cut
226
227 __PACKAGE__->belongs_to(
228   "branchcode",
229   "Koha::Schema::Result::Branch",
230   { branchcode => "branchcode" },
231   {
232     is_deferrable => 1,
233     join_type     => "LEFT",
234     on_delete     => "SET NULL",
235     on_update     => "CASCADE",
236   },
237 );
238
239 =head2 itemnumber
240
241 Type: belongs_to
242
243 Related object: L<Koha::Schema::Result::Item>
244
245 =cut
246
247 __PACKAGE__->belongs_to(
248   "itemnumber",
249   "Koha::Schema::Result::Item",
250   { itemnumber => "itemnumber" },
251   {
252     is_deferrable => 1,
253     join_type     => "LEFT",
254     on_delete     => "SET NULL",
255     on_update     => "CASCADE",
256   },
257 );
258
259
260 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-25 13:08:54
261 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UcnwdgEHzMcmRY6vP9B61A
262
263
264 # You can replace this text with custom code or comments, and it will be preserved on regeneration
265 1;