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

(-)a/Koha/Schema/Result/ArticleRequest.pm (+265 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 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;
(-)a/Koha/Schema/Result/Biblio.pm (-2 / +19 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 318-324 __PACKAGE__->has_many( Link Here
318
);
333
);
319
334
320
335
321
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-03 18:29:15
336
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-16 11:05:47
322
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NK+HRwn4BhRKwuIfuFqHpA
337
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZYfUZwjwAevXsoXC09/nCw
338
323
339
340
# You can replace this text with custom code or comments, and it will be preserved on regeneration
324
1;
341
1;
(-)a/Koha/Schema/Result/Borrower.pm (-2 / +17 lines)
Lines 707-712 __PACKAGE__->has_many( Link Here
707
  { cascade_copy => 0, cascade_delete => 0 },
707
  { cascade_copy => 0, cascade_delete => 0 },
708
);
708
);
709
709
710
=head2 article_requests
711
712
Type: has_many
713
714
Related object: L<Koha::Schema::Result::ArticleRequest>
715
716
=cut
717
718
__PACKAGE__->has_many(
719
  "article_requests",
720
  "Koha::Schema::Result::ArticleRequest",
721
  { "foreign.borrowernumber" => "self.borrowernumber" },
722
  { cascade_copy => 0, cascade_delete => 0 },
723
);
724
710
=head2 borrower_attributes
725
=head2 borrower_attributes
711
726
712
Type: has_many
727
Type: has_many
Lines 1218-1225 Composing rels: L</aqorder_users> -> ordernumber Link Here
1218
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1233
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1219
1234
1220
1235
1221
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-06-14 16:35:12
1236
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-16 11:06:25
1222
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Luq1YVrOwtdDvSDWgWNGUg
1237
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7EdQh3TT8OLO1aEl42/yeQ
1223
1238
1224
__PACKAGE__->belongs_to(
1239
__PACKAGE__->belongs_to(
1225
    "guarantor",
1240
    "guarantor",
(-)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 528-535 Composing rels: L</branchrelations> -> categorycode Link Here
528
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
543
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
529
544
530
545
531
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-11-26 11:08:29
546
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-16 11:06:59
532
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FjNI9OEpa5OKfwwCkggu0w
547
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jJLwflVN3JdCuT1Libd+ww
533
548
534
549
535
# You can replace this text with custom code or comments, and it will be preserved on regeneration
550
# You can replace this text with custom code or comments, 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 / +17 lines)
Lines 439-444 __PACKAGE__->has_many( Link Here
439
  { cascade_copy => 0, cascade_delete => 0 },
439
  { cascade_copy => 0, cascade_delete => 0 },
440
);
440
);
441
441
442
=head2 article_requests
443
444
Type: has_many
445
446
Related object: L<Koha::Schema::Result::ArticleRequest>
447
448
=cut
449
450
__PACKAGE__->has_many(
451
  "article_requests",
452
  "Koha::Schema::Result::ArticleRequest",
453
  { "foreign.itemnumber" => "self.itemnumber" },
454
  { cascade_copy => 0, cascade_delete => 0 },
455
);
456
442
=head2 biblioitemnumber
457
=head2 biblioitemnumber
443
458
444
Type: belongs_to
459
Type: belongs_to
Lines 660-667 __PACKAGE__->might_have( Link Here
660
);
675
);
661
676
662
677
663
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-03 18:29:16
678
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-16 11:07:58
664
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2XK/xYWHqauPzYKJcKc0ig
679
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xAB1I3P45Di0jHHkbyKHng
665
680
666
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
681
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
667
682
668
- 

Return to bug 14610