Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / Biblioitem.pm
1 use utf8;
2 package Koha::Schema::Result::Biblioitem;
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::Biblioitem
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<biblioitems>
19
20 =cut
21
22 __PACKAGE__->table("biblioitems");
23
24 =head1 ACCESSORS
25
26 =head2 biblioitemnumber
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 primary key, unique identifier assigned by Koha
33
34 =head2 biblionumber
35
36   data_type: 'integer'
37   default_value: 0
38   is_foreign_key: 1
39   is_nullable: 0
40
41 foreign key linking this table to the biblio table
42
43 =head2 volume
44
45   data_type: 'longtext'
46   is_nullable: 1
47
48 =head2 number
49
50   data_type: 'longtext'
51   is_nullable: 1
52
53 =head2 itemtype
54
55   data_type: 'varchar'
56   is_nullable: 1
57   size: 10
58
59 biblio level item type (MARC21 942$c)
60
61 =head2 isbn
62
63   data_type: 'longtext'
64   is_nullable: 1
65
66 ISBN (MARC21 020$a)
67
68 =head2 issn
69
70   data_type: 'longtext'
71   is_nullable: 1
72
73 ISSN (MARC21 022$a)
74
75 =head2 ean
76
77   data_type: 'longtext'
78   is_nullable: 1
79
80 =head2 publicationyear
81
82   data_type: 'mediumtext'
83   is_nullable: 1
84
85 =head2 publishercode
86
87   data_type: 'varchar'
88   is_nullable: 1
89   size: 255
90
91 publisher (MARC21 260$b)
92
93 =head2 volumedate
94
95   data_type: 'date'
96   datetime_undef_if_invalid: 1
97   is_nullable: 1
98
99 =head2 volumedesc
100
101   data_type: 'mediumtext'
102   is_nullable: 1
103
104 volume information (MARC21 362$a)
105
106 =head2 collectiontitle
107
108   data_type: 'longtext'
109   is_nullable: 1
110
111 =head2 collectionissn
112
113   data_type: 'mediumtext'
114   is_nullable: 1
115
116 =head2 collectionvolume
117
118   data_type: 'longtext'
119   is_nullable: 1
120
121 =head2 editionstatement
122
123   data_type: 'mediumtext'
124   is_nullable: 1
125
126 =head2 editionresponsibility
127
128   data_type: 'mediumtext'
129   is_nullable: 1
130
131 =head2 timestamp
132
133   data_type: 'timestamp'
134   datetime_undef_if_invalid: 1
135   default_value: current_timestamp
136   is_nullable: 0
137
138 =head2 illus
139
140   data_type: 'varchar'
141   is_nullable: 1
142   size: 255
143
144 illustrations (MARC21 300$b)
145
146 =head2 pages
147
148   data_type: 'varchar'
149   is_nullable: 1
150   size: 255
151
152 number of pages (MARC21 300$c)
153
154 =head2 notes
155
156   data_type: 'longtext'
157   is_nullable: 1
158
159 =head2 size
160
161   data_type: 'varchar'
162   is_nullable: 1
163   size: 255
164
165 material size (MARC21 300$c)
166
167 =head2 place
168
169   data_type: 'varchar'
170   is_nullable: 1
171   size: 255
172
173 publication place (MARC21 260$a)
174
175 =head2 lccn
176
177   data_type: 'varchar'
178   is_nullable: 1
179   size: 25
180
181 library of congress control number (MARC21 010$a)
182
183 =head2 url
184
185   data_type: 'mediumtext'
186   is_nullable: 1
187
188 url (MARC21 856$u)
189
190 =head2 cn_source
191
192   data_type: 'varchar'
193   is_nullable: 1
194   size: 10
195
196 classification source (MARC21 942$2)
197
198 =head2 cn_class
199
200   data_type: 'varchar'
201   is_nullable: 1
202   size: 30
203
204 =head2 cn_item
205
206   data_type: 'varchar'
207   is_nullable: 1
208   size: 10
209
210 =head2 cn_suffix
211
212   data_type: 'varchar'
213   is_nullable: 1
214   size: 10
215
216 =head2 cn_sort
217
218   data_type: 'varchar'
219   is_nullable: 1
220   size: 255
221
222 normalized version of the call number used for sorting
223
224 =head2 agerestriction
225
226   data_type: 'varchar'
227   is_nullable: 1
228   size: 255
229
230 target audience/age restriction from the bib record (MARC21 521$a)
231
232 =head2 totalissues
233
234   data_type: 'integer'
235   is_nullable: 1
236
237 =cut
238
239 __PACKAGE__->add_columns(
240   "biblioitemnumber",
241   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
242   "biblionumber",
243   {
244     data_type      => "integer",
245     default_value  => 0,
246     is_foreign_key => 1,
247     is_nullable    => 0,
248   },
249   "volume",
250   { data_type => "longtext", is_nullable => 1 },
251   "number",
252   { data_type => "longtext", is_nullable => 1 },
253   "itemtype",
254   { data_type => "varchar", is_nullable => 1, size => 10 },
255   "isbn",
256   { data_type => "longtext", is_nullable => 1 },
257   "issn",
258   { data_type => "longtext", is_nullable => 1 },
259   "ean",
260   { data_type => "longtext", is_nullable => 1 },
261   "publicationyear",
262   { data_type => "mediumtext", is_nullable => 1 },
263   "publishercode",
264   { data_type => "varchar", is_nullable => 1, size => 255 },
265   "volumedate",
266   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
267   "volumedesc",
268   { data_type => "mediumtext", is_nullable => 1 },
269   "collectiontitle",
270   { data_type => "longtext", is_nullable => 1 },
271   "collectionissn",
272   { data_type => "mediumtext", is_nullable => 1 },
273   "collectionvolume",
274   { data_type => "longtext", is_nullable => 1 },
275   "editionstatement",
276   { data_type => "mediumtext", is_nullable => 1 },
277   "editionresponsibility",
278   { data_type => "mediumtext", is_nullable => 1 },
279   "timestamp",
280   {
281     data_type => "timestamp",
282     datetime_undef_if_invalid => 1,
283     default_value => \"current_timestamp",
284     is_nullable => 0,
285   },
286   "illus",
287   { data_type => "varchar", is_nullable => 1, size => 255 },
288   "pages",
289   { data_type => "varchar", is_nullable => 1, size => 255 },
290   "notes",
291   { data_type => "longtext", is_nullable => 1 },
292   "size",
293   { data_type => "varchar", is_nullable => 1, size => 255 },
294   "place",
295   { data_type => "varchar", is_nullable => 1, size => 255 },
296   "lccn",
297   { data_type => "varchar", is_nullable => 1, size => 25 },
298   "url",
299   { data_type => "mediumtext", is_nullable => 1 },
300   "cn_source",
301   { data_type => "varchar", is_nullable => 1, size => 10 },
302   "cn_class",
303   { data_type => "varchar", is_nullable => 1, size => 30 },
304   "cn_item",
305   { data_type => "varchar", is_nullable => 1, size => 10 },
306   "cn_suffix",
307   { data_type => "varchar", is_nullable => 1, size => 10 },
308   "cn_sort",
309   { data_type => "varchar", is_nullable => 1, size => 255 },
310   "agerestriction",
311   { data_type => "varchar", is_nullable => 1, size => 255 },
312   "totalissues",
313   { data_type => "integer", is_nullable => 1 },
314 );
315
316 =head1 PRIMARY KEY
317
318 =over 4
319
320 =item * L</biblioitemnumber>
321
322 =back
323
324 =cut
325
326 __PACKAGE__->set_primary_key("biblioitemnumber");
327
328 =head1 RELATIONS
329
330 =head2 biblionumber
331
332 Type: belongs_to
333
334 Related object: L<Koha::Schema::Result::Biblio>
335
336 =cut
337
338 __PACKAGE__->belongs_to(
339   "biblionumber",
340   "Koha::Schema::Result::Biblio",
341   { biblionumber => "biblionumber" },
342   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
343 );
344
345 =head2 items
346
347 Type: has_many
348
349 Related object: L<Koha::Schema::Result::Item>
350
351 =cut
352
353 __PACKAGE__->has_many(
354   "items",
355   "Koha::Schema::Result::Item",
356   { "foreign.biblioitemnumber" => "self.biblioitemnumber" },
357   { cascade_copy => 0, cascade_delete => 0 },
358 );
359
360
361 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
362 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Q5VdRYkLa95Kc96wiwLh/g
363
364 __PACKAGE__->belongs_to( biblio => "Koha::Schema::Result::Biblio", "biblionumber" );
365
366 1;