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

(-)a/Koha/Schema/Result/ArticleRequest.pm (+208 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 title
51
52
  data_type: 'text'
53
  is_nullable: 1
54
55
=head2 author
56
57
  data_type: 'text'
58
  is_nullable: 1
59
60
=head2 volume
61
62
  data_type: 'text'
63
  is_nullable: 1
64
65
=head2 issue
66
67
  data_type: 'text'
68
  is_nullable: 1
69
70
=head2 date
71
72
  data_type: 'text'
73
  is_nullable: 1
74
75
=head2 pages
76
77
  data_type: 'text'
78
  is_nullable: 1
79
80
=head2 chapters
81
82
  data_type: 'text'
83
  is_nullable: 1
84
85
=head2 created_on
86
87
  data_type: 'timestamp'
88
  datetime_undef_if_invalid: 1
89
  default_value: current_timestamp
90
  is_nullable: 0
91
92
=head2 updated_on
93
94
  data_type: 'timestamp'
95
  datetime_undef_if_invalid: 1
96
  is_nullable: 1
97
98
=cut
99
100
__PACKAGE__->add_columns(
101
  "id",
102
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
103
  "borrowernumber",
104
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
105
  "biblionumber",
106
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
107
  "itemnumber",
108
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
109
  "title",
110
  { data_type => "text", is_nullable => 1 },
111
  "author",
112
  { data_type => "text", is_nullable => 1 },
113
  "volume",
114
  { data_type => "text", is_nullable => 1 },
115
  "issue",
116
  { data_type => "text", is_nullable => 1 },
117
  "date",
118
  { data_type => "text", is_nullable => 1 },
119
  "pages",
120
  { data_type => "text", is_nullable => 1 },
121
  "chapters",
122
  { data_type => "text", is_nullable => 1 },
123
  "created_on",
124
  {
125
    data_type => "timestamp",
126
    datetime_undef_if_invalid => 1,
127
    default_value => \"current_timestamp",
128
    is_nullable => 0,
129
  },
130
  "updated_on",
131
  {
132
    data_type => "timestamp",
133
    datetime_undef_if_invalid => 1,
134
    is_nullable => 1,
135
  },
136
);
137
138
=head1 PRIMARY KEY
139
140
=over 4
141
142
=item * L</id>
143
144
=back
145
146
=cut
147
148
__PACKAGE__->set_primary_key("id");
149
150
=head1 RELATIONS
151
152
=head2 biblionumber
153
154
Type: belongs_to
155
156
Related object: L<Koha::Schema::Result::Biblio>
157
158
=cut
159
160
__PACKAGE__->belongs_to(
161
  "biblionumber",
162
  "Koha::Schema::Result::Biblio",
163
  { biblionumber => "biblionumber" },
164
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
165
);
166
167
=head2 borrowernumber
168
169
Type: belongs_to
170
171
Related object: L<Koha::Schema::Result::Borrower>
172
173
=cut
174
175
__PACKAGE__->belongs_to(
176
  "borrowernumber",
177
  "Koha::Schema::Result::Borrower",
178
  { borrowernumber => "borrowernumber" },
179
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
180
);
181
182
=head2 itemnumber
183
184
Type: belongs_to
185
186
Related object: L<Koha::Schema::Result::Item>
187
188
=cut
189
190
__PACKAGE__->belongs_to(
191
  "itemnumber",
192
  "Koha::Schema::Result::Item",
193
  { itemnumber => "itemnumber" },
194
  {
195
    is_deferrable => 1,
196
    join_type     => "LEFT",
197
    on_delete     => "SET NULL",
198
    on_update     => "CASCADE",
199
  },
200
);
201
202
203
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-07-28 10:40:02
204
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Gcq0lkNV972sKkcueQq19w
205
206
207
# You can replace this text with custom code or comments, and it will be preserved on regeneration
208
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-07-28 10:45:00
307
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vh7DAGajJCEzHE7YmAG3jg
322
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ilygO1c15l0SXYruaJo49w
308
323
309
1;
324
1;
(-)a/Koha/Schema/Result/Borrower.pm (-2 / +17 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 1154-1161 Composing rels: L</aqorder_users> -> ordernumber Link Here
1154
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1169
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1155
1170
1156
1171
1157
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-04-27 16:08:40
1172
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-07-28 10:45:00
1158
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z50zYBD3Hqlv5/EnoLnyZw
1173
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fTWNasg8AQbvK8aCbP8XoQ
1159
1174
1160
1175
1161
# You can replace this text with custom content, and it will be preserved on regeneration
1176
# 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-07-28 10:45:00
620
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:urSpNt7LBda4T5Plhi6cPw
635
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+61F3ui1gezR/5NZRYq03g
621
636
622
sub effective_itemtype {
637
sub effective_itemtype {
623
    my ( $self ) = @_;
638
    my ( $self ) = @_;
624
- 

Return to bug 14610