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: 1 |
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 => 1 }, |
55 |
); |
56 |
|
57 |
=head1 UNIQUE CONSTRAINTS |
58 |
|
59 |
=head2 C<hold_group_id> |
60 |
|
61 |
=over 4 |
62 |
|
63 |
=item * L</hold_group_id> |
64 |
|
65 |
=back |
66 |
|
67 |
=cut |
68 |
|
69 |
__PACKAGE__->add_unique_constraint("hold_group_id", ["hold_group_id"]); |
70 |
|
71 |
=head2 C<reserve_id> |
72 |
|
73 |
=over 4 |
74 |
|
75 |
=item * L</reserve_id> |
76 |
|
77 |
=back |
78 |
|
79 |
=cut |
80 |
|
81 |
__PACKAGE__->add_unique_constraint("reserve_id", ["reserve_id"]); |
82 |
|
83 |
=head1 RELATIONS |
84 |
|
85 |
=head2 hold_group |
86 |
|
87 |
Type: belongs_to |
88 |
|
89 |
Related object: L<Koha::Schema::Result::HoldGroup> |
90 |
|
91 |
=cut |
92 |
|
93 |
__PACKAGE__->belongs_to( |
94 |
"hold_group", |
95 |
"Koha::Schema::Result::HoldGroup", |
96 |
{ hold_group_id => "hold_group_id" }, |
97 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" }, |
98 |
); |
99 |
|
100 |
=head2 reserve |
101 |
|
102 |
Type: belongs_to |
103 |
|
104 |
Related object: L<Koha::Schema::Result::Reserve> |
105 |
|
106 |
=cut |
107 |
|
108 |
__PACKAGE__->belongs_to( |
109 |
"reserve", |
110 |
"Koha::Schema::Result::Reserve", |
111 |
{ reserve_id => "reserve_id" }, |
112 |
{ |
113 |
is_deferrable => 1, |
114 |
join_type => "LEFT", |
115 |
on_delete => "CASCADE", |
116 |
on_update => "RESTRICT", |
117 |
}, |
118 |
); |
119 |
|
120 |
|
121 |
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-07-25 13:10:48 |
122 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xgRnzTXH+Q+YxYLKQeGe+g |
123 |
|
124 |
|
125 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
126 |
1; |