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 defaultreplacecost
69 data_type: 'mediumtext'
81 default_value: 'message'
105 __PACKAGE__
->add_columns(
107 { data_type
=> "varchar", default_value
=> "", is_nullable
=> 0, size
=> 10 },
109 { data_type
=> "longtext", is_nullable
=> 1 },
111 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
112 "defaultreplacecost",
113 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
115 { data_type
=> "decimal", is_nullable
=> 1, size
=> [28, 6] },
117 { data_type
=> "smallint", is_nullable
=> 1 },
119 { data_type
=> "varchar", is_nullable
=> 1, size
=> 200 },
121 { data_type
=> "mediumtext", is_nullable
=> 1 },
123 { data_type
=> "varchar", is_nullable
=> 1, size
=> 255 },
127 default_value
=> "message",
132 { data_type
=> "varchar", is_nullable
=> 1, size
=> 3 },
134 { data_type
=> "tinyint", default_value
=> 0, is_nullable
=> 0 },
136 { data_type
=> "varchar", is_nullable
=> 1, size
=> 80 },
149 __PACKAGE__
->set_primary_key("itemtype");
153 =head2 branch_item_rules
157 Related object: L<Koha::Schema::Result::BranchItemRule>
161 __PACKAGE__
->has_many(
163 "Koha::Schema::Result::BranchItemRule",
164 { "foreign.itemtype" => "self.itemtype" },
165 { cascade_copy
=> 0, cascade_delete
=> 0 },
168 =head2 circulation_rules
172 Related object: L<Koha::Schema::Result::CirculationRule>
176 __PACKAGE__
->has_many(
178 "Koha::Schema::Result::CirculationRule",
179 { "foreign.itemtype" => "self.itemtype" },
180 { cascade_copy
=> 0, cascade_delete
=> 0 },
183 =head2 default_branch_item_rule
187 Related object: L<Koha::Schema::Result::DefaultBranchItemRule>
191 __PACKAGE__
->might_have(
192 "default_branch_item_rule",
193 "Koha::Schema::Result::DefaultBranchItemRule",
194 { "foreign.itemtype" => "self.itemtype" },
195 { cascade_copy
=> 0, cascade_delete
=> 0 },
202 Related object: L<Koha::Schema::Result::OldReserve>
206 __PACKAGE__
->has_many(
208 "Koha::Schema::Result::OldReserve",
209 { "foreign.itemtype" => "self.itemtype" },
210 { cascade_copy
=> 0, cascade_delete
=> 0 },
217 Related object: L<Koha::Schema::Result::Reserve>
221 __PACKAGE__
->has_many(
223 "Koha::Schema::Result::Reserve",
224 { "foreign.itemtype" => "self.itemtype" },
225 { cascade_copy
=> 0, cascade_delete
=> 0 },
229 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-05 14:29:17
230 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GthTVMBLO5Zi6NU3up3m+A
232 # Use the ItemtypeLocalization view to create the join on localization
234 __PACKAGE__
->has_many(
235 "localization" => "Koha::Schema::Result::ItemtypeLocalization",
239 die "no lang specified!" unless $LANGUAGE;
242 "$args->{self_alias}.itemtype" => { -ident
=> "$args->{foreign_alias}.code" },
243 "$args->{foreign_alias}.lang" => $LANGUAGE,