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