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 231-236 Is the hold placed at item level Link Here
231
231
232
Is this a non priority hold
232
Is this a non priority hold
233
233
234
=head2 hold_group_id
235
236
  data_type: 'integer'
237
  extra: {unsigned => 1}
238
  is_foreign_key: 1
239
  is_nullable: 1
240
241
The id of a group of titles reservations fulfilled when one title is picked
242
234
=cut
243
=cut
235
244
236
__PACKAGE__->add_columns(
245
__PACKAGE__->add_columns(
Lines 300-305 __PACKAGE__->add_columns( Link Here
300
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
309
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
301
  "non_priority",
310
  "non_priority",
302
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
311
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
312
  "hold_group_id",
313
  {
314
    data_type => "integer",
315
    extra => { unsigned => 1 },
316
    is_foreign_key => 1,
317
    is_nullable => 1,
318
  },
303
);
319
);
304
320
305
=head1 PRIMARY KEY
321
=head1 PRIMARY KEY
Lines 396-401 __PACKAGE__->belongs_to( Link Here
396
  },
412
  },
397
);
413
);
398
414
415
=head2 hold_group
416
417
Type: belongs_to
418
419
Related object: L<Koha::Schema::Result::HoldGroup>
420
421
=cut
422
423
__PACKAGE__->belongs_to(
424
  "hold_group",
425
  "Koha::Schema::Result::HoldGroup",
426
  { hold_group_id => "hold_group_id" },
427
  {
428
    is_deferrable => 1,
429
    join_type     => "LEFT",
430
    on_delete     => "SET NULL",
431
    on_update     => "SET NULL",
432
  },
433
);
434
399
=head2 itemnumber
435
=head2 itemnumber
400
436
401
Type: belongs_to
437
Type: belongs_to
(-)a/Koha/Schema/Result/Reserve.pm (-1 / +36 lines)
Lines 229-234 Is the hold placed at item level Link Here
229
229
230
Is this a non priority hold
230
Is this a non priority hold
231
231
232
=head2 hold_group_id
233
234
  data_type: 'integer'
235
  extra: {unsigned => 1}
236
  is_foreign_key: 1
237
  is_nullable: 1
238
239
The id of a group of titles reservations fulfilled when one title is picked
240
232
=cut
241
=cut
233
242
234
__PACKAGE__->add_columns(
243
__PACKAGE__->add_columns(
Lines 308-313 __PACKAGE__->add_columns( Link Here
308
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
317
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
309
  "non_priority",
318
  "non_priority",
310
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
319
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
320
  "hold_group_id",
321
  {
322
    data_type => "integer",
323
    extra => { unsigned => 1 },
324
    is_foreign_key => 1,
325
    is_nullable => 1,
326
  },
311
);
327
);
312
328
313
=head1 PRIMARY KEY
329
=head1 PRIMARY KEY
Lines 424-429 __PACKAGE__->belongs_to( Link Here
424
  },
440
  },
425
);
441
);
426
442
443
=head2 hold_group
444
445
Type: belongs_to
446
447
Related object: L<Koha::Schema::Result::HoldGroup>
448
449
=cut
450
451
__PACKAGE__->belongs_to(
452
  "hold_group",
453
  "Koha::Schema::Result::HoldGroup",
454
  { hold_group_id => "hold_group_id" },
455
  {
456
    is_deferrable => 1,
457
    join_type     => "LEFT",
458
    on_delete     => "SET NULL",
459
    on_update     => "CASCADE",
460
  },
461
);
462
427
=head2 itemnumber
463
=head2 itemnumber
428
464
429
Type: belongs_to
465
Type: belongs_to
430
- 

Return to bug 15516