X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/c09313030ba77f61771483e69179fd916d9328cd..b8b112a39bd601b0bc717646d78de470631da22a:/SL/DB/MetaSetup/PriceFactor.pm diff --git a/SL/DB/MetaSetup/PriceFactor.pm b/SL/DB/MetaSetup/PriceFactor.pm index 2eeb5967a..3d0aa778c 100644 --- a/SL/DB/MetaSetup/PriceFactor.pm +++ b/SL/DB/MetaSetup/PriceFactor.pm @@ -6,18 +6,38 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'price_factors', +__PACKAGE__->meta->table('price_factors'); - columns => [ - id => { type => 'integer', not_null => 1, sequence => 'id' }, - description => { type => 'text' }, - factor => { type => 'numeric', precision => 5, scale => 15 }, - sortkey => { type => 'integer' }, - ], +__PACKAGE__->meta->columns( + id => { type => 'integer', not_null => 1, sequence => 'id' }, + description => { type => 'text' }, + factor => { type => 'numeric', precision => 5, scale => 15 }, + sortkey => { type => 'integer' }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->relationships( + invoice => { + class => 'SL::DB::InvoiceItem', + column_map => { id => 'price_factor_id' }, + type => 'one to many', + }, - primary_key_columns => [ 'id' ], + orderitems => { + class => 'SL::DB::OrderItem', + column_map => { id => 'price_factor_id' }, + type => 'one to many', + }, + + parts => { + class => 'SL::DB::Part', + column_map => { id => 'price_factor_id' }, + type => 'one to many', + }, ); +# __PACKAGE__->meta->initialize; + 1; ;