X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FPeriodicInvoice.pm;h=703cb597f238992ef4046b2ea5d90caaac083d7f;hb=97a6f6d623a9810e1d324f44a5f8bcd12294f5d3;hp=2a7abc992dcffbf24591691deff2334b2f0d6b23;hpb=f9c7abfae65b79945beb7e9260942bc94876248a;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/PeriodicInvoice.pm b/SL/DB/MetaSetup/PeriodicInvoice.pm index 2a7abc992..703cb597f 100644 --- a/SL/DB/MetaSetup/PeriodicInvoice.pm +++ b/SL/DB/MetaSetup/PeriodicInvoice.pm @@ -4,34 +4,32 @@ package SL::DB::PeriodicInvoice; use strict; -use base qw(SL::DB::Object); - -__PACKAGE__->meta->setup( - table => 'periodic_invoices', - - columns => [ - id => { type => 'integer', not_null => 1, sequence => 'id' }, - config_id => { type => 'integer', not_null => 1 }, - ar_id => { type => 'integer', not_null => 1 }, - period_start_date => { type => 'date', not_null => 1 }, - itime => { type => 'timestamp', default => 'now()' }, - ], - - primary_key_columns => [ 'id' ], - - allow_inline_column_values => 1, - - foreign_keys => [ - ar => { - class => 'SL::DB::Invoice', - key_columns => { ar_id => 'id' }, - }, - - config => { - class => 'SL::DB::PeriodicInvoicesConfig', - key_columns => { config_id => 'id' }, - }, - ], +use parent qw(SL::DB::Object); + +__PACKAGE__->meta->table('periodic_invoices'); + +__PACKAGE__->meta->columns( + ar_id => { type => 'integer', not_null => 1 }, + config_id => { type => 'integer', not_null => 1 }, + id => { type => 'integer', not_null => 1, sequence => 'id' }, + itime => { type => 'timestamp', default => 'now()' }, + period_start_date => { type => 'date', not_null => 1 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->allow_inline_column_values(1); + +__PACKAGE__->meta->foreign_keys( + ar => { + class => 'SL::DB::Invoice', + key_columns => { ar_id => 'id' }, + }, + + config => { + class => 'SL::DB::PeriodicInvoicesConfig', + key_columns => { config_id => 'id' }, + }, ); 1;