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)
51 =head2 rentalcharge_daily
57 =head2 rentalcharge_daily_calendar
63 =head2 rentalcharge_hourly
69 =head2 rentalcharge_hourly_calendar
75 =head2 defaultreplacecost
100 data_type: 'mediumtext'
109 =head2 checkinmsgtype
112 default_value: 'message'
116 =head2 sip_media_type
128 =head2 searchcategory
136 __PACKAGE__
->add_columns(
138 { data_type
=> "varchar", default_value
=> "", is_nullable
=> 0, size
=> 10 },
140 { data_type
=> "varchar", is_foreign_key
=> 1, is_nullable
=> 1, size
=> 10 },
142 { data_type
=> "longtext", is_nullable
=> 1 },
144 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
145 "rentalcharge_daily",
146 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
147 "rentalcharge_daily_calendar",
148 { data_type
=> "tinyint", default_value
=> 1, is_nullable
=> 0 },
149 "rentalcharge_hourly",
150 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
151 "rentalcharge_hourly_calendar",
152 { data_type
=> "tinyint", default_value
=> 1, is_nullable
=> 0 },
153 "defaultreplacecost",
154 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
156 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
158 { data_type
=> "smallint", is_nullable
=> 1 },
160 { data_type
=> "varchar", is_nullable
=> 1, size
=> 200 },
162 { data_type
=> "mediumtext", is_nullable
=> 1 },
164 { data_type
=> "varchar", is_nullable
=> 1, size
=> 255 },
168 default_value
=> "message",
173 { data_type
=> "varchar", is_nullable
=> 1, size
=> 3 },
175 { data_type
=> "tinyint", default_value
=> 0, is_nullable
=> 0 },
177 { data_type
=> "varchar", is_nullable
=> 1, size
=> 80 },
190 __PACKAGE__
->set_primary_key("itemtype");
194 =head2 circulation_rules
198 Related object: L<Koha::Schema::Result::CirculationRule>
202 __PACKAGE__
->has_many(
204 "Koha::Schema::Result::CirculationRule",
205 { "foreign.itemtype" => "self.itemtype" },
206 { cascade_copy
=> 0, cascade_delete
=> 0 },
213 Related object: L<Koha::Schema::Result::Itemtype>
217 __PACKAGE__
->has_many(
219 "Koha::Schema::Result::Itemtype",
220 { "foreign.parent_type" => "self.itemtype" },
221 { cascade_copy
=> 0, cascade_delete
=> 0 },
224 =head2 itemtypes_branches
228 Related object: L<Koha::Schema::Result::ItemtypesBranch>
232 __PACKAGE__
->has_many(
233 "itemtypes_branches",
234 "Koha::Schema::Result::ItemtypesBranch",
235 { "foreign.itemtype" => "self.itemtype" },
236 { cascade_copy
=> 0, cascade_delete
=> 0 },
243 Related object: L<Koha::Schema::Result::OldReserve>
247 __PACKAGE__
->has_many(
249 "Koha::Schema::Result::OldReserve",
250 { "foreign.itemtype" => "self.itemtype" },
251 { cascade_copy
=> 0, cascade_delete
=> 0 },
258 Related object: L<Koha::Schema::Result::Itemtype>
262 __PACKAGE__
->belongs_to(
264 "Koha::Schema::Result::Itemtype",
265 { itemtype
=> "parent_type" },
269 on_delete
=> "CASCADE",
270 on_update
=> "CASCADE",
278 Related object: L<Koha::Schema::Result::Reserve>
282 __PACKAGE__
->has_many(
284 "Koha::Schema::Result::Reserve",
285 { "foreign.itemtype" => "self.itemtype" },
286 { cascade_copy
=> 0, cascade_delete
=> 0 },
290 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-08-13 08:14:04
291 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5RxmTmtrwJJhTZMur1N05A
293 __PACKAGE__
->add_columns(
294 '+rentalcharge_hourly_calendar' => { is_boolean
=> 1 },
295 '+rentalcharge_daily_calendar' => { is_boolean
=> 1 },
298 # Use the ItemtypeLocalization view to create the join on localization
300 __PACKAGE__
->has_many(
301 "localization" => "Koha::Schema::Result::ItemtypeLocalization",
305 die "no lang specified!" unless $LANGUAGE;
308 "$args->{self_alias}.itemtype" => { -ident
=> "$args->{foreign_alias}.code" },
309 "$args->{foreign_alias}.lang" => $LANGUAGE,
315 sub koha_object_class
{
318 sub koha_objects_class
{