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: 'OPEN'
96
  extra: {list => ["OPEN","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 => "OPEN",
148
    extra => { list => ["OPEN", "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-08 11:32:12
254
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xslV0rRlOR1Uz0hCYp/WVg
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-08 11:32:12
307
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vh7DAGajJCEzHE7YmAG3jg
322
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xs9KEYjmdGyZFvFtUCJnQw
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 1138-1145 Composing rels: L</aqorder_users> -> ordernumber Link Here
1138
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1153
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1139
1154
1140
1155
1141
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-10-06 10:38:42
1156
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-08 11:32:12
1142
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AdaMeazHWWCtMM7rvKX9Lg
1157
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+dES1AKrHgOzva0YCHKpMQ
1143
1158
1144
1159
1145
# You can replace this text with custom content, and it will be preserved on regeneration
1160
# 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-08 11:32:12
517
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CGNPB/MkGLOihDThj43/4A
532
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mpklcnAG64p8XsP52AnhfQ
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 179-184 __PACKAGE__->table("issuingrules"); Link Here
179
  is_nullable: 0
179
  is_nullable: 0
180
  size: 1
180
  size: 1
181
181
182
=head2 article_requests
183
184
  data_type: 'enum'
185
  default_value: 'no'
186
  extra: {list => ["no","yes","bib_only","item_only"]}
187
  is_nullable: 0
188
182
=cut
189
=cut
183
190
184
__PACKAGE__->add_columns(
191
__PACKAGE__->add_columns(
Lines 241-246 __PACKAGE__->add_columns( Link Here
241
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
248
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
242
  "opacitemholds",
249
  "opacitemholds",
243
  { data_type => "char", default_value => "N", is_nullable => 0, size => 1 },
250
  { data_type => "char", default_value => "N", is_nullable => 0, size => 1 },
251
  "article_requests",
252
  {
253
    data_type => "enum",
254
    default_value => "no",
255
    extra => { list => ["no", "yes", "bib_only", "item_only"] },
256
    is_nullable => 0,
257
  },
244
);
258
);
245
259
246
=head1 PRIMARY KEY
260
=head1 PRIMARY KEY
Lines 260-267 __PACKAGE__->add_columns( Link Here
260
__PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype");
274
__PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype");
261
275
262
276
263
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-05-13 17:48:39
277
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-08 13:51:35
264
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:H6LuTmUWdqmjCc5L4hsTQA
278
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VuC2MmMmGecOQ2j1IsKAsg
265
279
266
280
267
# You can replace this text with custom content, and it will be preserved on regeneration
281
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Item.pm (-3 / +17 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
Lines 616-623 __PACKAGE__->might_have( Link Here
616
);
631
);
617
632
618
633
619
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-04-23 12:42:12
634
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-08 11:32:12
620
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:urSpNt7LBda4T5Plhi6cPw
635
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:y5m5BhwPX1jKCapCflgWvA
621
636
622
sub effective_itemtype {
637
sub effective_itemtype {
623
    my ( $self ) = @_;
638
    my ( $self ) = @_;
624
- 

Return to bug 14610