Bug 11268: (follow-up) update DBIC 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: 'text'
170   is_nullable: 1
171
172 =head2 cn_source
173
174   data_type: 'varchar'
175   is_nullable: 1
176   size: 10
177
178 =head2 cn_class
179
180   data_type: 'varchar'
181   is_nullable: 1
182   size: 30
183
184 =head2 cn_item
185
186   data_type: 'varchar'
187   is_nullable: 1
188   size: 10
189
190 =head2 cn_suffix
191
192   data_type: 'varchar'
193   is_nullable: 1
194   size: 10
195
196 =head2 cn_sort
197
198   data_type: 'varchar'
199   is_nullable: 1
200   size: 30
201
202 =head2 agerestriction
203
204   data_type: 'varchar'
205   is_nullable: 1
206   size: 255
207
208 =head2 totalissues
209
210   data_type: 'integer'
211   is_nullable: 1
212
213 =head2 marcxml
214
215   data_type: 'longtext'
216   is_nullable: 0
217
218 =cut
219
220 __PACKAGE__->add_columns(
221   "biblioitemnumber",
222   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
223   "biblionumber",
224   {
225     data_type      => "integer",
226     default_value  => 0,
227     is_foreign_key => 1,
228     is_nullable    => 0,
229   },
230   "volume",
231   { data_type => "mediumtext", is_nullable => 1 },
232   "number",
233   { data_type => "mediumtext", is_nullable => 1 },
234   "itemtype",
235   { data_type => "varchar", is_nullable => 1, size => 10 },
236   "isbn",
237   { data_type => "varchar", is_nullable => 1, size => 30 },
238   "issn",
239   { data_type => "varchar", is_nullable => 1, size => 9 },
240   "ean",
241   { data_type => "varchar", is_nullable => 1, size => 13 },
242   "publicationyear",
243   { data_type => "text", is_nullable => 1 },
244   "publishercode",
245   { data_type => "varchar", is_nullable => 1, size => 255 },
246   "volumedate",
247   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
248   "volumedesc",
249   { data_type => "text", is_nullable => 1 },
250   "collectiontitle",
251   { data_type => "mediumtext", is_nullable => 1 },
252   "collectionissn",
253   { data_type => "text", is_nullable => 1 },
254   "collectionvolume",
255   { data_type => "mediumtext", is_nullable => 1 },
256   "editionstatement",
257   { data_type => "text", is_nullable => 1 },
258   "editionresponsibility",
259   { data_type => "text", is_nullable => 1 },
260   "timestamp",
261   {
262     data_type => "timestamp",
263     datetime_undef_if_invalid => 1,
264     default_value => \"current_timestamp",
265     is_nullable => 0,
266   },
267   "illus",
268   { data_type => "varchar", is_nullable => 1, size => 255 },
269   "pages",
270   { data_type => "varchar", is_nullable => 1, size => 255 },
271   "notes",
272   { data_type => "mediumtext", is_nullable => 1 },
273   "size",
274   { data_type => "varchar", is_nullable => 1, size => 255 },
275   "place",
276   { data_type => "varchar", is_nullable => 1, size => 255 },
277   "lccn",
278   { data_type => "varchar", is_nullable => 1, size => 25 },
279   "marc",
280   { data_type => "longblob", is_nullable => 1 },
281   "url",
282   { data_type => "text", is_nullable => 1 },
283   "cn_source",
284   { data_type => "varchar", is_nullable => 1, size => 10 },
285   "cn_class",
286   { data_type => "varchar", is_nullable => 1, size => 30 },
287   "cn_item",
288   { data_type => "varchar", is_nullable => 1, size => 10 },
289   "cn_suffix",
290   { data_type => "varchar", is_nullable => 1, size => 10 },
291   "cn_sort",
292   { data_type => "varchar", is_nullable => 1, size => 30 },
293   "agerestriction",
294   { data_type => "varchar", is_nullable => 1, size => 255 },
295   "totalissues",
296   { data_type => "integer", is_nullable => 1 },
297   "marcxml",
298   { data_type => "longtext", is_nullable => 0 },
299 );
300
301 =head1 PRIMARY KEY
302
303 =over 4
304
305 =item * L</biblioitemnumber>
306
307 =back
308
309 =cut
310
311 __PACKAGE__->set_primary_key("biblioitemnumber");
312
313 =head1 RELATIONS
314
315 =head2 biblionumber
316
317 Type: belongs_to
318
319 Related object: L<Koha::Schema::Result::Biblio>
320
321 =cut
322
323 __PACKAGE__->belongs_to(
324   "biblionumber",
325   "Koha::Schema::Result::Biblio",
326   { biblionumber => "biblionumber" },
327   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
328 );
329
330 =head2 items
331
332 Type: has_many
333
334 Related object: L<Koha::Schema::Result::Item>
335
336 =cut
337
338 __PACKAGE__->has_many(
339   "items",
340   "Koha::Schema::Result::Item",
341   { "foreign.biblioitemnumber" => "self.biblioitemnumber" },
342   { cascade_copy => 0, cascade_delete => 0 },
343 );
344
345
346 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-01-31 15:58:34
347 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4tm44zYP5ZPJo/xINVgHVg
348
349
350 # You can replace this text with custom content, and it will be preserved on regeneration
351 1;