2 package Koha::Schema::Result::Itemtype;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Itemtype
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<itemtypes>
22 __PACKAGE__->table("itemtypes");
29 default_value: (empty string)
44 =head2 rentalcharge_daily
50 =head2 rentalcharge_hourly
56 =head2 defaultreplacecost
81 data_type: 'mediumtext'
93 default_value: 'message'
109 =head2 searchcategory
117 __PACKAGE__->add_columns(
119 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
121 { data_type => "longtext", is_nullable => 1 },
123 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
124 "rentalcharge_daily",
125 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
126 "rentalcharge_hourly",
127 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
128 "defaultreplacecost",
129 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
131 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
133 { data_type => "smallint", is_nullable => 1 },
135 { data_type => "varchar", is_nullable => 1, size => 200 },
137 { data_type => "mediumtext", is_nullable => 1 },
139 { data_type => "varchar", is_nullable => 1, size => 255 },
143 default_value => "message",
148 { data_type => "varchar", is_nullable => 1, size => 3 },
150 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
152 { data_type => "varchar", is_nullable => 1, size => 80 },
165 __PACKAGE__->set_primary_key("itemtype");
169 =head2 branch_item_rules
173 Related object: L<Koha::Schema::Result::BranchItemRule>
177 __PACKAGE__->has_many(
179 "Koha::Schema::Result::BranchItemRule",
180 { "foreign.itemtype" => "self.itemtype" },
181 { cascade_copy => 0, cascade_delete => 0 },
184 =head2 circulation_rules
188 Related object: L<Koha::Schema::Result::CirculationRule>
192 __PACKAGE__->has_many(
194 "Koha::Schema::Result::CirculationRule",
195 { "foreign.itemtype" => "self.itemtype" },
196 { cascade_copy => 0, cascade_delete => 0 },
199 =head2 default_branch_item_rule
203 Related object: L<Koha::Schema::Result::DefaultBranchItemRule>
207 __PACKAGE__->might_have(
208 "default_branch_item_rule",
209 "Koha::Schema::Result::DefaultBranchItemRule",
210 { "foreign.itemtype" => "self.itemtype" },
211 { cascade_copy => 0, cascade_delete => 0 },
218 Related object: L<Koha::Schema::Result::OldReserve>
222 __PACKAGE__->has_many(
224 "Koha::Schema::Result::OldReserve",
225 { "foreign.itemtype" => "self.itemtype" },
226 { cascade_copy => 0, cascade_delete => 0 },
233 Related object: L<Koha::Schema::Result::Reserve>
237 __PACKAGE__->has_many(
239 "Koha::Schema::Result::Reserve",
240 { "foreign.itemtype" => "self.itemtype" },
241 { cascade_copy => 0, cascade_delete => 0 },
245 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-03-07 17:30:46
246 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CDIOU6LmF7suaujk1NQOeg
248 # Use the ItemtypeLocalization view to create the join on localization
250 __PACKAGE__->has_many(
251 "localization" => "Koha::Schema::Result::ItemtypeLocalization",
255 die "no lang specified!" unless $LANGUAGE;
258 "$args->{self_alias}.itemtype" => { -ident => "$args->{foreign_alias}.code" },
259 "$args->{foreign_alias}.lang" => $LANGUAGE,
265 sub koha_object_class {
268 sub koha_objects_class {