Bug 22700: Make biblio_metadata prefetchable from Koha::Biblio
[koha.git] / Koha / Schema / Result / Biblio.pm
1 use utf8;
2 package Koha::Schema::Result::Biblio;
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::Biblio
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<biblio>
19
20 =cut
21
22 __PACKAGE__->table("biblio");
23
24 =head1 ACCESSORS
25
26 =head2 biblionumber
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 frameworkcode
33
34   data_type: 'varchar'
35   default_value: (empty string)
36   is_nullable: 0
37   size: 4
38
39 =head2 author
40
41   data_type: 'longtext'
42   is_nullable: 1
43
44 =head2 title
45
46   data_type: 'longtext'
47   is_nullable: 1
48
49 =head2 unititle
50
51   data_type: 'longtext'
52   is_nullable: 1
53
54 =head2 notes
55
56   data_type: 'longtext'
57   is_nullable: 1
58
59 =head2 serial
60
61   data_type: 'tinyint'
62   is_nullable: 1
63
64 =head2 seriestitle
65
66   data_type: 'longtext'
67   is_nullable: 1
68
69 =head2 copyrightdate
70
71   data_type: 'smallint'
72   is_nullable: 1
73
74 =head2 timestamp
75
76   data_type: 'timestamp'
77   datetime_undef_if_invalid: 1
78   default_value: current_timestamp
79   is_nullable: 0
80
81 =head2 datecreated
82
83   data_type: 'date'
84   datetime_undef_if_invalid: 1
85   is_nullable: 0
86
87 =head2 abstract
88
89   data_type: 'longtext'
90   is_nullable: 1
91
92 =cut
93
94 __PACKAGE__->add_columns(
95   "biblionumber",
96   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
97   "frameworkcode",
98   { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 },
99   "author",
100   { data_type => "longtext", is_nullable => 1 },
101   "title",
102   { data_type => "longtext", is_nullable => 1 },
103   "unititle",
104   { data_type => "longtext", is_nullable => 1 },
105   "notes",
106   { data_type => "longtext", is_nullable => 1 },
107   "serial",
108   { data_type => "tinyint", is_nullable => 1 },
109   "seriestitle",
110   { data_type => "longtext", is_nullable => 1 },
111   "copyrightdate",
112   { data_type => "smallint", is_nullable => 1 },
113   "timestamp",
114   {
115     data_type => "timestamp",
116     datetime_undef_if_invalid => 1,
117     default_value => \"current_timestamp",
118     is_nullable => 0,
119   },
120   "datecreated",
121   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 },
122   "abstract",
123   { data_type => "longtext", is_nullable => 1 },
124 );
125
126 =head1 PRIMARY KEY
127
128 =over 4
129
130 =item * L</biblionumber>
131
132 =back
133
134 =cut
135
136 __PACKAGE__->set_primary_key("biblionumber");
137
138 =head1 RELATIONS
139
140 =head2 aqorders
141
142 Type: has_many
143
144 Related object: L<Koha::Schema::Result::Aqorder>
145
146 =cut
147
148 __PACKAGE__->has_many(
149   "aqorders",
150   "Koha::Schema::Result::Aqorder",
151   { "foreign.biblionumber" => "self.biblionumber" },
152   { cascade_copy => 0, cascade_delete => 0 },
153 );
154
155 =head2 article_requests
156
157 Type: has_many
158
159 Related object: L<Koha::Schema::Result::ArticleRequest>
160
161 =cut
162
163 __PACKAGE__->has_many(
164   "article_requests",
165   "Koha::Schema::Result::ArticleRequest",
166   { "foreign.biblionumber" => "self.biblionumber" },
167   { cascade_copy => 0, cascade_delete => 0 },
168 );
169
170 =head2 biblio_metadatas
171
172 Type: has_many
173
174 Related object: L<Koha::Schema::Result::BiblioMetadata>
175
176 =cut
177
178 __PACKAGE__->has_many(
179   "biblio_metadatas",
180   "Koha::Schema::Result::BiblioMetadata",
181   { "foreign.biblionumber" => "self.biblionumber" },
182   { cascade_copy => 0, cascade_delete => 0 },
183 );
184
185 =head2 biblioimages
186
187 Type: has_many
188
189 Related object: L<Koha::Schema::Result::Biblioimage>
190
191 =cut
192
193 __PACKAGE__->has_many(
194   "biblioimages",
195   "Koha::Schema::Result::Biblioimage",
196   { "foreign.biblionumber" => "self.biblionumber" },
197   { cascade_copy => 0, cascade_delete => 0 },
198 );
199
200 =head2 biblioitems
201
202 Type: has_many
203
204 Related object: L<Koha::Schema::Result::Biblioitem>
205
206 =cut
207
208 __PACKAGE__->has_many(
209   "biblioitems",
210   "Koha::Schema::Result::Biblioitem",
211   { "foreign.biblionumber" => "self.biblionumber" },
212   { cascade_copy => 0, cascade_delete => 0 },
213 );
214
215 =head2 hold_fill_targets
216
217 Type: has_many
218
219 Related object: L<Koha::Schema::Result::HoldFillTarget>
220
221 =cut
222
223 __PACKAGE__->has_many(
224   "hold_fill_targets",
225   "Koha::Schema::Result::HoldFillTarget",
226   { "foreign.biblionumber" => "self.biblionumber" },
227   { cascade_copy => 0, cascade_delete => 0 },
228 );
229
230 =head2 items
231
232 Type: has_many
233
234 Related object: L<Koha::Schema::Result::Item>
235
236 =cut
237
238 __PACKAGE__->has_many(
239   "items",
240   "Koha::Schema::Result::Item",
241   { "foreign.biblionumber" => "self.biblionumber" },
242   { cascade_copy => 0, cascade_delete => 0 },
243 );
244
245 =head2 old_reserves
246
247 Type: has_many
248
249 Related object: L<Koha::Schema::Result::OldReserve>
250
251 =cut
252
253 __PACKAGE__->has_many(
254   "old_reserves",
255   "Koha::Schema::Result::OldReserve",
256   { "foreign.biblionumber" => "self.biblionumber" },
257   { cascade_copy => 0, cascade_delete => 0 },
258 );
259
260 =head2 ratings
261
262 Type: has_many
263
264 Related object: L<Koha::Schema::Result::Rating>
265
266 =cut
267
268 __PACKAGE__->has_many(
269   "ratings",
270   "Koha::Schema::Result::Rating",
271   { "foreign.biblionumber" => "self.biblionumber" },
272   { cascade_copy => 0, cascade_delete => 0 },
273 );
274
275 =head2 reserves
276
277 Type: has_many
278
279 Related object: L<Koha::Schema::Result::Reserve>
280
281 =cut
282
283 __PACKAGE__->has_many(
284   "reserves",
285   "Koha::Schema::Result::Reserve",
286   { "foreign.biblionumber" => "self.biblionumber" },
287   { cascade_copy => 0, cascade_delete => 0 },
288 );
289
290 =head2 reviews
291
292 Type: has_many
293
294 Related object: L<Koha::Schema::Result::Review>
295
296 =cut
297
298 __PACKAGE__->has_many(
299   "reviews",
300   "Koha::Schema::Result::Review",
301   { "foreign.biblionumber" => "self.biblionumber" },
302   { cascade_copy => 0, cascade_delete => 0 },
303 );
304
305 =head2 suggestions
306
307 Type: has_many
308
309 Related object: L<Koha::Schema::Result::Suggestion>
310
311 =cut
312
313 __PACKAGE__->has_many(
314   "suggestions",
315   "Koha::Schema::Result::Suggestion",
316   { "foreign.biblionumber" => "self.biblionumber" },
317   { cascade_copy => 0, cascade_delete => 0 },
318 );
319
320 =head2 tags_all
321
322 Type: has_many
323
324 Related object: L<Koha::Schema::Result::TagAll>
325
326 =cut
327
328 __PACKAGE__->has_many(
329   "tags_all",
330   "Koha::Schema::Result::TagAll",
331   { "foreign.biblionumber" => "self.biblionumber" },
332   { cascade_copy => 0, cascade_delete => 0 },
333 );
334
335 =head2 tags_indexes
336
337 Type: has_many
338
339 Related object: L<Koha::Schema::Result::TagsIndex>
340
341 =cut
342
343 __PACKAGE__->has_many(
344   "tags_indexes",
345   "Koha::Schema::Result::TagsIndex",
346   { "foreign.biblionumber" => "self.biblionumber" },
347   { cascade_copy => 0, cascade_delete => 0 },
348 );
349
350 =head2 virtualshelfcontents
351
352 Type: has_many
353
354 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
355
356 =cut
357
358 __PACKAGE__->has_many(
359   "virtualshelfcontents",
360   "Koha::Schema::Result::Virtualshelfcontent",
361   { "foreign.biblionumber" => "self.biblionumber" },
362   { cascade_copy => 0, cascade_delete => 0 },
363 );
364
365
366 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-03-11 12:56:41
367 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ebn7Szfm8/HbrdAc7ekTnA
368
369 __PACKAGE__->has_one(
370   "metadata",
371   "Koha::Schema::Result::BiblioMetadata",
372   { "foreign.biblionumber" => "self.biblionumber" },
373   { cascade_copy => 0, cascade_delete => 0 },
374 );
375
376 1;