Bug 7295: (follow-up) update DBIx::Class schema classes
[koha.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 =head2 biblionumber
33
34   data_type: 'integer'
35   default_value: 0
36   is_foreign_key: 1
37   is_nullable: 0
38
39 =head2 volume
40
41   data_type: 'mediumtext'
42   is_nullable: 1
43
44 =head2 number
45
46   data_type: 'mediumtext'
47   is_nullable: 1
48
49 =head2 itemtype
50
51   data_type: 'varchar'
52   is_nullable: 1
53   size: 10
54
55 =head2 isbn
56
57   data_type: 'varchar'
58   is_nullable: 1
59   size: 30
60
61 =head2 issn
62
63   data_type: 'varchar'
64   is_nullable: 1
65   size: 9
66
67 =head2 ean
68
69   data_type: 'varchar'
70   is_nullable: 1
71   size: 13
72
73 =head2 publicationyear
74
75   data_type: 'text'
76   is_nullable: 1
77
78 =head2 publishercode
79
80   data_type: 'varchar'
81   is_nullable: 1
82   size: 255
83
84 =head2 volumedate
85
86   data_type: 'date'
87   datetime_undef_if_invalid: 1
88   is_nullable: 1
89
90 =head2 volumedesc
91
92   data_type: 'text'
93   is_nullable: 1
94
95 =head2 collectiontitle
96
97   data_type: 'mediumtext'
98   is_nullable: 1
99
100 =head2 collectionissn
101
102   data_type: 'text'
103   is_nullable: 1
104
105 =head2 collectionvolume
106
107   data_type: 'mediumtext'
108   is_nullable: 1
109
110 =head2 editionstatement
111
112   data_type: 'text'
113   is_nullable: 1
114
115 =head2 editionresponsibility
116
117   data_type: 'text'
118   is_nullable: 1
119
120 =head2 timestamp
121
122   data_type: 'timestamp'
123   datetime_undef_if_invalid: 1
124   default_value: current_timestamp
125   is_nullable: 0
126
127 =head2 illus
128
129   data_type: 'varchar'
130   is_nullable: 1
131   size: 255
132
133 =head2 pages
134
135   data_type: 'varchar'
136   is_nullable: 1
137   size: 255
138
139 =head2 notes
140
141   data_type: 'mediumtext'
142   is_nullable: 1
143
144 =head2 size
145
146   data_type: 'varchar'
147   is_nullable: 1
148   size: 255
149
150 =head2 place
151
152   data_type: 'varchar'
153   is_nullable: 1
154   size: 255
155
156 =head2 lccn
157
158   data_type: 'varchar'
159   is_nullable: 1
160   size: 25
161
162 =head2 marc
163
164   data_type: 'longblob'
165   is_nullable: 1
166
167 =head2 url
168
169   data_type: 'varchar'
170   is_nullable: 1
171   size: 255
172
173 =head2 cn_source
174
175   data_type: 'varchar'
176   is_nullable: 1
177   size: 10
178
179 =head2 cn_class
180
181   data_type: 'varchar'
182   is_nullable: 1
183   size: 30
184
185 =head2 cn_item
186
187   data_type: 'varchar'
188   is_nullable: 1
189   size: 10
190
191 =head2 cn_suffix
192
193   data_type: 'varchar'
194   is_nullable: 1
195   size: 10
196
197 =head2 cn_sort
198
199   data_type: 'varchar'
200   is_nullable: 1
201   size: 30
202
203 =head2 agerestriction
204
205   data_type: 'varchar'
206   is_nullable: 1
207   size: 255
208
209 =head2 totalissues
210
211   data_type: 'integer'
212   is_nullable: 1
213
214 =head2 marcxml
215
216   data_type: 'longtext'
217   is_nullable: 0
218
219 =cut
220
221 __PACKAGE__->add_columns(
222   "biblioitemnumber",
223   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
224   "biblionumber",
225   {
226     data_type      => "integer",
227     default_value  => 0,
228     is_foreign_key => 1,
229     is_nullable    => 0,
230   },
231   "volume",
232   { data_type => "mediumtext", is_nullable => 1 },
233   "number",
234   { data_type => "mediumtext", is_nullable => 1 },
235   "itemtype",
236   { data_type => "varchar", is_nullable => 1, size => 10 },
237   "isbn",
238   { data_type => "varchar", is_nullable => 1, size => 30 },
239   "issn",
240   { data_type => "varchar", is_nullable => 1, size => 9 },
241   "ean",
242   { data_type => "varchar", is_nullable => 1, size => 13 },
243   "publicationyear",
244   { data_type => "text", is_nullable => 1 },
245   "publishercode",
246   { data_type => "varchar", is_nullable => 1, size => 255 },
247   "volumedate",
248   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
249   "volumedesc",
250   { data_type => "text", is_nullable => 1 },
251   "collectiontitle",
252   { data_type => "mediumtext", is_nullable => 1 },
253   "collectionissn",
254   { data_type => "text", is_nullable => 1 },
255   "collectionvolume",
256   { data_type => "mediumtext", is_nullable => 1 },
257   "editionstatement",
258   { data_type => "text", is_nullable => 1 },
259   "editionresponsibility",
260   { data_type => "text", is_nullable => 1 },
261   "timestamp",
262   {
263     data_type => "timestamp",
264     datetime_undef_if_invalid => 1,
265     default_value => \"current_timestamp",
266     is_nullable => 0,
267   },
268   "illus",
269   { data_type => "varchar", is_nullable => 1, size => 255 },
270   "pages",
271   { data_type => "varchar", is_nullable => 1, size => 255 },
272   "notes",
273   { data_type => "mediumtext", is_nullable => 1 },
274   "size",
275   { data_type => "varchar", is_nullable => 1, size => 255 },
276   "place",
277   { data_type => "varchar", is_nullable => 1, size => 255 },
278   "lccn",
279   { data_type => "varchar", is_nullable => 1, size => 25 },
280   "marc",
281   { data_type => "longblob", is_nullable => 1 },
282   "url",
283   { data_type => "varchar", is_nullable => 1, size => 255 },
284   "cn_source",
285   { data_type => "varchar", is_nullable => 1, size => 10 },
286   "cn_class",
287   { data_type => "varchar", is_nullable => 1, size => 30 },
288   "cn_item",
289   { data_type => "varchar", is_nullable => 1, size => 10 },
290   "cn_suffix",
291   { data_type => "varchar", is_nullable => 1, size => 10 },
292   "cn_sort",
293   { data_type => "varchar", is_nullable => 1, size => 30 },
294   "agerestriction",
295   { data_type => "varchar", is_nullable => 1, size => 255 },
296   "totalissues",
297   { data_type => "integer", is_nullable => 1 },
298   "marcxml",
299   { data_type => "longtext", is_nullable => 0 },
300 );
301
302 =head1 PRIMARY KEY
303
304 =over 4
305
306 =item * L</biblioitemnumber>
307
308 =back
309
310 =cut
311
312 __PACKAGE__->set_primary_key("biblioitemnumber");
313
314 =head1 RELATIONS
315
316 =head2 biblionumber
317
318 Type: belongs_to
319
320 Related object: L<Koha::Schema::Result::Biblio>
321
322 =cut
323
324 __PACKAGE__->belongs_to(
325   "biblionumber",
326   "Koha::Schema::Result::Biblio",
327   { biblionumber => "biblionumber" },
328   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
329 );
330
331 =head2 items
332
333 Type: has_many
334
335 Related object: L<Koha::Schema::Result::Item>
336
337 =cut
338
339 __PACKAGE__->has_many(
340   "items",
341   "Koha::Schema::Result::Item",
342   { "foreign.biblioitemnumber" => "self.biblioitemnumber" },
343   { cascade_copy => 0, cascade_delete => 0 },
344 );
345
346
347 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
348 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Vyrs9pWYoqhWJw+cRy1EVg
349
350
351 # You can replace this text with custom content, and it will be preserved on regeneration
352 1;