Bug 21901: DBRev 19.12.00.076
[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 medium
50
51   data_type: 'longtext'
52   is_nullable: 1
53
54 =head2 subtitle
55
56   data_type: 'longtext'
57   is_nullable: 1
58
59 =head2 part_number
60
61   data_type: 'longtext'
62   is_nullable: 1
63
64 =head2 part_name
65
66   data_type: 'longtext'
67   is_nullable: 1
68
69 =head2 unititle
70
71   data_type: 'longtext'
72   is_nullable: 1
73
74 =head2 notes
75
76   data_type: 'longtext'
77   is_nullable: 1
78
79 =head2 serial
80
81   data_type: 'tinyint'
82   is_nullable: 1
83
84 =head2 seriestitle
85
86   data_type: 'longtext'
87   is_nullable: 1
88
89 =head2 copyrightdate
90
91   data_type: 'smallint'
92   is_nullable: 1
93
94 =head2 timestamp
95
96   data_type: 'timestamp'
97   datetime_undef_if_invalid: 1
98   default_value: current_timestamp
99   is_nullable: 0
100
101 =head2 datecreated
102
103   data_type: 'date'
104   datetime_undef_if_invalid: 1
105   is_nullable: 0
106
107 =head2 abstract
108
109   data_type: 'longtext'
110   is_nullable: 1
111
112 =cut
113
114 __PACKAGE__->add_columns(
115   "biblionumber",
116   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
117   "frameworkcode",
118   { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 },
119   "author",
120   { data_type => "longtext", is_nullable => 1 },
121   "title",
122   { data_type => "longtext", is_nullable => 1 },
123   "medium",
124   { data_type => "longtext", is_nullable => 1 },
125   "subtitle",
126   { data_type => "longtext", is_nullable => 1 },
127   "part_number",
128   { data_type => "longtext", is_nullable => 1 },
129   "part_name",
130   { data_type => "longtext", is_nullable => 1 },
131   "unititle",
132   { data_type => "longtext", is_nullable => 1 },
133   "notes",
134   { data_type => "longtext", is_nullable => 1 },
135   "serial",
136   { data_type => "tinyint", is_nullable => 1 },
137   "seriestitle",
138   { data_type => "longtext", is_nullable => 1 },
139   "copyrightdate",
140   { data_type => "smallint", is_nullable => 1 },
141   "timestamp",
142   {
143     data_type => "timestamp",
144     datetime_undef_if_invalid => 1,
145     default_value => \"current_timestamp",
146     is_nullable => 0,
147   },
148   "datecreated",
149   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 },
150   "abstract",
151   { data_type => "longtext", is_nullable => 1 },
152 );
153
154 =head1 PRIMARY KEY
155
156 =over 4
157
158 =item * L</biblionumber>
159
160 =back
161
162 =cut
163
164 __PACKAGE__->set_primary_key("biblionumber");
165
166 =head1 RELATIONS
167
168 =head2 aqorders
169
170 Type: has_many
171
172 Related object: L<Koha::Schema::Result::Aqorder>
173
174 =cut
175
176 __PACKAGE__->has_many(
177   "aqorders",
178   "Koha::Schema::Result::Aqorder",
179   { "foreign.biblionumber" => "self.biblionumber" },
180   { cascade_copy => 0, cascade_delete => 0 },
181 );
182
183 =head2 article_requests
184
185 Type: has_many
186
187 Related object: L<Koha::Schema::Result::ArticleRequest>
188
189 =cut
190
191 __PACKAGE__->has_many(
192   "article_requests",
193   "Koha::Schema::Result::ArticleRequest",
194   { "foreign.biblionumber" => "self.biblionumber" },
195   { cascade_copy => 0, cascade_delete => 0 },
196 );
197
198 =head2 biblio_metadatas
199
200 Type: has_many
201
202 Related object: L<Koha::Schema::Result::BiblioMetadata>
203
204 =cut
205
206 __PACKAGE__->has_many(
207   "biblio_metadatas",
208   "Koha::Schema::Result::BiblioMetadata",
209   { "foreign.biblionumber" => "self.biblionumber" },
210   { cascade_copy => 0, cascade_delete => 0 },
211 );
212
213 =head2 biblioimages
214
215 Type: has_many
216
217 Related object: L<Koha::Schema::Result::Biblioimage>
218
219 =cut
220
221 __PACKAGE__->has_many(
222   "biblioimages",
223   "Koha::Schema::Result::Biblioimage",
224   { "foreign.biblionumber" => "self.biblionumber" },
225   { cascade_copy => 0, cascade_delete => 0 },
226 );
227
228 =head2 biblioitems
229
230 Type: has_many
231
232 Related object: L<Koha::Schema::Result::Biblioitem>
233
234 =cut
235
236 __PACKAGE__->has_many(
237   "biblioitems",
238   "Koha::Schema::Result::Biblioitem",
239   { "foreign.biblionumber" => "self.biblionumber" },
240   { cascade_copy => 0, cascade_delete => 0 },
241 );
242
243 =head2 club_holds
244
245 Type: has_many
246
247 Related object: L<Koha::Schema::Result::ClubHold>
248
249 =cut
250
251 __PACKAGE__->has_many(
252   "club_holds",
253   "Koha::Schema::Result::ClubHold",
254   { "foreign.biblio_id" => "self.biblionumber" },
255   { cascade_copy => 0, cascade_delete => 0 },
256 );
257
258 =head2 hold_fill_targets
259
260 Type: has_many
261
262 Related object: L<Koha::Schema::Result::HoldFillTarget>
263
264 =cut
265
266 __PACKAGE__->has_many(
267   "hold_fill_targets",
268   "Koha::Schema::Result::HoldFillTarget",
269   { "foreign.biblionumber" => "self.biblionumber" },
270   { cascade_copy => 0, cascade_delete => 0 },
271 );
272
273 =head2 items
274
275 Type: has_many
276
277 Related object: L<Koha::Schema::Result::Item>
278
279 =cut
280
281 __PACKAGE__->has_many(
282   "items",
283   "Koha::Schema::Result::Item",
284   { "foreign.biblionumber" => "self.biblionumber" },
285   { cascade_copy => 0, cascade_delete => 0 },
286 );
287
288 =head2 old_reserves
289
290 Type: has_many
291
292 Related object: L<Koha::Schema::Result::OldReserve>
293
294 =cut
295
296 __PACKAGE__->has_many(
297   "old_reserves",
298   "Koha::Schema::Result::OldReserve",
299   { "foreign.biblionumber" => "self.biblionumber" },
300   { cascade_copy => 0, cascade_delete => 0 },
301 );
302
303 =head2 ratings
304
305 Type: has_many
306
307 Related object: L<Koha::Schema::Result::Rating>
308
309 =cut
310
311 __PACKAGE__->has_many(
312   "ratings",
313   "Koha::Schema::Result::Rating",
314   { "foreign.biblionumber" => "self.biblionumber" },
315   { cascade_copy => 0, cascade_delete => 0 },
316 );
317
318 =head2 reserves
319
320 Type: has_many
321
322 Related object: L<Koha::Schema::Result::Reserve>
323
324 =cut
325
326 __PACKAGE__->has_many(
327   "reserves",
328   "Koha::Schema::Result::Reserve",
329   { "foreign.biblionumber" => "self.biblionumber" },
330   { cascade_copy => 0, cascade_delete => 0 },
331 );
332
333 =head2 reviews
334
335 Type: has_many
336
337 Related object: L<Koha::Schema::Result::Review>
338
339 =cut
340
341 __PACKAGE__->has_many(
342   "reviews",
343   "Koha::Schema::Result::Review",
344   { "foreign.biblionumber" => "self.biblionumber" },
345   { cascade_copy => 0, cascade_delete => 0 },
346 );
347
348 =head2 serials
349
350 Type: has_many
351
352 Related object: L<Koha::Schema::Result::Serial>
353
354 =cut
355
356 __PACKAGE__->has_many(
357   "serials",
358   "Koha::Schema::Result::Serial",
359   { "foreign.biblionumber" => "self.biblionumber" },
360   { cascade_copy => 0, cascade_delete => 0 },
361 );
362
363 =head2 subscriptionhistories
364
365 Type: has_many
366
367 Related object: L<Koha::Schema::Result::Subscriptionhistory>
368
369 =cut
370
371 __PACKAGE__->has_many(
372   "subscriptionhistories",
373   "Koha::Schema::Result::Subscriptionhistory",
374   { "foreign.biblionumber" => "self.biblionumber" },
375   { cascade_copy => 0, cascade_delete => 0 },
376 );
377
378 =head2 subscriptions
379
380 Type: has_many
381
382 Related object: L<Koha::Schema::Result::Subscription>
383
384 =cut
385
386 __PACKAGE__->has_many(
387   "subscriptions",
388   "Koha::Schema::Result::Subscription",
389   { "foreign.biblionumber" => "self.biblionumber" },
390   { cascade_copy => 0, cascade_delete => 0 },
391 );
392
393 =head2 suggestions
394
395 Type: has_many
396
397 Related object: L<Koha::Schema::Result::Suggestion>
398
399 =cut
400
401 __PACKAGE__->has_many(
402   "suggestions",
403   "Koha::Schema::Result::Suggestion",
404   { "foreign.biblionumber" => "self.biblionumber" },
405   { cascade_copy => 0, cascade_delete => 0 },
406 );
407
408 =head2 tags_all
409
410 Type: has_many
411
412 Related object: L<Koha::Schema::Result::TagAll>
413
414 =cut
415
416 __PACKAGE__->has_many(
417   "tags_all",
418   "Koha::Schema::Result::TagAll",
419   { "foreign.biblionumber" => "self.biblionumber" },
420   { cascade_copy => 0, cascade_delete => 0 },
421 );
422
423 =head2 tags_indexes
424
425 Type: has_many
426
427 Related object: L<Koha::Schema::Result::TagsIndex>
428
429 =cut
430
431 __PACKAGE__->has_many(
432   "tags_indexes",
433   "Koha::Schema::Result::TagsIndex",
434   { "foreign.biblionumber" => "self.biblionumber" },
435   { cascade_copy => 0, cascade_delete => 0 },
436 );
437
438 =head2 virtualshelfcontents
439
440 Type: has_many
441
442 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
443
444 =cut
445
446 __PACKAGE__->has_many(
447   "virtualshelfcontents",
448   "Koha::Schema::Result::Virtualshelfcontent",
449   { "foreign.biblionumber" => "self.biblionumber" },
450   { cascade_copy => 0, cascade_delete => 0 },
451 );
452
453
454 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-17 09:15:51
455 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p2SIq565zPyE3ZUkSuXyBA
456
457
458 __PACKAGE__->has_one(
459   "metadata",
460   "Koha::Schema::Result::BiblioMetadata",
461   { "foreign.biblionumber" => "self.biblionumber" },
462   { cascade_copy => 0, cascade_delete => 0 },
463 );
464
465 __PACKAGE__->has_many(
466   "orders",
467   "Koha::Schema::Result::Aqorder",
468   { "foreign.biblionumber" => "self.biblionumber" },
469   { cascade_copy => 0, cascade_delete => 0 },
470 );
471
472 __PACKAGE__->add_columns(
473     "+serial" => { is_boolean => 1 }
474 );
475
476 1;