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.07042 @ 2016-01-12 11:47:10
254
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N8Ziim4bGMg5jUDmN8HpxQ
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 (+16 lines)
Lines 693-698 __PACKAGE__->has_many( Link Here
693
  { cascade_copy => 0, cascade_delete => 0 },
693
  { cascade_copy => 0, cascade_delete => 0 },
694
);
694
);
695
695
696
=head2 article_requests
697
698
Type: has_many
699
700
Related object: L<Koha::Schema::Result::ArticleRequest>
701
702
=cut
703
704
__PACKAGE__->has_many(
705
  "article_requests",
706
  "Koha::Schema::Result::ArticleRequest",
707
  { "foreign.borrowernumber" => "self.borrowernumber" },
708
  { cascade_copy => 0, cascade_delete => 0 },
709
);
710
696
=head2 borrower_attributes
711
=head2 borrower_attributes
697
712
698
Type: has_many
713
Type: has_many
Lines 1213-1216 __PACKAGE__->belongs_to( Link Here
1213
    { borrowernumber => "guarantorid" },
1228
    { borrowernumber => "guarantorid" },
1214
);
1229
);
1215
1230
1231
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1216
1;
1232
1;
(-)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 (-3 / +17 lines)
Lines 191-196 __PACKAGE__->table("issuingrules"); Link Here
191
  is_nullable: 0
191
  is_nullable: 0
192
  size: 1
192
  size: 1
193
193
194
=head2 article_requests
195
196
  data_type: 'enum'
197
  default_value: 'no'
198
  extra: {list => ["no","yes","bib_only","item_only"]}
199
  is_nullable: 0
200
194
=cut
201
=cut
195
202
196
__PACKAGE__->add_columns(
203
__PACKAGE__->add_columns(
Lines 257-262 __PACKAGE__->add_columns( Link Here
257
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
264
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
258
  "opacitemholds",
265
  "opacitemholds",
259
  { data_type => "char", default_value => "N", is_nullable => 0, size => 1 },
266
  { data_type => "char", default_value => "N", is_nullable => 0, size => 1 },
267
  "article_requests",
268
  {
269
    data_type => "enum",
270
    default_value => "no",
271
    extra => { list => ["no", "yes", "bib_only", "item_only"] },
272
    is_nullable => 0,
273
  },
260
);
274
);
261
275
262
=head1 PRIMARY KEY
276
=head1 PRIMARY KEY
Lines 276-284 __PACKAGE__->add_columns( Link Here
276
__PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype");
290
__PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype");
277
291
278
292
279
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-12-31 15:26:16
293
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-12 11:42:27
280
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:K/8SKpDjba5CM4+WPZtWPw
294
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VYqAUkhiWek+5K4PW9xk5g
281
295
282
296
283
# You can replace this text with custom content, and it will be preserved on regeneration
297
# You can replace this text with custom code or comments, and it will be preserved on regeneration
284
1;
298
1;
(-)a/Koha/Schema/Result/Item.pm (-3 / +18 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 631-638 __PACKAGE__->might_have( Link Here
631
);
646
);
632
647
633
648
634
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-06 12:00:28
649
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-12 11:43:12
635
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3M6BvB4ATsBXgQCkFKuI3A
650
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:S0bRZ6WQHKohQc1Ze7Euww
636
651
637
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
652
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
638
653
Lines 656-659 sub effective_itemtype { Link Here
656
    }
671
    }
657
}
672
}
658
673
674
# You can replace this text with custom code or comments, and it will be preserved on regeneration
659
1;
675
1;
660
- 

Return to bug 14610