epic-s6g
[kivitendo-erp.git] / SL / DB / MetaSetup / FollowUpAccess.pm
index 55c6f5f..fa6898e 100644 (file)
@@ -4,31 +4,29 @@ package SL::DB::FollowUpAccess;
 
 use strict;
 
-use base qw(SL::DB::Object);
+use parent qw(SL::DB::Object);
 
 __PACKAGE__->meta->table('follow_up_access');
 
 __PACKAGE__->meta->columns(
-  who  => { type => 'integer', not_null => 1 },
-  what => { type => 'integer', not_null => 1 },
   id   => { type => 'serial', not_null => 1 },
+  what => { type => 'integer', not_null => 1 },
+  who  => { type => 'integer', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->foreign_keys(
-  employee => {
+  to_follow_ups_by => {
     class       => 'SL::DB::Employee',
-    key_columns => { who => 'id' },
+    key_columns => { what => 'id' },
   },
 
-  employee_obj => {
+  with_access => {
     class       => 'SL::DB::Employee',
-    key_columns => { what => 'id' },
+    key_columns => { who => 'id' },
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;