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

(-)a/Koha/Schema/Result/HoldGroup.pm (+95 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::HoldGroup;
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::HoldGroup
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<hold_groups>
19
20
=cut
21
22
__PACKAGE__->table("hold_groups");
23
24
=head1 ACCESSORS
25
26
=head2 hold_group_id
27
28
  data_type: 'integer'
29
  extra: {unsigned => 1}
30
  is_auto_increment: 1
31
  is_nullable: 0
32
33
=cut
34
35
__PACKAGE__->add_columns(
36
  "hold_group_id",
37
  {
38
    data_type => "integer",
39
    extra => { unsigned => 1 },
40
    is_auto_increment => 1,
41
    is_nullable => 0,
42
  },
43
);
44
45
=head1 PRIMARY KEY
46
47
=over 4
48
49
=item * L</hold_group_id>
50
51
=back
52
53
=cut
54
55
__PACKAGE__->set_primary_key("hold_group_id");
56
57
=head1 RELATIONS
58
59
=head2 old_reserves
60
61
Type: has_many
62
63
Related object: L<Koha::Schema::Result::OldReserve>
64
65
=cut
66
67
__PACKAGE__->has_many(
68
  "old_reserves",
69
  "Koha::Schema::Result::OldReserve",
70
  { "foreign.hold_group_id" => "self.hold_group_id" },
71
  { cascade_copy => 0, cascade_delete => 0 },
72
);
73
74
=head2 reserves
75
76
Type: has_many
77
78
Related object: L<Koha::Schema::Result::Reserve>
79
80
=cut
81
82
__PACKAGE__->has_many(
83
  "reserves",
84
  "Koha::Schema::Result::Reserve",
85
  { "foreign.hold_group_id" => "self.hold_group_id" },
86
  { cascade_copy => 0, cascade_delete => 0 },
87
);
88
89
90
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2022-08-04 14:43:31
91
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5Xzfn2C7H+Z8R9PUBPFkYw
92
93
94
# You can replace this text with custom code or comments, and it will be preserved on regeneration
95
1;
(-)a/Koha/Schema/Result/OldReserve.pm (+36 lines)
Lines 223-228 Is the hold placed at item level Link Here
223
223
224
Is this a non priority hold
224
Is this a non priority hold
225
225
226
=head2 hold_group_id
227
228
  data_type: 'integer'
229
  extra: {unsigned => 1}
230
  is_foreign_key: 1
231
  is_nullable: 1
232
233
The id of a group of titles reservations fulfilled when one title is picked
234
226
=cut
235
=cut
227
236
228
__PACKAGE__->add_columns(
237
__PACKAGE__->add_columns(
Lines 290-295 __PACKAGE__->add_columns( Link Here
290
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
299
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
291
  "non_priority",
300
  "non_priority",
292
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
301
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
302
  "hold_group_id",
303
  {
304
    data_type => "integer",
305
    extra => { unsigned => 1 },
306
    is_foreign_key => 1,
307
    is_nullable => 1,
308
  },
293
);
309
);
294
310
295
=head1 PRIMARY KEY
311
=head1 PRIMARY KEY
Lines 366-371 __PACKAGE__->belongs_to( Link Here
366
  },
382
  },
367
);
383
);
368
384
385
=head2 hold_group
386
387
Type: belongs_to
388
389
Related object: L<Koha::Schema::Result::HoldGroup>
390
391
=cut
392
393
__PACKAGE__->belongs_to(
394
  "hold_group",
395
  "Koha::Schema::Result::HoldGroup",
396
  { hold_group_id => "hold_group_id" },
397
  {
398
    is_deferrable => 1,
399
    join_type     => "LEFT",
400
    on_delete     => "SET NULL",
401
    on_update     => "SET NULL",
402
  },
403
);
404
369
=head2 itemnumber
405
=head2 itemnumber
370
406
371
Type: belongs_to
407
Type: belongs_to
(-)a/Koha/Schema/Result/Reserve.pm (-1 / +36 lines)
Lines 222-227 Is the hold placed at item level Link Here
222
222
223
Is this a non priority hold
223
Is this a non priority hold
224
224
225
=head2 hold_group_id
226
227
  data_type: 'integer'
228
  extra: {unsigned => 1}
229
  is_foreign_key: 1
230
  is_nullable: 1
231
232
The id of a group of titles reservations fulfilled when one title is picked
233
225
=cut
234
=cut
226
235
227
__PACKAGE__->add_columns(
236
__PACKAGE__->add_columns(
Lines 299-304 __PACKAGE__->add_columns( Link Here
299
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
308
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
300
  "non_priority",
309
  "non_priority",
301
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
310
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
311
  "hold_group_id",
312
  {
313
    data_type => "integer",
314
    extra => { unsigned => 1 },
315
    is_foreign_key => 1,
316
    is_nullable => 1,
317
  },
302
);
318
);
303
319
304
=head1 PRIMARY KEY
320
=head1 PRIMARY KEY
Lines 415-420 __PACKAGE__->belongs_to( Link Here
415
  },
431
  },
416
);
432
);
417
433
434
=head2 hold_group
435
436
Type: belongs_to
437
438
Related object: L<Koha::Schema::Result::HoldGroup>
439
440
=cut
441
442
__PACKAGE__->belongs_to(
443
  "hold_group",
444
  "Koha::Schema::Result::HoldGroup",
445
  { hold_group_id => "hold_group_id" },
446
  {
447
    is_deferrable => 1,
448
    join_type     => "LEFT",
449
    on_delete     => "SET NULL",
450
    on_update     => "CASCADE",
451
  },
452
);
453
418
=head2 itemnumber
454
=head2 itemnumber
419
455
420
Type: belongs_to
456
Type: belongs_to
421
- 

Return to bug 15516