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