Line 0
Link Here
|
|
|
1 |
use utf8; |
2 |
package Koha::Schema::Result::Holding; |
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::Holding |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<holdings> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("holdings"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 holding_id |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
=head2 biblionumber |
33 |
|
34 |
data_type: 'integer' |
35 |
default_value: 0 |
36 |
is_foreign_key: 1 |
37 |
is_nullable: 0 |
38 |
|
39 |
=head2 biblioitemnumber |
40 |
|
41 |
data_type: 'integer' |
42 |
default_value: 0 |
43 |
is_foreign_key: 1 |
44 |
is_nullable: 0 |
45 |
|
46 |
=head2 frameworkcode |
47 |
|
48 |
data_type: 'varchar' |
49 |
default_value: (empty string) |
50 |
is_nullable: 0 |
51 |
size: 4 |
52 |
|
53 |
=head2 holdingbranch |
54 |
|
55 |
data_type: 'varchar' |
56 |
is_foreign_key: 1 |
57 |
is_nullable: 1 |
58 |
size: 10 |
59 |
|
60 |
=head2 location |
61 |
|
62 |
data_type: 'varchar' |
63 |
is_nullable: 1 |
64 |
size: 80 |
65 |
|
66 |
=head2 callnumber |
67 |
|
68 |
data_type: 'varchar' |
69 |
is_nullable: 1 |
70 |
size: 255 |
71 |
|
72 |
=head2 suppress |
73 |
|
74 |
data_type: 'tinyint' |
75 |
is_nullable: 1 |
76 |
|
77 |
=head2 timestamp |
78 |
|
79 |
data_type: 'timestamp' |
80 |
datetime_undef_if_invalid: 1 |
81 |
default_value: 'current_timestamp()' |
82 |
is_nullable: 0 |
83 |
|
84 |
=head2 datecreated |
85 |
|
86 |
data_type: 'date' |
87 |
datetime_undef_if_invalid: 1 |
88 |
is_nullable: 0 |
89 |
|
90 |
=head2 deleted_on |
91 |
|
92 |
data_type: 'datetime' |
93 |
datetime_undef_if_invalid: 1 |
94 |
is_nullable: 1 |
95 |
|
96 |
=cut |
97 |
|
98 |
__PACKAGE__->add_columns( |
99 |
"holding_id", |
100 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
101 |
"biblionumber", |
102 |
{ |
103 |
data_type => "integer", |
104 |
default_value => 0, |
105 |
is_foreign_key => 1, |
106 |
is_nullable => 0, |
107 |
}, |
108 |
"biblioitemnumber", |
109 |
{ |
110 |
data_type => "integer", |
111 |
default_value => 0, |
112 |
is_foreign_key => 1, |
113 |
is_nullable => 0, |
114 |
}, |
115 |
"frameworkcode", |
116 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 4 }, |
117 |
"holdingbranch", |
118 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, |
119 |
"location", |
120 |
{ data_type => "varchar", is_nullable => 1, size => 80 }, |
121 |
"callnumber", |
122 |
{ data_type => "varchar", is_nullable => 1, size => 255 }, |
123 |
"suppress", |
124 |
{ data_type => "tinyint", is_nullable => 1 }, |
125 |
"timestamp", |
126 |
{ |
127 |
data_type => "timestamp", |
128 |
datetime_undef_if_invalid => 1, |
129 |
default_value => "current_timestamp()", |
130 |
is_nullable => 0, |
131 |
}, |
132 |
"datecreated", |
133 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 }, |
134 |
"deleted_on", |
135 |
{ |
136 |
data_type => "datetime", |
137 |
datetime_undef_if_invalid => 1, |
138 |
is_nullable => 1, |
139 |
}, |
140 |
); |
141 |
|
142 |
=head1 PRIMARY KEY |
143 |
|
144 |
=over 4 |
145 |
|
146 |
=item * L</holding_id> |
147 |
|
148 |
=back |
149 |
|
150 |
=cut |
151 |
|
152 |
__PACKAGE__->set_primary_key("holding_id"); |
153 |
|
154 |
=head1 RELATIONS |
155 |
|
156 |
=head2 biblioitemnumber |
157 |
|
158 |
Type: belongs_to |
159 |
|
160 |
Related object: L<Koha::Schema::Result::Biblioitem> |
161 |
|
162 |
=cut |
163 |
|
164 |
__PACKAGE__->belongs_to( |
165 |
"biblioitemnumber", |
166 |
"Koha::Schema::Result::Biblioitem", |
167 |
{ biblioitemnumber => "biblioitemnumber" }, |
168 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
169 |
); |
170 |
|
171 |
=head2 biblionumber |
172 |
|
173 |
Type: belongs_to |
174 |
|
175 |
Related object: L<Koha::Schema::Result::Biblio> |
176 |
|
177 |
=cut |
178 |
|
179 |
__PACKAGE__->belongs_to( |
180 |
"biblionumber", |
181 |
"Koha::Schema::Result::Biblio", |
182 |
{ biblionumber => "biblionumber" }, |
183 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
184 |
); |
185 |
|
186 |
=head2 holdingbranch |
187 |
|
188 |
Type: belongs_to |
189 |
|
190 |
Related object: L<Koha::Schema::Result::Branch> |
191 |
|
192 |
=cut |
193 |
|
194 |
__PACKAGE__->belongs_to( |
195 |
"holdingbranch", |
196 |
"Koha::Schema::Result::Branch", |
197 |
{ branchcode => "holdingbranch" }, |
198 |
{ |
199 |
is_deferrable => 1, |
200 |
join_type => "LEFT", |
201 |
on_delete => "RESTRICT", |
202 |
on_update => "CASCADE", |
203 |
}, |
204 |
); |
205 |
|
206 |
=head2 holdings_metadatas |
207 |
|
208 |
Type: has_many |
209 |
|
210 |
Related object: L<Koha::Schema::Result::HoldingsMetadata> |
211 |
|
212 |
=cut |
213 |
|
214 |
__PACKAGE__->has_many( |
215 |
"holdings_metadatas", |
216 |
"Koha::Schema::Result::HoldingsMetadata", |
217 |
{ "foreign.holding_id" => "self.holding_id" }, |
218 |
{ cascade_copy => 0, cascade_delete => 0 }, |
219 |
); |
220 |
|
221 |
=head2 items |
222 |
|
223 |
Type: has_many |
224 |
|
225 |
Related object: L<Koha::Schema::Result::Item> |
226 |
|
227 |
=cut |
228 |
|
229 |
__PACKAGE__->has_many( |
230 |
"items", |
231 |
"Koha::Schema::Result::Item", |
232 |
{ "foreign.holding_id" => "self.holding_id" }, |
233 |
{ cascade_copy => 0, cascade_delete => 0 }, |
234 |
); |
235 |
|
236 |
|
237 |
# Created by DBIx::Class::Schema::Loader v0.07048 @ 2018-10-26 12:34:01 |
238 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iCl1nPLIbzMbSIHTDYHVcA |
239 |
|
240 |
|
241 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
242 |
1; |