View | Details | Raw Unified | Return to bug 14610
Collapse All | Expand All

(-)a/Koha/Schema/Result/ArticleRequest.pm (+258 lines)
Line 0 Link Here
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 status
93
94
  data_type: 'enum'
95
  default_value: 'PENDING'
96
  extra: {list => ["PENDING","PROCESSING","COMPLETED","CANCELED"]}
97
  is_nullable: 0
98
99
=head2 notes
100
101
  data_type: 'text'
102
  is_nullable: 1
103
104
=head2 created_on
105
106
  data_type: 'timestamp'
107
  datetime_undef_if_invalid: 1
108
  default_value: current_timestamp
109
  is_nullable: 0
110
111
=head2 updated_on
112
113
  data_type: 'timestamp'
114
  datetime_undef_if_invalid: 1
115
  is_nullable: 1
116
117
=cut
118
119
__PACKAGE__->add_columns(
120
  "id",
121
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
122
  "borrowernumber",
123
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
124
  "biblionumber",
125
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
126
  "itemnumber",
127
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
128
  "branchcode",
129
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
130
  "title",
131
  { data_type => "text", is_nullable => 1 },
132
  "author",
133
  { data_type => "text", is_nullable => 1 },
134
  "volume",
135
  { data_type => "text", is_nullable => 1 },
136
  "issue",
137
  { data_type => "text", is_nullable => 1 },
138
  "date",
139
  { data_type => "text", is_nullable => 1 },
140
  "pages",
141
  { data_type => "text", is_nullable => 1 },
142
  "chapters",
143
  { data_type => "text", is_nullable => 1 },
144
  "status",
145
  {
146
    data_type => "enum",
147
    default_value => "PENDING",
148
    extra => { list => ["PENDING", "PROCESSING", "COMPLETED", "CANCELED"] },
149
    is_nullable => 0,
150
  },
151
  "notes",
152
  { data_type => "text", is_nullable => 1 },
153
  "created_on",
154
  {
155
    data_type => "timestamp",
156
    datetime_undef_if_invalid => 1,
157
    default_value => \"current_timestamp",
158
    is_nullable => 0,
159
  },
160
  "updated_on",
161
  {
162
    data_type => "timestamp",
163
    datetime_undef_if_invalid => 1,
164
    is_nullable => 1,
165
  },
166
);
167
168
=head1 PRIMARY KEY
169
170
=over 4
171
172
=item * L</id>
173
174
=back
175
176
=cut
177
178
__PACKAGE__->set_primary_key("id");
179
180
=head1 RELATIONS
181
182
=head2 biblionumber
183
184
Type: belongs_to
185
186
Related object: L<Koha::Schema::Result::Biblio>
187
188
=cut
189
190
__PACKAGE__->belongs_to(
191
  "biblionumber",
192
  "Koha::Schema::Result::Biblio",
193
  { biblionumber => "biblionumber" },
194
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
195
);
196
197
=head2 borrowernumber
198
199
Type: belongs_to
200
201
Related object: L<Koha::Schema::Result::Borrower>
202
203
=cut
204
205
__PACKAGE__->belongs_to(
206
  "borrowernumber",
207
  "Koha::Schema::Result::Borrower",
208
  { borrowernumber => "borrowernumber" },
209
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
210
);
211
212
=head2 branchcode
213
214
Type: belongs_to
215
216
Related object: L<Koha::Schema::Result::Branch>
217
218
=cut
219
220
__PACKAGE__->belongs_to(
221
  "branchcode",
222
  "Koha::Schema::Result::Branch",
223
  { branchcode => "branchcode" },
224
  {
225
    is_deferrable => 1,
226
    join_type     => "LEFT",
227
    on_delete     => "SET NULL",
228
    on_update     => "CASCADE",
229
  },
230
);
231
232
=head2 itemnumber
233
234
Type: belongs_to
235
236
Related object: L<Koha::Schema::Result::Item>
237
238
=cut
239
240
__PACKAGE__->belongs_to(
241
  "itemnumber",
242
  "Koha::Schema::Result::Item",
243
  { itemnumber => "itemnumber" },
244
  {
245
    is_deferrable => 1,
246
    join_type     => "LEFT",
247
    on_delete     => "SET NULL",
248
    on_update     => "CASCADE",
249
  },
250
);
251
252
253
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-30 12:47:52
254
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nsoqs4prAXQNqXir/Omw2Q
255
256
257
# You can replace this text with custom code or comments, and it will be preserved on regeneration
258
1;
(-)a/Koha/Schema/Result/Biblio.pm (-2 / +17 lines)
Lines 152-157 __PACKAGE__->has_many( Link Here
152
  { cascade_copy => 0, cascade_delete => 0 },
152
  { cascade_copy => 0, cascade_delete => 0 },
153
);
153
);
154
154
155
=head2 article_requests
156
157
Type: has_many
158
159
Related object: L<Koha::Schema::Result::ArticleRequest>
160
161
=cut
162
163
__PACKAGE__->has_many(
164
  "article_requests",
165
  "Koha::Schema::Result::ArticleRequest",
166
  { "foreign.biblionumber" => "self.biblionumber" },
167
  { cascade_copy => 0, cascade_delete => 0 },
168
);
169
155
=head2 biblioimages
170
=head2 biblioimages
156
171
157
Type: has_many
172
Type: has_many
Lines 303-309 __PACKAGE__->has_many( Link Here
303
);
318
);
304
319
305
320
306
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-07-08 15:06:22
321
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-30 11:59:21
307
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vh7DAGajJCEzHE7YmAG3jg
322
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yb9wtH9ZqZaESbYl912XWA
308
323
309
1;
324
1;
(-)a/Koha/Schema/Result/Borrower.pm (-2 / +17 lines)
Lines 677-682 __PACKAGE__->has_many( Link Here
677
  { cascade_copy => 0, cascade_delete => 0 },
677
  { cascade_copy => 0, cascade_delete => 0 },
678
);
678
);
679
679
680
=head2 article_requests
681
682
Type: has_many
683
684
Related object: L<Koha::Schema::Result::ArticleRequest>
685
686
=cut
687
688
__PACKAGE__->has_many(
689
  "article_requests",
690
  "Koha::Schema::Result::ArticleRequest",
691
  { "foreign.borrowernumber" => "self.borrowernumber" },
692
  { cascade_copy => 0, cascade_delete => 0 },
693
);
694
680
=head2 borrower_attributes
695
=head2 borrower_attributes
681
696
682
Type: has_many
697
Type: has_many
Lines 1153-1160 Composing rels: L</aqorder_users> -> ordernumber Link Here
1153
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1168
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1154
1169
1155
1170
1156
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-10-21 19:50:05
1171
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-30 11:59:21
1157
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QafovaRBnm36nyoyQTGIgQ
1172
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RZ7HD+2CfyUOCJGaVF+j8A
1158
1173
1159
1174
1160
# You can replace this text with custom content, and it will be preserved on regeneration
1175
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Branch.pm (-2 / +17 lines)
Lines 202-207 __PACKAGE__->has_many( Link Here
202
  { cascade_copy => 0, cascade_delete => 0 },
202
  { cascade_copy => 0, cascade_delete => 0 },
203
);
203
);
204
204
205
=head2 article_requests
206
207
Type: has_many
208
209
Related object: L<Koha::Schema::Result::ArticleRequest>
210
211
=cut
212
213
__PACKAGE__->has_many(
214
  "article_requests",
215
  "Koha::Schema::Result::ArticleRequest",
216
  { "foreign.branchcode" => "self.branchcode" },
217
  { cascade_copy => 0, cascade_delete => 0 },
218
);
219
205
=head2 authorised_values_branches
220
=head2 authorised_values_branches
206
221
207
Type: has_many
222
Type: has_many
Lines 513-520 Composing rels: L</branchrelations> -> categorycode Link Here
513
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
528
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
514
529
515
530
516
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-11-06 15:26:36
531
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-30 11:59:21
517
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CGNPB/MkGLOihDThj43/4A
532
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9OMvSwvGBfGPIljnStd/IA
518
533
519
534
520
# You can replace this text with custom content, and it will be preserved on regeneration
535
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Issuingrule.pm (-2 / +16 lines)
Lines 185-190 __PACKAGE__->table("issuingrules"); Link Here
185
  is_nullable: 0
185
  is_nullable: 0
186
  size: 1
186
  size: 1
187
187
188
=head2 article_requests
189
190
  data_type: 'enum'
191
  default_value: 'no'
192
  extra: {list => ["no","yes","bib_only","item_only"]}
193
  is_nullable: 0
194
188
=cut
195
=cut
189
196
190
__PACKAGE__->add_columns(
197
__PACKAGE__->add_columns(
Lines 249-254 __PACKAGE__->add_columns( Link Here
249
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
256
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
250
  "opacitemholds",
257
  "opacitemholds",
251
  { data_type => "char", default_value => "N", is_nullable => 0, size => 1 },
258
  { data_type => "char", default_value => "N", is_nullable => 0, size => 1 },
259
  "article_requests",
260
  {
261
    data_type => "enum",
262
    default_value => "no",
263
    extra => { list => ["no", "yes", "bib_only", "item_only"] },
264
    is_nullable => 0,
265
  },
252
);
266
);
253
267
254
=head1 PRIMARY KEY
268
=head1 PRIMARY KEY
Lines 268-275 __PACKAGE__->add_columns( Link Here
268
__PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype");
282
__PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype");
269
283
270
284
271
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-10-22 14:50:45
285
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-30 12:56:22
272
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jTYQaXLtBrSIGEqpFlgIfg
286
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oJCI/KEyn39kZe6wPP7lLw
273
287
274
288
275
# You can replace this text with custom content, and it will be preserved on regeneration
289
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Item.pm (-1 / +15 lines)
Lines 425-430 __PACKAGE__->has_many( Link Here
425
  { cascade_copy => 0, cascade_delete => 0 },
425
  { cascade_copy => 0, cascade_delete => 0 },
426
);
426
);
427
427
428
=head2 article_requests
429
430
Type: has_many
431
432
Related object: L<Koha::Schema::Result::ArticleRequest>
433
434
=cut
435
436
__PACKAGE__->has_many(
437
  "article_requests",
438
  "Koha::Schema::Result::ArticleRequest",
439
  { "foreign.itemnumber" => "self.itemnumber" },
440
  { cascade_copy => 0, cascade_delete => 0 },
441
);
442
428
=head2 biblioitemnumber
443
=head2 biblioitemnumber
429
444
430
Type: belongs_to
445
Type: belongs_to
431
- 

Return to bug 14610