Bug 17855 - Followup patch following requests in comments 176 and 177
[koha.git] / Koha / Schema / Result / ItemtypeLocalization.pm
blobd5966128c36c647af752e12b7f7d4b88983717cd
1 package Koha::Schema::Result::ItemtypeLocalization;
3 use base 'DBIx::Class::Core';
5 use Modern::Perl;
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(
16 "localization_id",
17 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
18 "code",
19 { data_type => "varchar", is_nullable => 0, size => 64 },
20 "lang",
21 { data_type => "varchar", is_nullable => 0, size => 25 },
22 "translation",
23 { data_type => "text", is_nullable => 1 },
26 __PACKAGE__->belongs_to(
27 "itemtype",
28 "Koha::Schema::Result::Itemtype",
29 { code => 'itemtype' }