X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FRequirementSpecItem.pm;h=50c167deda61d437c4d8fd7c192ac52f2afafece;hb=4b4f09f600529e048be9e9d21357d1840759bdaa;hp=85cfc362a3c94bd09a15b2f52c9f673d28c25943;hpb=d17e1b9d1b761bb19d0cb79a742ea70a07028998;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/RequirementSpecItem.pm b/SL/DB/MetaSetup/RequirementSpecItem.pm index 85cfc362a..50c167ded 100644 --- a/SL/DB/MetaSetup/RequirementSpecItem.pm +++ b/SL/DB/MetaSetup/RequirementSpecItem.pm @@ -4,66 +4,65 @@ package SL::DB::RequirementSpecItem; use strict; -use base qw(SL::DB::Object); +use parent qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'requirement_spec_items', +__PACKAGE__->meta->table('requirement_spec_items'); - columns => [ - id => { type => 'serial', not_null => 1 }, - requirement_spec_id => { type => 'integer', not_null => 1 }, - parent_id => { type => 'integer' }, - position => { type => 'integer', not_null => 1 }, - fb_number => { type => 'text', not_null => 1 }, - title => { type => 'text' }, - description => { type => 'text' }, - complexity_id => { type => 'integer' }, - risk_id => { type => 'integer' }, - time_estimation => { type => 'numeric', default => '0', not_null => 1, precision => 2, scale => 12 }, - net_sum => { type => 'numeric', default => '0', not_null => 1, precision => 2, scale => 12 }, - is_flagged => { type => 'boolean', default => 'false', not_null => 1 }, - acceptance_status_id => { type => 'integer' }, - acceptance_text => { type => 'text' }, - itime => { type => 'timestamp', default => 'now()', not_null => 1 }, - mtime => { type => 'timestamp' }, - ], +__PACKAGE__->meta->columns( + acceptance_status_id => { type => 'integer' }, + acceptance_text => { type => 'text' }, + complexity_id => { type => 'integer' }, + description => { type => 'text' }, + fb_number => { type => 'text', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + is_flagged => { type => 'boolean', default => 'false', not_null => 1 }, + item_type => { type => 'text', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()', not_null => 1 }, + mtime => { type => 'timestamp' }, + order_part_id => { type => 'integer' }, + parent_id => { type => 'integer' }, + position => { type => 'integer', not_null => 1 }, + requirement_spec_id => { type => 'integer', not_null => 1 }, + risk_id => { type => 'integer' }, + sellprice_factor => { type => 'numeric', default => 1, precision => 10, scale => 5 }, + time_estimation => { type => 'numeric', default => '0', not_null => 1, precision => 12, scale => 2 }, + title => { type => 'text' }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->allow_inline_column_values(1); - allow_inline_column_values => 1, +__PACKAGE__->meta->foreign_keys( + acceptance_status => { + class => 'SL::DB::RequirementSpecAcceptanceStatus', + key_columns => { acceptance_status_id => 'id' }, + }, - foreign_keys => [ - acceptance_status => { - class => 'SL::DB::RequirementSpecAcceptanceStatus', - key_columns => { acceptance_status_id => 'id' }, - }, + complexity => { + class => 'SL::DB::RequirementSpecComplexity', + key_columns => { complexity_id => 'id' }, + }, - complexity => { - class => 'SL::DB::RequirementSpecComplexity', - key_columns => { complexity_id => 'id' }, - }, + order_part => { + class => 'SL::DB::Part', + key_columns => { order_part_id => 'id' }, + }, - parent => { - class => 'SL::DB::RequirementSpecItem', - key_columns => { parent_id => 'id' }, - }, - ], + parent => { + class => 'SL::DB::RequirementSpecItem', + key_columns => { parent_id => 'id' }, + }, - relationships => [ - depended_items => { - map_class => 'SL::DB::RequirementSpecDependency', - map_from => 'depending_item', - map_to => 'depended_item', - type => 'many to many', - }, + requirement_spec => { + class => 'SL::DB::RequirementSpec', + key_columns => { requirement_spec_id => 'id' }, + }, - depending_items => { - map_class => 'SL::DB::RequirementSpecDependency', - map_from => 'depended_item', - map_to => 'depending_item', - type => 'many to many', - }, - ], + risk => { + class => 'SL::DB::RequirementSpecRisk', + key_columns => { risk_id => 'id' }, + }, ); 1;