Line 0
Link Here
|
|
|
1 |
use utf8; |
2 |
package Koha::Schema::Result::ClubHold; |
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::ClubHold |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<club_holds> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("club_holds"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 id |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
=head2 club_id |
33 |
|
34 |
data_type: 'integer' |
35 |
is_foreign_key: 1 |
36 |
is_nullable: 0 |
37 |
|
38 |
=head2 biblio_id |
39 |
|
40 |
data_type: 'integer' |
41 |
is_foreign_key: 1 |
42 |
is_nullable: 0 |
43 |
|
44 |
=head2 item_id |
45 |
|
46 |
data_type: 'integer' |
47 |
is_foreign_key: 1 |
48 |
is_nullable: 1 |
49 |
|
50 |
=head2 date_created |
51 |
|
52 |
data_type: 'timestamp' |
53 |
datetime_undef_if_invalid: 1 |
54 |
default_value: current_timestamp |
55 |
is_nullable: 0 |
56 |
|
57 |
=cut |
58 |
|
59 |
__PACKAGE__->add_columns( |
60 |
"id", |
61 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
62 |
"club_id", |
63 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
64 |
"biblio_id", |
65 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
66 |
"item_id", |
67 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
68 |
"date_created", |
69 |
{ |
70 |
data_type => "timestamp", |
71 |
datetime_undef_if_invalid => 1, |
72 |
default_value => \"current_timestamp", |
73 |
is_nullable => 0, |
74 |
}, |
75 |
); |
76 |
|
77 |
=head1 PRIMARY KEY |
78 |
|
79 |
=over 4 |
80 |
|
81 |
=item * L</id> |
82 |
|
83 |
=back |
84 |
|
85 |
=cut |
86 |
|
87 |
__PACKAGE__->set_primary_key("id"); |
88 |
|
89 |
=head1 RELATIONS |
90 |
|
91 |
=head2 biblio |
92 |
|
93 |
Type: belongs_to |
94 |
|
95 |
Related object: L<Koha::Schema::Result::Biblio> |
96 |
|
97 |
=cut |
98 |
|
99 |
__PACKAGE__->belongs_to( |
100 |
"biblio", |
101 |
"Koha::Schema::Result::Biblio", |
102 |
{ biblionumber => "biblio_id" }, |
103 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
104 |
); |
105 |
|
106 |
=head2 club |
107 |
|
108 |
Type: belongs_to |
109 |
|
110 |
Related object: L<Koha::Schema::Result::Club> |
111 |
|
112 |
=cut |
113 |
|
114 |
__PACKAGE__->belongs_to( |
115 |
"club", |
116 |
"Koha::Schema::Result::Club", |
117 |
{ id => "club_id" }, |
118 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
119 |
); |
120 |
|
121 |
=head2 club_holds_to_patron_holds |
122 |
|
123 |
Type: has_many |
124 |
|
125 |
Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold> |
126 |
|
127 |
=cut |
128 |
|
129 |
__PACKAGE__->has_many( |
130 |
"club_holds_to_patron_holds", |
131 |
"Koha::Schema::Result::ClubHoldsToPatronHold", |
132 |
{ "foreign.club_hold_id" => "self.id" }, |
133 |
{ cascade_copy => 0, cascade_delete => 0 }, |
134 |
); |
135 |
|
136 |
=head2 item |
137 |
|
138 |
Type: belongs_to |
139 |
|
140 |
Related object: L<Koha::Schema::Result::Item> |
141 |
|
142 |
=cut |
143 |
|
144 |
__PACKAGE__->belongs_to( |
145 |
"item", |
146 |
"Koha::Schema::Result::Item", |
147 |
{ itemnumber => "item_id" }, |
148 |
{ |
149 |
is_deferrable => 1, |
150 |
join_type => "LEFT", |
151 |
on_delete => "CASCADE", |
152 |
on_update => "CASCADE", |
153 |
}, |
154 |
); |
155 |
|
156 |
|
157 |
# Created by DBIx::Class::Schema::Loader v0.07048 @ 2019-09-02 18:36:27 |
158 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fC2qYBhwy6SPoF9NKl2y3g |
159 |
|
160 |
|
161 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
162 |
1; |