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

(-)a/Koha/Schema/Result/Biblio.pm (-3 / +3 lines)
Lines 386-392 Related object: L<Koha::Schema::Result::Recall> Link Here
386
__PACKAGE__->has_many(
386
__PACKAGE__->has_many(
387
  "recalls",
387
  "recalls",
388
  "Koha::Schema::Result::Recall",
388
  "Koha::Schema::Result::Recall",
389
  { "foreign.biblionumber" => "self.biblionumber" },
389
  { "foreign.biblio_id" => "self.biblionumber" },
390
  { cascade_copy => 0, cascade_delete => 0 },
390
  { cascade_copy => 0, cascade_delete => 0 },
391
);
391
);
392
392
Lines 541-548 __PACKAGE__->has_many( Link Here
541
);
541
);
542
542
543
543
544
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-10-14 15:07:03
544
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2022-03-28 22:07:59
545
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6YO2t5VoWcG/tM+8uOP/wg
545
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sh8waM4ivuiNao0VV5403Q
546
546
547
__PACKAGE__->has_many(
547
__PACKAGE__->has_many(
548
  "biblioitem",
548
  "biblioitem",
(-)a/Koha/Schema/Result/Borrower.pm (-3 / +3 lines)
Lines 1595-1601 Related object: L<Koha::Schema::Result::Recall> Link Here
1595
__PACKAGE__->has_many(
1595
__PACKAGE__->has_many(
1596
  "recalls",
1596
  "recalls",
1597
  "Koha::Schema::Result::Recall",
1597
  "Koha::Schema::Result::Recall",
1598
  { "foreign.borrowernumber" => "self.borrowernumber" },
1598
  { "foreign.patron_id" => "self.borrowernumber" },
1599
  { cascade_copy => 0, cascade_delete => 0 },
1599
  { cascade_copy => 0, cascade_delete => 0 },
1600
);
1600
);
1601
1601
Lines 1955-1962 Composing rels: L</user_permissions> -> permission Link Here
1955
__PACKAGE__->many_to_many("permissions", "user_permissions", "permission");
1955
__PACKAGE__->many_to_many("permissions", "user_permissions", "permission");
1956
1956
1957
1957
1958
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-24 10:20:07
1958
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-04-29 11:09:16
1959
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:srYT5wjg7Jhy5CpmDjWv/g
1959
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pQqp6+XsKkDrnO57fQ9dmg
1960
1960
1961
__PACKAGE__->has_many(
1961
__PACKAGE__->has_many(
1962
  "extended_attributes",
1962
  "extended_attributes",
(-)a/Koha/Schema/Result/Branch.pm (-3 / +3 lines)
Lines 772-778 Related object: L<Koha::Schema::Result::Recall> Link Here
772
__PACKAGE__->has_many(
772
__PACKAGE__->has_many(
773
  "recalls",
773
  "recalls",
774
  "Koha::Schema::Result::Recall",
774
  "Koha::Schema::Result::Recall",
775
  { "foreign.branchcode" => "self.branchcode" },
775
  { "foreign.pickup_library_id" => "self.branchcode" },
776
  { cascade_copy => 0, cascade_delete => 0 },
776
  { cascade_copy => 0, cascade_delete => 0 },
777
);
777
);
778
778
Lines 882-889 __PACKAGE__->has_many( Link Here
882
);
882
);
883
883
884
884
885
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2022-02-15 02:16:34
885
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2022-03-28 22:07:59
886
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PR2GOpldAnNtyB2DRLsE9g
886
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Kpv55lV6FRGoxxu5nufXhg
887
887
888
__PACKAGE__->add_columns(
888
__PACKAGE__->add_columns(
889
    '+pickup_location' => { is_boolean => 1 },
889
    '+pickup_location' => { is_boolean => 1 },
(-)a/Koha/Schema/Result/Item.pm (-3 / +3 lines)
Lines 800-806 Related object: L<Koha::Schema::Result::Recall> Link Here
800
__PACKAGE__->has_many(
800
__PACKAGE__->has_many(
801
  "recalls",
801
  "recalls",
802
  "Koha::Schema::Result::Recall",
802
  "Koha::Schema::Result::Recall",
803
  { "foreign.itemnumber" => "self.itemnumber" },
803
  { "foreign.item_id" => "self.itemnumber" },
804
  { cascade_copy => 0, cascade_delete => 0 },
804
  { cascade_copy => 0, cascade_delete => 0 },
805
);
805
);
806
806
Lines 880-887 __PACKAGE__->has_many( Link Here
880
);
880
);
881
881
882
882
883
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-10-14 15:07:03
883
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2022-03-28 22:07:59
884
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yRbholcHil9qRF5t+83jdA
884
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:28f9/7z3Nq5C4qzBMyceiQ
885
885
886
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
886
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
887
887
(-)a/Koha/Schema/Result/Recall.pm (-78 / +81 lines)
Lines 6-12 package Koha::Schema::Result::Recall; Link Here
6
6
7
=head1 NAME
7
=head1 NAME
8
8
9
Koha::Schema::Result::Recall
9
Koha::Schema::Result::Recall - Information related to recalls in Koha
10
10
11
=cut
11
=cut
12
12
Lines 29-77 __PACKAGE__->table("recalls"); Link Here
29
  is_auto_increment: 1
29
  is_auto_increment: 1
30
  is_nullable: 0
30
  is_nullable: 0
31
31
32
=head2 borrowernumber
32
Unique identifier for this recall
33
34
=head2 patron_id
33
35
34
  data_type: 'integer'
36
  data_type: 'integer'
35
  default_value: 0
37
  default_value: 0
36
  is_foreign_key: 1
38
  is_foreign_key: 1
37
  is_nullable: 0
39
  is_nullable: 0
38
40
39
=head2 recalldate
41
Identifier for patron who requested recall
42
43
=head2 created_date
40
44
41
  data_type: 'datetime'
45
  data_type: 'datetime'
42
  datetime_undef_if_invalid: 1
46
  datetime_undef_if_invalid: 1
43
  is_nullable: 1
47
  is_nullable: 1
44
48
45
=head2 biblionumber
49
Date the recall was requested
50
51
=head2 biblio_id
46
52
47
  data_type: 'integer'
53
  data_type: 'integer'
48
  default_value: 0
54
  default_value: 0
49
  is_foreign_key: 1
55
  is_foreign_key: 1
50
  is_nullable: 0
56
  is_nullable: 0
51
57
52
=head2 branchcode
58
Identifier for bibliographic record that has been recalled
59
60
=head2 pickup_library_id
53
61
54
  data_type: 'varchar'
62
  data_type: 'varchar'
55
  is_foreign_key: 1
63
  is_foreign_key: 1
56
  is_nullable: 1
64
  is_nullable: 1
57
  size: 10
65
  size: 10
58
66
59
=head2 cancellationdate
67
Identifier for recall pickup library
68
69
=head2 completed_date
60
70
61
  data_type: 'datetime'
71
  data_type: 'datetime'
62
  datetime_undef_if_invalid: 1
72
  datetime_undef_if_invalid: 1
63
  is_nullable: 1
73
  is_nullable: 1
64
74
65
=head2 recallnotes
75
Date the recall is completed (fulfilled, cancelled or expired)
76
77
=head2 notes
66
78
67
  data_type: 'mediumtext'
79
  data_type: 'mediumtext'
68
  is_nullable: 1
80
  is_nullable: 1
69
81
82
Notes related to the recall
83
70
=head2 priority
84
=head2 priority
71
85
72
  data_type: 'smallint'
86
  data_type: 'smallint'
73
  is_nullable: 1
87
  is_nullable: 1
74
88
89
Where in the queue the patron sits
90
75
=head2 status
91
=head2 status
76
92
77
  data_type: 'enum'
93
  data_type: 'enum'
Lines 79-84 __PACKAGE__->table("recalls"); Link Here
79
  extra: {list => ["requested","overdue","waiting","in_transit","cancelled","expired","fulfilled"]}
95
  extra: {list => ["requested","overdue","waiting","in_transit","cancelled","expired","fulfilled"]}
80
  is_nullable: 1
96
  is_nullable: 1
81
97
98
Status of recall
99
82
=head2 timestamp
100
=head2 timestamp
83
101
84
  data_type: 'timestamp'
102
  data_type: 'timestamp'
Lines 86-155 __PACKAGE__->table("recalls"); Link Here
86
  default_value: current_timestamp
104
  default_value: current_timestamp
87
  is_nullable: 0
105
  is_nullable: 0
88
106
89
=head2 itemnumber
107
Date and time the recall was last updated
108
109
=head2 item_id
90
110
91
  data_type: 'integer'
111
  data_type: 'integer'
92
  is_foreign_key: 1
112
  is_foreign_key: 1
93
  is_nullable: 1
113
  is_nullable: 1
94
114
95
=head2 waitingdate
115
Identifier for item record that was recalled, if an item-level recall
116
117
=head2 waiting_date
96
118
97
  data_type: 'datetime'
119
  data_type: 'datetime'
98
  datetime_undef_if_invalid: 1
120
  datetime_undef_if_invalid: 1
99
  is_nullable: 1
121
  is_nullable: 1
100
122
101
=head2 expirationdate
123
Date an item was marked as waiting for the patron at the library
124
125
=head2 expiration_date
102
126
103
  data_type: 'datetime'
127
  data_type: 'datetime'
104
  datetime_undef_if_invalid: 1
128
  datetime_undef_if_invalid: 1
105
  is_nullable: 1
129
  is_nullable: 1
106
130
107
=head2 old
131
Date recall is no longer required, or date recall will expire after waiting on shelf for pickup
132
133
=head2 completed
108
134
109
  data_type: 'tinyint'
135
  data_type: 'tinyint'
110
  default_value: 0
136
  default_value: 0
111
  is_nullable: 0
137
  is_nullable: 0
112
138
113
=head2 item_level_recall
139
Flag if recall is old and no longer active, i.e. expired, cancelled or completed
140
141
=head2 item_level
114
142
115
  data_type: 'tinyint'
143
  data_type: 'tinyint'
116
  default_value: 0
144
  default_value: 0
117
  is_nullable: 0
145
  is_nullable: 0
118
146
147
Flag if recall is for a specific item
148
119
=cut
149
=cut
120
150
121
__PACKAGE__->add_columns(
151
__PACKAGE__->add_columns(
122
  "recall_id",
152
  "recall_id",
123
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
153
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
124
  "borrowernumber",
154
  "patron_id",
125
  {
155
  {
126
    data_type      => "integer",
156
    data_type      => "integer",
127
    default_value  => 0,
157
    default_value  => 0,
128
    is_foreign_key => 1,
158
    is_foreign_key => 1,
129
    is_nullable    => 0,
159
    is_nullable    => 0,
130
  },
160
  },
131
  "recalldate",
161
  "created_date",
132
  {
162
  {
133
    data_type => "datetime",
163
    data_type => "datetime",
134
    datetime_undef_if_invalid => 1,
164
    datetime_undef_if_invalid => 1,
135
    is_nullable => 1,
165
    is_nullable => 1,
136
  },
166
  },
137
  "biblionumber",
167
  "biblio_id",
138
  {
168
  {
139
    data_type      => "integer",
169
    data_type      => "integer",
140
    default_value  => 0,
170
    default_value  => 0,
141
    is_foreign_key => 1,
171
    is_foreign_key => 1,
142
    is_nullable    => 0,
172
    is_nullable    => 0,
143
  },
173
  },
144
  "branchcode",
174
  "pickup_library_id",
145
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
175
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
146
  "cancellationdate",
176
  "completed_date",
147
  {
177
  {
148
    data_type => "datetime",
178
    data_type => "datetime",
149
    datetime_undef_if_invalid => 1,
179
    datetime_undef_if_invalid => 1,
150
    is_nullable => 1,
180
    is_nullable => 1,
151
  },
181
  },
152
  "recallnotes",
182
  "notes",
153
  { data_type => "mediumtext", is_nullable => 1 },
183
  { data_type => "mediumtext", is_nullable => 1 },
154
  "priority",
184
  "priority",
155
  { data_type => "smallint", is_nullable => 1 },
185
  { data_type => "smallint", is_nullable => 1 },
Lines 177-199 __PACKAGE__->add_columns( Link Here
177
    default_value => \"current_timestamp",
207
    default_value => \"current_timestamp",
178
    is_nullable => 0,
208
    is_nullable => 0,
179
  },
209
  },
180
  "itemnumber",
210
  "item_id",
181
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
211
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
182
  "waitingdate",
212
  "waiting_date",
183
  {
213
  {
184
    data_type => "datetime",
214
    data_type => "datetime",
185
    datetime_undef_if_invalid => 1,
215
    datetime_undef_if_invalid => 1,
186
    is_nullable => 1,
216
    is_nullable => 1,
187
  },
217
  },
188
  "expirationdate",
218
  "expiration_date",
189
  {
219
  {
190
    data_type => "datetime",
220
    data_type => "datetime",
191
    datetime_undef_if_invalid => 1,
221
    datetime_undef_if_invalid => 1,
192
    is_nullable => 1,
222
    is_nullable => 1,
193
  },
223
  },
194
  "old",
224
  "completed",
195
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
225
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
196
  "item_level_recall",
226
  "item_level",
197
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
227
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
198
);
228
);
199
229
Lines 211-217 __PACKAGE__->set_primary_key("recall_id"); Link Here
211
241
212
=head1 RELATIONS
242
=head1 RELATIONS
213
243
214
=head2 biblionumber
244
=head2 biblio
215
245
216
Type: belongs_to
246
Type: belongs_to
217
247
Lines 220-278 Related object: L<Koha::Schema::Result::Biblio> Link Here
220
=cut
250
=cut
221
251
222
__PACKAGE__->belongs_to(
252
__PACKAGE__->belongs_to(
223
  "biblionumber",
253
  "biblio",
224
  "Koha::Schema::Result::Biblio",
254
  "Koha::Schema::Result::Biblio",
225
  { biblionumber => "biblionumber" },
255
  { biblionumber => "biblio_id" },
226
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
256
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
227
);
257
);
228
258
229
=head2 borrowernumber
259
=head2 item
230
260
231
Type: belongs_to
261
Type: belongs_to
232
262
233
Related object: L<Koha::Schema::Result::Borrower>
263
Related object: L<Koha::Schema::Result::Item>
234
264
235
=cut
265
=cut
236
266
237
__PACKAGE__->belongs_to(
267
__PACKAGE__->belongs_to(
238
  "borrowernumber",
268
  "item",
239
  "Koha::Schema::Result::Borrower",
269
  "Koha::Schema::Result::Item",
240
  { borrowernumber => "borrowernumber" },
270
  { itemnumber => "item_id" },
241
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
271
  {
272
    is_deferrable => 1,
273
    join_type     => "LEFT",
274
    on_delete     => "CASCADE",
275
    on_update     => "CASCADE",
276
  },
242
);
277
);
243
278
244
=head2 branchcode
279
=head2 patron
245
280
246
Type: belongs_to
281
Type: belongs_to
247
282
248
Related object: L<Koha::Schema::Result::Branch>
283
Related object: L<Koha::Schema::Result::Borrower>
249
284
250
=cut
285
=cut
251
286
252
__PACKAGE__->belongs_to(
287
__PACKAGE__->belongs_to(
253
  "branchcode",
288
  "patron",
254
  "Koha::Schema::Result::Branch",
289
  "Koha::Schema::Result::Borrower",
255
  { branchcode => "branchcode" },
290
  { borrowernumber => "patron_id" },
256
  {
291
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
257
    is_deferrable => 1,
258
    join_type     => "LEFT",
259
    on_delete     => "CASCADE",
260
    on_update     => "CASCADE",
261
  },
262
);
292
);
263
293
264
=head2 itemnumber
294
=head2 pickup_library
265
295
266
Type: belongs_to
296
Type: belongs_to
267
297
268
Related object: L<Koha::Schema::Result::Item>
298
Related object: L<Koha::Schema::Result::Branch>
269
299
270
=cut
300
=cut
271
301
272
__PACKAGE__->belongs_to(
302
__PACKAGE__->belongs_to(
273
  "itemnumber",
303
  "pickup_library",
274
  "Koha::Schema::Result::Item",
304
  "Koha::Schema::Result::Branch",
275
  { itemnumber => "itemnumber" },
305
  { branchcode => "pickup_library_id" },
276
  {
306
  {
277
    is_deferrable => 1,
307
    is_deferrable => 1,
278
    join_type     => "LEFT",
308
    join_type     => "LEFT",
Lines 282-325 __PACKAGE__->belongs_to( Link Here
282
);
312
);
283
313
284
314
285
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-23 19:53:39
315
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-04-29 11:14:14
286
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6DbEjtt5g6QY6VuCqrMleg
316
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lUgwwMxaStiOS7pHL0UGJA
287
317
288
__PACKAGE__->add_columns(
318
__PACKAGE__->add_columns(
289
    '+completed' => { is_boolean => 1 },
319
    '+completed' => { is_boolean => 1 },
290
    '+item_level' => { is_boolean => 1 },
320
    '+item_level' => { is_boolean => 1 },
291
);
321
);
292
322
293
__PACKAGE__->belongs_to(
294
  "biblio",
295
  "Koha::Schema::Result::Biblio",
296
  { biblionumber => "biblionumber" },
297
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
298
);
299
300
__PACKAGE__->belongs_to(
301
  "item",
302
  "Koha::Schema::Result::Item",
303
  { itemnumber => "itemnumber" },
304
  {
305
    is_deferrable => 1,
306
    join_type     => "LEFT",
307
    on_delete     => "CASCADE",
308
    on_update     => "CASCADE",
309
  },
310
);
311
312
__PACKAGE__->belongs_to(
313
  "patron",
314
  "Koha::Schema::Result::Borrower",
315
  { borrowernumber => "borrowernumber" },
316
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
317
);
318
319
__PACKAGE__->belongs_to(
323
__PACKAGE__->belongs_to(
320
  "library",
324
  "library",
321
  "Koha::Schema::Result::Branch",
325
  "Koha::Schema::Result::Branch",
322
  { branchcode => "branchcode" },
326
  { branchcode => "pickup_library_id" },
323
  {
327
  {
324
    is_deferrable => 1,
328
    is_deferrable => 1,
325
    join_type     => "LEFT",
329
    join_type     => "LEFT",
326
- 

Return to bug 30291