1 package Koha::Schema::Result::Item;
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 use base 'DBIx::Class::Core';
14 Koha::Schema::Result::Item
18 __PACKAGE__->table("items");
34 =head2 biblioitemnumber
47 =head2 dateaccessioned
54 data_type: 'mediumtext'
70 =head2 replacementprice
76 =head2 replacementpricedate
81 =head2 datelastborrowed
120 =head2 itemcallnumber
128 data_type: 'smallint'
133 data_type: 'smallint'
138 data_type: 'smallint'
148 data_type: 'mediumtext'
160 data_type: 'mediumtext'
165 data_type: 'timestamp'
166 default_value: current_timestamp
175 =head2 permanent_location
221 =head2 more_subfields_xml
223 data_type: 'longtext'
245 __PACKAGE__->add_columns(
247 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
249 { data_type => "integer", default_value => 0, is_nullable => 0 },
252 data_type => "integer",
258 { data_type => "varchar", is_nullable => 1, size => 20 },
260 { data_type => "date", is_nullable => 1 },
262 { data_type => "mediumtext", is_nullable => 1 },
264 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
266 { data_type => "decimal", is_nullable => 1, size => [8, 2] },
268 { data_type => "decimal", is_nullable => 1, size => [8, 2] },
269 "replacementpricedate",
270 { data_type => "date", is_nullable => 1 },
272 { data_type => "date", is_nullable => 1 },
274 { data_type => "date", is_nullable => 1 },
276 { data_type => "tinyint", is_nullable => 1 },
278 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
280 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
282 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
284 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
286 { data_type => "varchar", is_nullable => 1, size => 255 },
288 { data_type => "smallint", is_nullable => 1 },
290 { data_type => "smallint", is_nullable => 1 },
292 { data_type => "smallint", is_nullable => 1 },
294 { data_type => "tinyint", is_nullable => 1 },
296 { data_type => "mediumtext", is_nullable => 1 },
298 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
300 { data_type => "mediumtext", is_nullable => 1 },
303 data_type => "timestamp",
304 default_value => \"current_timestamp",
308 { data_type => "varchar", is_nullable => 1, size => 80 },
309 "permanent_location",
310 { data_type => "varchar", is_nullable => 1, size => 80 },
312 { data_type => "date", is_nullable => 1 },
314 { data_type => "varchar", is_nullable => 1, size => 10 },
316 { data_type => "varchar", is_nullable => 1, size => 30 },
318 { data_type => "varchar", is_nullable => 1, size => 10 },
320 { data_type => "text", is_nullable => 1 },
322 { data_type => "varchar", is_nullable => 1, size => 255 },
324 { data_type => "varchar", is_nullable => 1, size => 10 },
325 "more_subfields_xml",
326 { data_type => "longtext", is_nullable => 1 },
328 { data_type => "text", is_nullable => 1 },
330 { data_type => "varchar", is_nullable => 1, size => 32 },
332 { data_type => "varchar", is_nullable => 1, size => 32 },
334 __PACKAGE__->set_primary_key("itemnumber");
335 __PACKAGE__->add_unique_constraint("itembarcodeidx", ["barcode"]);
343 Related object: L<Koha::Schema::Result::Accountline>
347 __PACKAGE__->has_many(
349 "Koha::Schema::Result::Accountline",
350 { "foreign.itemnumber" => "self.itemnumber" },
351 { cascade_copy => 0, cascade_delete => 0 },
354 =head2 branchtransfers
358 Related object: L<Koha::Schema::Result::Branchtransfer>
362 __PACKAGE__->has_many(
364 "Koha::Schema::Result::Branchtransfer",
365 { "foreign.itemnumber" => "self.itemnumber" },
366 { cascade_copy => 0, cascade_delete => 0 },
369 =head2 creator_batches
373 Related object: L<Koha::Schema::Result::CreatorBatch>
377 __PACKAGE__->has_many(
379 "Koha::Schema::Result::CreatorBatch",
380 { "foreign.item_number" => "self.itemnumber" },
381 { cascade_copy => 0, cascade_delete => 0 },
384 =head2 hold_fill_target
388 Related object: L<Koha::Schema::Result::HoldFillTarget>
392 __PACKAGE__->might_have(
394 "Koha::Schema::Result::HoldFillTarget",
395 { "foreign.itemnumber" => "self.itemnumber" },
396 { cascade_copy => 0, cascade_delete => 0 },
403 Related object: L<Koha::Schema::Result::Issue>
407 __PACKAGE__->has_many(
409 "Koha::Schema::Result::Issue",
410 { "foreign.itemnumber" => "self.itemnumber" },
411 { cascade_copy => 0, cascade_delete => 0 },
414 =head2 biblioitemnumber
418 Related object: L<Koha::Schema::Result::Biblioitem>
422 __PACKAGE__->belongs_to(
424 "Koha::Schema::Result::Biblioitem",
425 { biblioitemnumber => "biblioitemnumber" },
426 { on_delete => "CASCADE", on_update => "CASCADE" },
433 Related object: L<Koha::Schema::Result::Branch>
437 __PACKAGE__->belongs_to(
439 "Koha::Schema::Result::Branch",
440 { branchcode => "homebranch" },
441 { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
448 Related object: L<Koha::Schema::Result::Branch>
452 __PACKAGE__->belongs_to(
454 "Koha::Schema::Result::Branch",
455 { branchcode => "holdingbranch" },
456 { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
463 Related object: L<Koha::Schema::Result::OldIssue>
467 __PACKAGE__->has_many(
469 "Koha::Schema::Result::OldIssue",
470 { "foreign.itemnumber" => "self.itemnumber" },
471 { cascade_copy => 0, cascade_delete => 0 },
478 Related object: L<Koha::Schema::Result::OldReserve>
482 __PACKAGE__->has_many(
484 "Koha::Schema::Result::OldReserve",
485 { "foreign.itemnumber" => "self.itemnumber" },
486 { cascade_copy => 0, cascade_delete => 0 },
493 Related object: L<Koha::Schema::Result::Reserve>
497 __PACKAGE__->has_many(
499 "Koha::Schema::Result::Reserve",
500 { "foreign.itemnumber" => "self.itemnumber" },
501 { cascade_copy => 0, cascade_delete => 0 },
508 Related object: L<Koha::Schema::Result::Serialitem>
512 __PACKAGE__->might_have(
514 "Koha::Schema::Result::Serialitem",
515 { "foreign.itemnumber" => "self.itemnumber" },
516 { cascade_copy => 0, cascade_delete => 0 },
520 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
521 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+jjodrPqX4WhBbgnTc5OqQ
524 # You can replace this text with custom content, and it will be preserved on regeneration