Bug 10455 - DBRev 16.06.00.034
[koha.git] / Koha / Schema / Result / Biblioitem.pm
bloba26314f6a1c0dc6984bfbac3957b1c82cffb9d7a
1 use utf8;
2 package Koha::Schema::Result::Biblioitem;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Biblioitem
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<biblioitems>
20 =cut
22 __PACKAGE__->table("biblioitems");
24 =head1 ACCESSORS
26 =head2 biblioitemnumber
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 biblionumber
34 data_type: 'integer'
35 default_value: 0
36 is_foreign_key: 1
37 is_nullable: 0
39 =head2 volume
41 data_type: 'mediumtext'
42 is_nullable: 1
44 =head2 number
46 data_type: 'mediumtext'
47 is_nullable: 1
49 =head2 itemtype
51 data_type: 'varchar'
52 is_nullable: 1
53 size: 10
55 =head2 isbn
57 data_type: 'mediumtext'
58 is_nullable: 1
60 =head2 issn
62 data_type: 'mediumtext'
63 is_nullable: 1
65 =head2 ean
67 data_type: 'varchar'
68 is_nullable: 1
69 size: 13
71 =head2 publicationyear
73 data_type: 'text'
74 is_nullable: 1
76 =head2 publishercode
78 data_type: 'varchar'
79 is_nullable: 1
80 size: 255
82 =head2 volumedate
84 data_type: 'date'
85 datetime_undef_if_invalid: 1
86 is_nullable: 1
88 =head2 volumedesc
90 data_type: 'text'
91 is_nullable: 1
93 =head2 collectiontitle
95 data_type: 'mediumtext'
96 is_nullable: 1
98 =head2 collectionissn
100 data_type: 'text'
101 is_nullable: 1
103 =head2 collectionvolume
105 data_type: 'mediumtext'
106 is_nullable: 1
108 =head2 editionstatement
110 data_type: 'text'
111 is_nullable: 1
113 =head2 editionresponsibility
115 data_type: 'text'
116 is_nullable: 1
118 =head2 timestamp
120 data_type: 'timestamp'
121 datetime_undef_if_invalid: 1
122 default_value: current_timestamp
123 is_nullable: 0
125 =head2 illus
127 data_type: 'varchar'
128 is_nullable: 1
129 size: 255
131 =head2 pages
133 data_type: 'varchar'
134 is_nullable: 1
135 size: 255
137 =head2 notes
139 data_type: 'mediumtext'
140 is_nullable: 1
142 =head2 size
144 data_type: 'varchar'
145 is_nullable: 1
146 size: 255
148 =head2 place
150 data_type: 'varchar'
151 is_nullable: 1
152 size: 255
154 =head2 lccn
156 data_type: 'varchar'
157 is_nullable: 1
158 size: 25
160 =head2 url
162 data_type: 'text'
163 is_nullable: 1
165 =head2 cn_source
167 data_type: 'varchar'
168 is_nullable: 1
169 size: 10
171 =head2 cn_class
173 data_type: 'varchar'
174 is_nullable: 1
175 size: 30
177 =head2 cn_item
179 data_type: 'varchar'
180 is_nullable: 1
181 size: 10
183 =head2 cn_suffix
185 data_type: 'varchar'
186 is_nullable: 1
187 size: 10
189 =head2 cn_sort
191 data_type: 'varchar'
192 is_nullable: 1
193 size: 255
195 =head2 agerestriction
197 data_type: 'varchar'
198 is_nullable: 1
199 size: 255
201 =head2 totalissues
203 data_type: 'integer'
204 is_nullable: 1
206 =head2 marcxml
208 data_type: 'longtext'
209 is_nullable: 1
211 =cut
213 __PACKAGE__->add_columns(
214 "biblioitemnumber",
215 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
216 "biblionumber",
218 data_type => "integer",
219 default_value => 0,
220 is_foreign_key => 1,
221 is_nullable => 0,
223 "volume",
224 { data_type => "mediumtext", is_nullable => 1 },
225 "number",
226 { data_type => "mediumtext", is_nullable => 1 },
227 "itemtype",
228 { data_type => "varchar", is_nullable => 1, size => 10 },
229 "isbn",
230 { data_type => "mediumtext", is_nullable => 1 },
231 "issn",
232 { data_type => "mediumtext", is_nullable => 1 },
233 "ean",
234 { data_type => "varchar", is_nullable => 1, size => 13 },
235 "publicationyear",
236 { data_type => "text", is_nullable => 1 },
237 "publishercode",
238 { data_type => "varchar", is_nullable => 1, size => 255 },
239 "volumedate",
240 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
241 "volumedesc",
242 { data_type => "text", is_nullable => 1 },
243 "collectiontitle",
244 { data_type => "mediumtext", is_nullable => 1 },
245 "collectionissn",
246 { data_type => "text", is_nullable => 1 },
247 "collectionvolume",
248 { data_type => "mediumtext", is_nullable => 1 },
249 "editionstatement",
250 { data_type => "text", is_nullable => 1 },
251 "editionresponsibility",
252 { data_type => "text", is_nullable => 1 },
253 "timestamp",
255 data_type => "timestamp",
256 datetime_undef_if_invalid => 1,
257 default_value => \"current_timestamp",
258 is_nullable => 0,
260 "illus",
261 { data_type => "varchar", is_nullable => 1, size => 255 },
262 "pages",
263 { data_type => "varchar", is_nullable => 1, size => 255 },
264 "notes",
265 { data_type => "mediumtext", is_nullable => 1 },
266 "size",
267 { data_type => "varchar", is_nullable => 1, size => 255 },
268 "place",
269 { data_type => "varchar", is_nullable => 1, size => 255 },
270 "lccn",
271 { data_type => "varchar", is_nullable => 1, size => 25 },
272 "url",
273 { data_type => "text", is_nullable => 1 },
274 "cn_source",
275 { data_type => "varchar", is_nullable => 1, size => 10 },
276 "cn_class",
277 { data_type => "varchar", is_nullable => 1, size => 30 },
278 "cn_item",
279 { data_type => "varchar", is_nullable => 1, size => 10 },
280 "cn_suffix",
281 { data_type => "varchar", is_nullable => 1, size => 10 },
282 "cn_sort",
283 { data_type => "varchar", is_nullable => 1, size => 255 },
284 "agerestriction",
285 { data_type => "varchar", is_nullable => 1, size => 255 },
286 "totalissues",
287 { data_type => "integer", is_nullable => 1 },
288 "marcxml",
289 { data_type => "longtext", is_nullable => 1 },
292 =head1 PRIMARY KEY
294 =over 4
296 =item * L</biblioitemnumber>
298 =back
300 =cut
302 __PACKAGE__->set_primary_key("biblioitemnumber");
304 =head1 RELATIONS
306 =head2 biblionumber
308 Type: belongs_to
310 Related object: L<Koha::Schema::Result::Biblio>
312 =cut
314 __PACKAGE__->belongs_to(
315 "biblionumber",
316 "Koha::Schema::Result::Biblio",
317 { biblionumber => "biblionumber" },
318 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
321 =head2 items
323 Type: has_many
325 Related object: L<Koha::Schema::Result::Item>
327 =cut
329 __PACKAGE__->has_many(
330 "items",
331 "Koha::Schema::Result::Item",
332 { "foreign.biblioitemnumber" => "self.biblioitemnumber" },
333 { cascade_copy => 0, cascade_delete => 0 },
337 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-21 14:37:19
338 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sIIeEpbe61VNkEYpUXNDkw
340 __PACKAGE__->belongs_to( biblio => "Koha::Schema::Result::Biblio", "biblionumber" );