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_daily_calendar
56 =head2 rentalcharge_hourly
62 =head2 rentalcharge_hourly_calendar
68 =head2 defaultreplacecost
93 data_type: 'mediumtext'
102 =head2 checkinmsgtype
105 default_value: 'message'
109 =head2 sip_media_type
121 =head2 searchcategory
129 __PACKAGE__
->add_columns(
131 { data_type
=> "varchar", default_value
=> "", is_nullable
=> 0, size
=> 10 },
133 { data_type
=> "longtext", is_nullable
=> 1 },
135 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
136 "rentalcharge_daily",
137 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
138 "rentalcharge_daily_calendar",
139 { data_type
=> "tinyint", default_value
=> 1, is_nullable
=> 0 },
140 "rentalcharge_hourly",
141 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
142 "rentalcharge_hourly_calendar",
143 { data_type
=> "tinyint", default_value
=> 1, is_nullable
=> 0 },
144 "defaultreplacecost",
145 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
147 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
149 { data_type
=> "smallint", is_nullable
=> 1 },
151 { data_type
=> "varchar", is_nullable
=> 1, size
=> 200 },
153 { data_type
=> "mediumtext", is_nullable
=> 1 },
155 { data_type
=> "varchar", is_nullable
=> 1, size
=> 255 },
159 default_value
=> "message",
164 { data_type
=> "varchar", is_nullable
=> 1, size
=> 3 },
166 { data_type
=> "tinyint", default_value
=> 0, is_nullable
=> 0 },
168 { data_type
=> "varchar", is_nullable
=> 1, size
=> 80 },
181 __PACKAGE__
->set_primary_key("itemtype");
185 =head2 circulation_rules
189 Related object: L<Koha::Schema::Result::CirculationRule>
193 __PACKAGE__
->has_many(
195 "Koha::Schema::Result::CirculationRule",
196 { "foreign.itemtype" => "self.itemtype" },
197 { cascade_copy
=> 0, cascade_delete
=> 0 },
200 =head2 itemtypes_branches
204 Related object: L<Koha::Schema::Result::ItemtypesBranch>
208 __PACKAGE__
->has_many(
209 "itemtypes_branches",
210 "Koha::Schema::Result::ItemtypesBranch",
211 { "foreign.itemtype" => "self.itemtype" },
212 { cascade_copy
=> 0, cascade_delete
=> 0 },
219 Related object: L<Koha::Schema::Result::OldReserve>
223 __PACKAGE__
->has_many(
225 "Koha::Schema::Result::OldReserve",
226 { "foreign.itemtype" => "self.itemtype" },
227 { cascade_copy
=> 0, cascade_delete
=> 0 },
234 Related object: L<Koha::Schema::Result::Reserve>
238 __PACKAGE__
->has_many(
240 "Koha::Schema::Result::Reserve",
241 { "foreign.itemtype" => "self.itemtype" },
242 { cascade_copy
=> 0, cascade_delete
=> 0 },
246 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-09 17:13:18
247 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7ojvTzsDvdHPAJMwJrAZ7A
249 __PACKAGE__
->add_columns(
250 '+rentalcharge_hourly_calendar' => { is_boolean
=> 1 },
251 '+rentalcharge_daily_calendar' => { is_boolean
=> 1 },
254 # Use the ItemtypeLocalization view to create the join on localization
256 __PACKAGE__
->has_many(
257 "localization" => "Koha::Schema::Result::ItemtypeLocalization",
261 die "no lang specified!" unless $LANGUAGE;
264 "$args->{self_alias}.itemtype" => { -ident
=> "$args->{foreign_alias}.code" },
265 "$args->{foreign_alias}.lang" => $LANGUAGE,
271 sub koha_object_class
{
274 sub koha_objects_class
{