Pflichtenhefte: Dokumentation; Refactoring; Bugfix Diff-Berechnung
[kivitendo-erp.git] / SL / DB / MetaSetup / RequirementSpecItem.pm
index 85cfc36..62f9bcc 100644 (file)
@@ -12,6 +12,7 @@ __PACKAGE__->meta->setup(
   columns => [
     id                   => { type => 'serial', not_null => 1 },
     requirement_spec_id  => { type => 'integer', not_null => 1 },
+    item_type            => { type => 'text', not_null => 1 },
     parent_id            => { type => 'integer' },
     position             => { type => 'integer', not_null => 1 },
     fb_number            => { type => 'text', not_null => 1 },
@@ -47,21 +48,15 @@ __PACKAGE__->meta->setup(
       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' },
     },
   ],
 );