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

(-)a/Koha/Old/Recall.pm (+51 lines)
Line 0 Link Here
1
package Koha::Old::Recall;
2
3
# Copyright 2017 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use Koha::Database;
23
24
use base qw( Koha::Object );
25
26
=head1 NAME
27
28
Koha::Old::Recall - Koha Old Recall Object class
29
30
=head1 API
31
32
=head2 Class Methods
33
34
=cut
35
36
=head3 type
37
38
=cut
39
40
sub type {
41
    return 'OldRecall';
42
}
43
44
=head1 AUTHOR
45
46
Aleisha Amohia <aleisha@catalyst.net.nz>
47
Catalyst IT
48
49
=cut
50
51
1;
(-)a/Koha/Old/Recalls.pm (+60 lines)
Line 0 Link Here
1
package Koha::Old::Recalls;
2
3
# Copyright 2017 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use Koha::Database;
23
use Koha::Old::Recall;
24
25
use base qw( Koha::Objects );
26
27
=head1 NAME
28
29
Koha::Old::Recalls - Koha Old Recalls Object Set class
30
31
=head1 API
32
33
=head2 Class Methods
34
35
=cut
36
37
=head3 type
38
39
=cut
40
41
sub type {
42
    return 'OldRecall';
43
}
44
45
=head3 object_class
46
47
=cut
48
49
sub object_class {
50
    return 'Koha::Old::Recall';
51
}
52
53
=head1 AUTHOR
54
55
Aleisha Amohia <aleisha@catalyst.net.nz>
56
Catalyst IT
57
58
=cut
59
60
1;
(-)a/Koha/Recall.pm (+51 lines)
Line 0 Link Here
1
package Koha::Recall;
2
3
# Copyright 2017 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use Koha::Database;
23
24
use base qw( Koha::Object );
25
26
=head1 NAME
27
28
Koha::Recall - Koha Recall Object class
29
30
=head1 API
31
32
=head2 Class Methods
33
34
=cut
35
36
=head3 type
37
38
=cut
39
40
sub type {
41
    return 'Recall';
42
}
43
44
=head1 AUTHOR
45
46
Aleisha Amohia <aleisha@catalyst.net.nz>
47
Catalyst IT
48
49
=cut
50
51
1;
(-)a/Koha/Recalls.pm (+60 lines)
Line 0 Link Here
1
package Koha::Recalls;
2
3
# Copyright 2017 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use Koha::Database;
23
use Koha::Recall;
24
25
use base qw( Koha::Objects );
26
27
=head1 NAME
28
29
Koha::Recalls - Koha Recalls Object Set class
30
31
=head1 API
32
33
=head2 Class Methods
34
35
=cut
36
37
=head3 type
38
39
=cut
40
41
sub type {
42
    return 'Recall';
43
}
44
45
=head3 object_class
46
47
=cut
48
49
sub object_class {
50
    return 'Koha::Recall';
51
}
52
53
=head1 AUTHOR
54
55
Aleisha Amohia <aleisha@catalyst.net.nz>
56
Catalyst IT
57
58
=cut
59
60
1;
(-)a/Koha/Schema/Result/OldRecall.pm (+260 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::OldRecall;
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::OldRecall
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<old_recalls>
19
20
=cut
21
22
__PACKAGE__->table("old_recalls");
23
24
=head1 ACCESSORS
25
26
=head2 recall_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
  default_value: 0
36
  is_foreign_key: 1
37
  is_nullable: 1
38
39
=head2 recalldate
40
41
  data_type: 'date'
42
  datetime_undef_if_invalid: 1
43
  is_nullable: 1
44
45
=head2 biblionumber
46
47
  data_type: 'integer'
48
  default_value: 0
49
  is_foreign_key: 1
50
  is_nullable: 1
51
52
=head2 branchcode
53
54
  data_type: 'varchar'
55
  is_nullable: 1
56
  size: 10
57
58
=head2 cancellationdate
59
60
  data_type: 'date'
61
  datetime_undef_if_invalid: 1
62
  is_nullable: 1
63
64
=head2 recallnotes
65
66
  data_type: 'mediumtext'
67
  is_nullable: 1
68
69
=head2 priority
70
71
  data_type: 'smallint'
72
  is_nullable: 1
73
74
=head2 found
75
76
  data_type: 'varchar'
77
  is_nullable: 1
78
  size: 1
79
80
=head2 timestamp
81
82
  data_type: 'timestamp'
83
  datetime_undef_if_invalid: 1
84
  default_value: current_timestamp
85
  is_nullable: 0
86
87
=head2 itemnumber
88
89
  data_type: 'integer'
90
  is_foreign_key: 1
91
  is_nullable: 1
92
93
=head2 waitingdate
94
95
  data_type: 'date'
96
  datetime_undef_if_invalid: 1
97
  is_nullable: 1
98
99
=head2 expirationdate
100
101
  data_type: 'date'
102
  datetime_undef_if_invalid: 1
103
  is_nullable: 1
104
105
=head2 itemtype
106
107
  data_type: 'varchar'
108
  is_foreign_key: 1
109
  is_nullable: 1
110
  size: 10
111
112
=cut
113
114
__PACKAGE__->add_columns(
115
  "recall_id",
116
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
117
  "borrowernumber",
118
  {
119
    data_type      => "integer",
120
    default_value  => 0,
121
    is_foreign_key => 1,
122
    is_nullable    => 1,
123
  },
124
  "recalldate",
125
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
126
  "biblionumber",
127
  {
128
    data_type      => "integer",
129
    default_value  => 0,
130
    is_foreign_key => 1,
131
    is_nullable    => 1,
132
  },
133
  "branchcode",
134
  { data_type => "varchar", is_nullable => 1, size => 10 },
135
  "cancellationdate",
136
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
137
  "recallnotes",
138
  { data_type => "mediumtext", is_nullable => 1 },
139
  "priority",
140
  { data_type => "smallint", is_nullable => 1 },
141
  "found",
142
  { data_type => "varchar", is_nullable => 1, size => 1 },
143
  "timestamp",
144
  {
145
    data_type => "timestamp",
146
    datetime_undef_if_invalid => 1,
147
    default_value => \"current_timestamp",
148
    is_nullable => 0,
149
  },
150
  "itemnumber",
151
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
152
  "waitingdate",
153
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
154
  "expirationdate",
155
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
156
  "itemtype",
157
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
158
);
159
160
=head1 PRIMARY KEY
161
162
=over 4
163
164
=item * L</recall_id>
165
166
=back
167
168
=cut
169
170
__PACKAGE__->set_primary_key("recall_id");
171
172
=head1 RELATIONS
173
174
=head2 biblionumber
175
176
Type: belongs_to
177
178
Related object: L<Koha::Schema::Result::Biblio>
179
180
=cut
181
182
__PACKAGE__->belongs_to(
183
  "biblionumber",
184
  "Koha::Schema::Result::Biblio",
185
  { biblionumber => "biblionumber" },
186
  {
187
    is_deferrable => 1,
188
    join_type     => "LEFT",
189
    on_delete     => "SET NULL",
190
    on_update     => "SET NULL",
191
  },
192
);
193
194
=head2 borrowernumber
195
196
Type: belongs_to
197
198
Related object: L<Koha::Schema::Result::Borrower>
199
200
=cut
201
202
__PACKAGE__->belongs_to(
203
  "borrowernumber",
204
  "Koha::Schema::Result::Borrower",
205
  { borrowernumber => "borrowernumber" },
206
  {
207
    is_deferrable => 1,
208
    join_type     => "LEFT",
209
    on_delete     => "SET NULL",
210
    on_update     => "SET NULL",
211
  },
212
);
213
214
=head2 itemnumber
215
216
Type: belongs_to
217
218
Related object: L<Koha::Schema::Result::Item>
219
220
=cut
221
222
__PACKAGE__->belongs_to(
223
  "itemnumber",
224
  "Koha::Schema::Result::Item",
225
  { itemnumber => "itemnumber" },
226
  {
227
    is_deferrable => 1,
228
    join_type     => "LEFT",
229
    on_delete     => "SET NULL",
230
    on_update     => "SET NULL",
231
  },
232
);
233
234
=head2 itemtype
235
236
Type: belongs_to
237
238
Related object: L<Koha::Schema::Result::Itemtype>
239
240
=cut
241
242
__PACKAGE__->belongs_to(
243
  "itemtype",
244
  "Koha::Schema::Result::Itemtype",
245
  { itemtype => "itemtype" },
246
  {
247
    is_deferrable => 1,
248
    join_type     => "LEFT",
249
    on_delete     => "SET NULL",
250
    on_update     => "SET NULL",
251
  },
252
);
253
254
255
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-25 23:50:29
256
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:afOsAbeAPcdHR79LfYH9Hg
257
258
259
# You can replace this text with custom code or comments, and it will be preserved on regeneration
260
1;
(-)a/Koha/Schema/Result/Recall.pm (-1 / +271 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::Recall;
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::Recall
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<recalls>
19
20
=cut
21
22
__PACKAGE__->table("recalls");
23
24
=head1 ACCESSORS
25
26
=head2 recall_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
  default_value: 0
36
  is_foreign_key: 1
37
  is_nullable: 0
38
39
=head2 recalldate
40
41
  data_type: 'date'
42
  datetime_undef_if_invalid: 1
43
  is_nullable: 1
44
45
=head2 biblionumber
46
47
  data_type: 'integer'
48
  default_value: 0
49
  is_foreign_key: 1
50
  is_nullable: 0
51
52
=head2 branchcode
53
54
  data_type: 'varchar'
55
  is_foreign_key: 1
56
  is_nullable: 1
57
  size: 10
58
59
=head2 cancellationdate
60
61
  data_type: 'date'
62
  datetime_undef_if_invalid: 1
63
  is_nullable: 1
64
65
=head2 recallnotes
66
67
  data_type: 'mediumtext'
68
  is_nullable: 1
69
70
=head2 priority
71
72
  data_type: 'smallint'
73
  is_nullable: 1
74
75
=head2 found
76
77
  data_type: 'varchar'
78
  is_nullable: 1
79
  size: 1
80
81
=head2 timestamp
82
83
  data_type: 'timestamp'
84
  datetime_undef_if_invalid: 1
85
  default_value: current_timestamp
86
  is_nullable: 0
87
88
=head2 itemnumber
89
90
  data_type: 'integer'
91
  is_foreign_key: 1
92
  is_nullable: 1
93
94
=head2 waitingdate
95
96
  data_type: 'date'
97
  datetime_undef_if_invalid: 1
98
  is_nullable: 1
99
100
=head2 expirationdate
101
102
  data_type: 'date'
103
  datetime_undef_if_invalid: 1
104
  is_nullable: 1
105
106
=head2 itemtype
107
108
  data_type: 'varchar'
109
  is_foreign_key: 1
110
  is_nullable: 1
111
  size: 10
112
113
=cut
114
115
__PACKAGE__->add_columns(
116
  "recall_id",
117
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
118
  "borrowernumber",
119
  {
120
    data_type      => "integer",
121
    default_value  => 0,
122
    is_foreign_key => 1,
123
    is_nullable    => 0,
124
  },
125
  "recalldate",
126
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
127
  "biblionumber",
128
  {
129
    data_type      => "integer",
130
    default_value  => 0,
131
    is_foreign_key => 1,
132
    is_nullable    => 0,
133
  },
134
  "branchcode",
135
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
136
  "cancellationdate",
137
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
138
  "recallnotes",
139
  { data_type => "mediumtext", is_nullable => 1 },
140
  "priority",
141
  { data_type => "smallint", is_nullable => 1 },
142
  "found",
143
  { data_type => "varchar", is_nullable => 1, size => 1 },
144
  "timestamp",
145
  {
146
    data_type => "timestamp",
147
    datetime_undef_if_invalid => 1,
148
    default_value => \"current_timestamp",
149
    is_nullable => 0,
150
  },
151
  "itemnumber",
152
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
153
  "waitingdate",
154
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
155
  "expirationdate",
156
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
157
  "itemtype",
158
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
159
);
160
161
=head1 PRIMARY KEY
162
163
=over 4
164
165
=item * L</recall_id>
166
167
=back
168
169
=cut
170
171
__PACKAGE__->set_primary_key("recall_id");
172
173
=head1 RELATIONS
174
175
=head2 biblionumber
176
177
Type: belongs_to
178
179
Related object: L<Koha::Schema::Result::Biblio>
180
181
=cut
182
183
__PACKAGE__->belongs_to(
184
  "biblionumber",
185
  "Koha::Schema::Result::Biblio",
186
  { biblionumber => "biblionumber" },
187
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
188
);
189
190
=head2 borrowernumber
191
192
Type: belongs_to
193
194
Related object: L<Koha::Schema::Result::Borrower>
195
196
=cut
197
198
__PACKAGE__->belongs_to(
199
  "borrowernumber",
200
  "Koha::Schema::Result::Borrower",
201
  { borrowernumber => "borrowernumber" },
202
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
203
);
204
205
=head2 branchcode
206
207
Type: belongs_to
208
209
Related object: L<Koha::Schema::Result::Branch>
210
211
=cut
212
213
__PACKAGE__->belongs_to(
214
  "branchcode",
215
  "Koha::Schema::Result::Branch",
216
  { branchcode => "branchcode" },
217
  {
218
    is_deferrable => 1,
219
    join_type     => "LEFT",
220
    on_delete     => "CASCADE",
221
    on_update     => "CASCADE",
222
  },
223
);
224
225
=head2 itemnumber
226
227
Type: belongs_to
228
229
Related object: L<Koha::Schema::Result::Item>
230
231
=cut
232
233
__PACKAGE__->belongs_to(
234
  "itemnumber",
235
  "Koha::Schema::Result::Item",
236
  { itemnumber => "itemnumber" },
237
  {
238
    is_deferrable => 1,
239
    join_type     => "LEFT",
240
    on_delete     => "CASCADE",
241
    on_update     => "CASCADE",
242
  },
243
);
244
245
=head2 itemtype
246
247
Type: belongs_to
248
249
Related object: L<Koha::Schema::Result::Itemtype>
250
251
=cut
252
253
__PACKAGE__->belongs_to(
254
  "itemtype",
255
  "Koha::Schema::Result::Itemtype",
256
  { itemtype => "itemtype" },
257
  {
258
    is_deferrable => 1,
259
    join_type     => "LEFT",
260
    on_delete     => "CASCADE",
261
    on_update     => "CASCADE",
262
  },
263
);
264
265
266
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-25 23:50:29
267
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0dtkOcX0Cuc8MdpKxhcPUA
268
269
270
# You can replace this text with custom code or comments, and it will be preserved on regeneration
271
1;

Return to bug 19532