+use utf8;
package Koha::Schema::Result::Itemtype;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
+=head1 NAME
+
+Koha::Schema::Result::Itemtype
+
+=cut
+
use strict;
use warnings;
use base 'DBIx::Class::Core';
-
-=head1 NAME
-
-Koha::Schema::Result::Itemtype
+=head1 TABLE: C<itemtypes>
=cut
=head2 description
- data_type: 'mediumtext'
+ data_type: 'longtext'
is_nullable: 1
=head2 rentalcharge
- data_type: 'double precision'
+ data_type: 'decimal'
is_nullable: 1
- size: [16,4]
+ size: [28,6]
+
+=head2 rentalcharge_daily
+
+ data_type: 'decimal'
+ is_nullable: 1
+ size: [28,6]
+
+=head2 rentalcharge_hourly
+
+ data_type: 'decimal'
+ is_nullable: 1
+ size: [28,6]
+
+=head2 defaultreplacecost
+
+ data_type: 'decimal'
+ is_nullable: 1
+ size: [28,6]
+
+=head2 processfee
+
+ data_type: 'decimal'
+ is_nullable: 1
+ size: [28,6]
=head2 notforloan
=head2 summary
- data_type: 'text'
+ data_type: 'mediumtext'
is_nullable: 1
=head2 checkinmsg
=head2 sip_media_type
data_type: 'varchar'
- default_value: (empty string)
- is_nullable: 0
+ is_nullable: 1
size: 3
+=head2 hideinopac
+
+ data_type: 'tinyint'
+ default_value: 0
+ is_nullable: 0
+
+=head2 searchcategory
+
+ data_type: 'varchar'
+ is_nullable: 1
+ size: 80
+
=cut
__PACKAGE__->add_columns(
"itemtype",
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
"description",
- { data_type => "mediumtext", is_nullable => 1 },
+ { data_type => "longtext", is_nullable => 1 },
"rentalcharge",
- { data_type => "double precision", is_nullable => 1, size => [16, 4] },
+ { data_type => "decimal", is_nullable => 1, size => [28, 6] },
+ "rentalcharge_daily",
+ { data_type => "decimal", is_nullable => 1, size => [28, 6] },
+ "rentalcharge_hourly",
+ { data_type => "decimal", is_nullable => 1, size => [28, 6] },
+ "defaultreplacecost",
+ { data_type => "decimal", is_nullable => 1, size => [28, 6] },
+ "processfee",
+ { data_type => "decimal", is_nullable => 1, size => [28, 6] },
"notforloan",
{ data_type => "smallint", is_nullable => 1 },
"imageurl",
{ data_type => "varchar", is_nullable => 1, size => 200 },
"summary",
- { data_type => "text", is_nullable => 1 },
+ { data_type => "mediumtext", is_nullable => 1 },
"checkinmsg",
{ data_type => "varchar", is_nullable => 1, size => 255 },
"checkinmsgtype",
size => 16,
},
"sip_media_type",
- { data_type => "varchar", default_value => "", is_nullable => 0, size => 3 },
+ { data_type => "varchar", is_nullable => 1, size => 3 },
+ "hideinopac",
+ { data_type => "tinyint", default_value => 0, is_nullable => 0 },
+ "searchcategory",
+ { data_type => "varchar", is_nullable => 1, size => 80 },
);
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</itemtype>
+
+=back
+
+=cut
+
__PACKAGE__->set_primary_key("itemtype");
=head1 RELATIONS
{ cascade_copy => 0, cascade_delete => 0 },
);
+=head2 circulation_rules
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::CirculationRule>
+
+=cut
+
+__PACKAGE__->has_many(
+ "circulation_rules",
+ "Koha::Schema::Result::CirculationRule",
+ { "foreign.itemtype" => "self.itemtype" },
+ { cascade_copy => 0, cascade_delete => 0 },
+);
+
=head2 default_branch_item_rule
Type: might_have
{ cascade_copy => 0, cascade_delete => 0 },
);
+=head2 old_reserves
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::OldReserve>
+
+=cut
+
+__PACKAGE__->has_many(
+ "old_reserves",
+ "Koha::Schema::Result::OldReserve",
+ { "foreign.itemtype" => "self.itemtype" },
+ { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 reserves
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Reserve>
+
+=cut
+
+__PACKAGE__->has_many(
+ "reserves",
+ "Koha::Schema::Result::Reserve",
+ { "foreign.itemtype" => "self.itemtype" },
+ { cascade_copy => 0, cascade_delete => 0 },
+);
+
-# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-12-09 08:22:44
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uGDyscA28BOAzCTb2gBcCg
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-03-07 17:30:46
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CDIOU6LmF7suaujk1NQOeg
+# Use the ItemtypeLocalization view to create the join on localization
+our $LANGUAGE;
+__PACKAGE__->has_many(
+ "localization" => "Koha::Schema::Result::ItemtypeLocalization",
+ sub {
+ my $args = shift;
+
+ die "no lang specified!" unless $LANGUAGE;
+
+ return ({
+ "$args->{self_alias}.itemtype" => { -ident => "$args->{foreign_alias}.code" },
+ "$args->{foreign_alias}.lang" => $LANGUAGE,
+ });
+
+ }
+);
-# You can replace this text with custom content, and it will be preserved on regeneration
1;