|
Line 0
Link Here
|
|
|
1 |
use utf8; |
| 2 |
package Koha::Schema::Result::HoldGroupTargetHold; |
| 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::HoldGroupTargetHold |
| 10 |
|
| 11 |
=cut |
| 12 |
|
| 13 |
use strict; |
| 14 |
use warnings; |
| 15 |
|
| 16 |
use base 'DBIx::Class::Core'; |
| 17 |
|
| 18 |
=head1 TABLE: C<hold_group_target_holds> |
| 19 |
|
| 20 |
=cut |
| 21 |
|
| 22 |
__PACKAGE__->table("hold_group_target_holds"); |
| 23 |
|
| 24 |
=head1 ACCESSORS |
| 25 |
|
| 26 |
=head2 hold_group_id |
| 27 |
|
| 28 |
data_type: 'integer' |
| 29 |
extra: {unsigned => 1} |
| 30 |
is_foreign_key: 1 |
| 31 |
is_nullable: 0 |
| 32 |
|
| 33 |
foreign key, linking this to the hold_groups table |
| 34 |
|
| 35 |
=head2 reserve_id |
| 36 |
|
| 37 |
data_type: 'integer' |
| 38 |
is_foreign_key: 1 |
| 39 |
is_nullable: 0 |
| 40 |
|
| 41 |
foreign key, linking this to the reserves table |
| 42 |
|
| 43 |
=cut |
| 44 |
|
| 45 |
__PACKAGE__->add_columns( |
| 46 |
"hold_group_id", |
| 47 |
{ |
| 48 |
data_type => "integer", |
| 49 |
extra => { unsigned => 1 }, |
| 50 |
is_foreign_key => 1, |
| 51 |
is_nullable => 0, |
| 52 |
}, |
| 53 |
"reserve_id", |
| 54 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
| 55 |
); |
| 56 |
|
| 57 |
=head1 PRIMARY KEY |
| 58 |
|
| 59 |
=over 4 |
| 60 |
|
| 61 |
=item * L</hold_group_id> |
| 62 |
|
| 63 |
=item * L</reserve_id> |
| 64 |
|
| 65 |
=back |
| 66 |
|
| 67 |
=cut |
| 68 |
|
| 69 |
__PACKAGE__->set_primary_key("hold_group_id", "reserve_id"); |
| 70 |
|
| 71 |
=head1 UNIQUE CONSTRAINTS |
| 72 |
|
| 73 |
=head2 C<hold_group_id> |
| 74 |
|
| 75 |
=over 4 |
| 76 |
|
| 77 |
=item * L</hold_group_id> |
| 78 |
|
| 79 |
=back |
| 80 |
|
| 81 |
=cut |
| 82 |
|
| 83 |
__PACKAGE__->add_unique_constraint("hold_group_id", ["hold_group_id"]); |
| 84 |
|
| 85 |
=head2 C<reserve_id> |
| 86 |
|
| 87 |
=over 4 |
| 88 |
|
| 89 |
=item * L</reserve_id> |
| 90 |
|
| 91 |
=back |
| 92 |
|
| 93 |
=cut |
| 94 |
|
| 95 |
__PACKAGE__->add_unique_constraint("reserve_id", ["reserve_id"]); |
| 96 |
|
| 97 |
=head1 RELATIONS |
| 98 |
|
| 99 |
=head2 hold_group |
| 100 |
|
| 101 |
Type: belongs_to |
| 102 |
|
| 103 |
Related object: L<Koha::Schema::Result::HoldGroup> |
| 104 |
|
| 105 |
=cut |
| 106 |
|
| 107 |
__PACKAGE__->belongs_to( |
| 108 |
"hold_group", |
| 109 |
"Koha::Schema::Result::HoldGroup", |
| 110 |
{ hold_group_id => "hold_group_id" }, |
| 111 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" }, |
| 112 |
); |
| 113 |
|
| 114 |
=head2 reserve |
| 115 |
|
| 116 |
Type: belongs_to |
| 117 |
|
| 118 |
Related object: L<Koha::Schema::Result::Reserve> |
| 119 |
|
| 120 |
=cut |
| 121 |
|
| 122 |
__PACKAGE__->belongs_to( |
| 123 |
"reserve", |
| 124 |
"Koha::Schema::Result::Reserve", |
| 125 |
{ reserve_id => "reserve_id" }, |
| 126 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" }, |
| 127 |
); |
| 128 |
|
| 129 |
|
| 130 |
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-10-23 13:01:15 |
| 131 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NtAC7d08ku24na/QpXzS1g |
| 132 |
|
| 133 |
|
| 134 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
| 135 |
1; |