X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FDB%2FMetaSetup%2FPrice.pm;h=a0c26391f9752c0f7fd944c82efa35d49e22b929;hb=97a6f6d623a9810e1d324f44a5f8bcd12294f5d3;hp=bef079492a903d66725483813a92f8045bf4f5fc;hpb=e42233910a57d39f3ccef150db1212f7ecb7fb30;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/Price.pm b/SL/DB/MetaSetup/Price.pm index bef079492..a0c26391f 100644 --- a/SL/DB/MetaSetup/Price.pm +++ b/SL/DB/MetaSetup/Price.pm @@ -4,19 +4,21 @@ package SL::DB::Price; use strict; -use base qw(SL::DB::Object); +use parent qw(SL::DB::Object); __PACKAGE__->meta->table('prices'); __PACKAGE__->meta->columns( id => { type => 'serial', not_null => 1 }, - parts_id => { type => 'integer' }, + parts_id => { type => 'integer', not_null => 1 }, price => { type => 'numeric', precision => 15, scale => 5 }, - pricegroup_id => { type => 'integer' }, + pricegroup_id => { type => 'integer', not_null => 1 }, ); __PACKAGE__->meta->primary_key_columns([ 'id' ]); +__PACKAGE__->meta->unique_keys([ 'parts_id', 'pricegroup_id' ]); + __PACKAGE__->meta->foreign_keys( parts => { class => 'SL::DB::Part',