1 package Koha
::Schema
::Result
::ItemtypeLocalization
;
3 use base
'DBIx::Class::Core';
7 __PACKAGE__
->table_class('DBIx::Class::ResultSource::View');
9 __PACKAGE__
->table('itemtype_localizations');
10 __PACKAGE__
->result_source_instance->is_virtual(1);
11 __PACKAGE__
->result_source_instance->view_definition(
12 "SELECT localization_id, code, lang, translation FROM localization WHERE entity='itemtypes'"
15 __PACKAGE__
->add_columns(
17 { data_type
=> "integer", is_auto_increment
=> 1, is_nullable
=> 0 },
19 { data_type
=> "varchar", is_nullable
=> 0, size
=> 64 },
21 { data_type
=> "varchar", is_nullable
=> 0, size
=> 25 },
23 { data_type
=> "text", is_nullable
=> 1 },
26 __PACKAGE__
->belongs_to(
28 "Koha::Schema::Result::Itemtype",
29 { code
=> 'itemtype' }