X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FAccTransaction.pm;h=23a1b17665d011080e98896a360eb80910cce996;hb=9fda7972d8dd37f1a760a7b430b638c202aac2b7;hp=e16dfd116aa19d0759db4ad4ea86918cf79beede;hpb=95f559de4505bbeeb325d688f8a154b00d4a5a68;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/AccTransaction.pm b/SL/DB/MetaSetup/AccTransaction.pm index e16dfd116..23a1b1766 100644 --- a/SL/DB/MetaSetup/AccTransaction.pm +++ b/SL/DB/MetaSetup/AccTransaction.pm @@ -4,52 +4,50 @@ package SL::DB::AccTransaction; use strict; -use base qw(SL::DB::Object); - -__PACKAGE__->meta->setup( - table => 'acc_trans', - - columns => [ - acc_trans_id => { type => 'bigint', not_null => 1, sequence => 'acc_trans_id_seq' }, - trans_id => { type => 'integer', not_null => 1 }, - chart_id => { type => 'integer', not_null => 1 }, - amount => { type => 'numeric', precision => 5, scale => 15 }, - transdate => { type => 'date', default => 'now' }, - gldate => { type => 'date', default => 'now' }, - source => { type => 'text' }, - cleared => { type => 'boolean', default => 'false', not_null => 1 }, - fx_transaction => { type => 'boolean', default => 'false', not_null => 1 }, - ob_transaction => { type => 'boolean', default => 'false', not_null => 1 }, - cb_transaction => { type => 'boolean', default => 'false', not_null => 1 }, - project_id => { type => 'integer' }, - memo => { type => 'text' }, - taxkey => { type => 'integer' }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - tax_id => { type => 'integer', not_null => 1 }, - chart_link => { type => 'text', not_null => 1 }, - ], - - primary_key_columns => [ 'acc_trans_id' ], - - allow_inline_column_values => 1, - - foreign_keys => [ - chart => { - class => 'SL::DB::Chart', - key_columns => { chart_id => 'id' }, - }, - - project => { - class => 'SL::DB::Project', - key_columns => { project_id => 'id' }, - }, - - tax => { - class => 'SL::DB::Tax', - key_columns => { tax_id => 'id' }, - }, - ], +use parent qw(SL::DB::Object); + +__PACKAGE__->meta->table('acc_trans'); + +__PACKAGE__->meta->columns( + acc_trans_id => { type => 'bigint', not_null => 1, sequence => 'acc_trans_id_seq' }, + amount => { type => 'numeric', precision => 15, scale => 5 }, + cb_transaction => { type => 'boolean', default => 'false', not_null => 1 }, + chart_id => { type => 'integer', not_null => 1 }, + chart_link => { type => 'text', not_null => 1 }, + cleared => { type => 'boolean', default => 'false', not_null => 1 }, + fx_transaction => { type => 'boolean', default => 'false', not_null => 1 }, + gldate => { type => 'date', default => 'now' }, + itime => { type => 'timestamp', default => 'now()' }, + memo => { type => 'text' }, + mtime => { type => 'timestamp' }, + ob_transaction => { type => 'boolean', default => 'false', not_null => 1 }, + project_id => { type => 'integer' }, + source => { type => 'text' }, + tax_id => { type => 'integer', not_null => 1 }, + taxkey => { type => 'integer' }, + trans_id => { type => 'integer', not_null => 1 }, + transdate => { type => 'date', default => 'now' }, +); + +__PACKAGE__->meta->primary_key_columns([ 'acc_trans_id' ]); + +__PACKAGE__->meta->allow_inline_column_values(1); + +__PACKAGE__->meta->foreign_keys( + chart => { + class => 'SL::DB::Chart', + key_columns => { chart_id => 'id' }, + }, + + project => { + class => 'SL::DB::Project', + key_columns => { project_id => 'id' }, + }, + + tax => { + class => 'SL::DB::Tax', + key_columns => { tax_id => 'id' }, + }, ); 1;