X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FTaxKey.pm;h=a5bb5ff36237ef0205b8f38f80b73f94caa885ed;hb=2ea07c13e111b88478827bf621d41df3eec19dac;hp=3dc0895cbaf08d126f741c72e36bb828b2d97dbc;hpb=93787f77f19ff64df53a6877b7f732b74eab1606;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/TaxKey.pm b/SL/DB/MetaSetup/TaxKey.pm index 3dc0895cb..a5bb5ff36 100644 --- a/SL/DB/MetaSetup/TaxKey.pm +++ b/SL/DB/MetaSetup/TaxKey.pm @@ -4,35 +4,33 @@ package SL::DB::TaxKey; use strict; -use base qw(SL::DB::Object); - -__PACKAGE__->meta->setup( - table => 'taxkeys', - - columns => [ - id => { type => 'integer', not_null => 1, sequence => 'id' }, - chart_id => { type => 'integer', not_null => 1 }, - tax_id => { type => 'integer', not_null => 1 }, - taxkey_id => { type => 'integer', not_null => 1 }, - pos_ustva => { type => 'integer' }, - startdate => { type => 'date', not_null => 1 }, - ], - - primary_key_columns => [ 'id' ], - - unique_key => [ 'chart_id', 'startdate' ], - - foreign_keys => [ - chart => { - class => 'SL::DB::Chart', - key_columns => { chart_id => 'id' }, - }, - - tax => { - class => 'SL::DB::Tax', - key_columns => { tax_id => 'id' }, - }, - ], +use parent qw(SL::DB::Object); + +__PACKAGE__->meta->table('taxkeys'); + +__PACKAGE__->meta->columns( + chart_id => { type => 'integer', not_null => 1 }, + id => { type => 'integer', not_null => 1, sequence => 'id' }, + pos_ustva => { type => 'integer' }, + startdate => { type => 'date', not_null => 1 }, + tax_id => { type => 'integer', not_null => 1 }, + taxkey_id => { type => 'integer', not_null => 1 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->unique_keys([ 'chart_id', 'startdate' ]); + +__PACKAGE__->meta->foreign_keys( + chart => { + class => 'SL::DB::Chart', + key_columns => { chart_id => 'id' }, + }, + + tax => { + class => 'SL::DB::Tax', + key_columns => { tax_id => 'id' }, + }, ); 1;