X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FPeriodicInvoicesConfig.pm;h=eae8481d42160b4f9a32df2160daff8b32fe0428;hb=3da73190b8f201bfb33e3b6d96bbc6330142e922;hp=aeaf1c2ed0796a9f565e99ae940605d61710a6c6;hpb=e055700faea1906bea6c03184ba4516b57cac887;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/PeriodicInvoicesConfig.pm b/SL/DB/MetaSetup/PeriodicInvoicesConfig.pm index aeaf1c2ed..eae8481d4 100644 --- a/SL/DB/MetaSetup/PeriodicInvoicesConfig.pm +++ b/SL/DB/MetaSetup/PeriodicInvoicesConfig.pm @@ -6,42 +6,41 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'periodic_invoices_configs', - - columns => [ - id => { type => 'integer', not_null => 1, sequence => 'id' }, - oe_id => { type => 'integer', not_null => 1 }, - periodicity => { type => 'varchar', length => 10, not_null => 1 }, - print => { type => 'boolean', default => 'false' }, - printer_id => { type => 'integer' }, - copies => { type => 'integer' }, - active => { type => 'boolean', default => 'true' }, - start_date => { type => 'date' }, - ar_chart_id => { type => 'integer', not_null => 1 }, - terminated => { type => 'boolean', default => 'false' }, - end_date => { type => 'date' }, - extend_automatically_by => { type => 'integer' }, - ], - - primary_key_columns => [ 'id' ], - - foreign_keys => [ - ar_chart => { - class => 'SL::DB::Chart', - key_columns => { ar_chart_id => 'id' }, - }, - - oe => { - class => 'SL::DB::Order', - key_columns => { oe_id => 'id' }, - }, - - printer => { - class => 'SL::DB::Printer', - key_columns => { printer_id => 'id' }, - }, - ], +__PACKAGE__->meta->table('periodic_invoices_configs'); + +__PACKAGE__->meta->columns( + active => { type => 'boolean', default => 'true' }, + ar_chart_id => { type => 'integer', not_null => 1 }, + copies => { type => 'integer' }, + end_date => { type => 'date' }, + extend_automatically_by => { type => 'integer' }, + first_billing_date => { type => 'date' }, + id => { type => 'integer', not_null => 1, sequence => 'id' }, + oe_id => { type => 'integer', not_null => 1 }, + periodicity => { type => 'varchar', length => 10, not_null => 1 }, + print => { type => 'boolean', default => 'false' }, + printer_id => { type => 'integer' }, + start_date => { type => 'date' }, + terminated => { type => 'boolean', default => 'false' }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->foreign_keys( + ar_chart => { + class => 'SL::DB::Chart', + key_columns => { ar_chart_id => 'id' }, + }, + + order => { + class => 'SL::DB::Order', + key_columns => { oe_id => 'id' }, + }, + + printer => { + class => 'SL::DB::Printer', + key_columns => { printer_id => 'id' }, + }, ); 1;