X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FUnitsLanguage.pm;h=07a4f5a2ff1f356c9d9c2afc43974ccd46a208f4;hb=b403498c677894ec7802563777b754e3c26df875;hp=cd00dc869fff31ab711bc2cd020a47ea87594191;hpb=f97b07787db5cacc0f90338fdb3c1237262917cb;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/UnitsLanguage.pm b/SL/DB/MetaSetup/UnitsLanguage.pm index cd00dc869..07a4f5a2f 100644 --- a/SL/DB/MetaSetup/UnitsLanguage.pm +++ b/SL/DB/MetaSetup/UnitsLanguage.pm @@ -4,32 +4,30 @@ package SL::DB::UnitsLanguage; use strict; -use base qw(SL::DB::Object); - -__PACKAGE__->meta->setup( - table => 'units_language', - - columns => [ - unit => { type => 'varchar', length => 20, not_null => 1 }, - language_id => { type => 'integer', not_null => 1 }, - localized => { type => 'varchar', length => 20 }, - localized_plural => { type => 'varchar', length => 20 }, - id => { type => 'serial', not_null => 1 }, - ], - - primary_key_columns => [ 'id' ], - - foreign_keys => [ - language => { - class => 'SL::DB::Language', - key_columns => { language_id => 'id' }, - }, - - unit_obj => { - class => 'SL::DB::Unit', - key_columns => { unit => 'name' }, - }, - ], +use parent qw(SL::DB::Object); + +__PACKAGE__->meta->table('units_language'); + +__PACKAGE__->meta->columns( + id => { type => 'serial', not_null => 1 }, + language_id => { type => 'integer', not_null => 1 }, + localized => { type => 'varchar', length => 20 }, + localized_plural => { type => 'varchar', length => 20 }, + unit => { type => 'varchar', length => 20, not_null => 1 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->foreign_keys( + language => { + class => 'SL::DB::Language', + key_columns => { language_id => 'id' }, + }, + + unit_obj => { + class => 'SL::DB::Unit', + key_columns => { unit => 'name' }, + }, ); 1;