X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b8b112a39bd601b0bc717646d78de470631da22a..835e3fd9a0114f9aec38af6c98f69a66cec61bdc:/SL/DB/MetaSetup/BankAccount.pm diff --git a/SL/DB/MetaSetup/BankAccount.pm b/SL/DB/MetaSetup/BankAccount.pm index 94eec593e..8f1abeac6 100644 --- a/SL/DB/MetaSetup/BankAccount.pm +++ b/SL/DB/MetaSetup/BankAccount.pm @@ -9,25 +9,31 @@ use base qw(SL::DB::Object); __PACKAGE__->meta->table('bank_accounts'); __PACKAGE__->meta->columns( - id => { type => 'integer', not_null => 1, sequence => 'id' }, - account_number => { type => 'varchar', length => 100 }, - bank_code => { type => 'varchar', length => 100 }, - iban => { type => 'varchar', length => 100 }, - bic => { type => 'varchar', length => 100 }, - bank => { type => 'text' }, - chart_id => { type => 'integer', not_null => 1 }, + account_number => { type => 'varchar', length => 100 }, + bank => { type => 'text' }, + bank_code => { type => 'varchar', length => 100 }, + bic => { type => 'varchar', length => 100 }, + chart_id => { type => 'integer', not_null => 1 }, + iban => { type => 'varchar', length => 100 }, + id => { type => 'integer', not_null => 1, sequence => 'id' }, + name => { type => 'text' }, + obsolete => { type => 'boolean', default => 'false', not_null => 1 }, + reconciliation_starting_balance => { type => 'numeric', precision => 15, scale => 5 }, + reconciliation_starting_date => { type => 'date' }, + sortkey => { type => 'integer', not_null => 1 }, ); __PACKAGE__->meta->primary_key_columns([ 'id' ]); +__PACKAGE__->meta->unique_keys([ 'chart_id' ]); + __PACKAGE__->meta->foreign_keys( chart => { class => 'SL::DB::Chart', key_columns => { chart_id => 'id' }, + rel_type => 'one to one', }, ); -# __PACKAGE__->meta->initialize; - 1; ;