X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FFollowUpAccess.pm;h=fa6898ea950321e3b7c3c77fb61ace44208cfc09;hb=142ea3bff784ba29bd87de5615bb4f2aec8c977f;hp=0a26083f861cd4d2759041de4bec445ceb833fe5;hpb=6cf3f7762efd40bee49a2b8f11bb4ab6915d9071;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/FollowUpAccess.pm b/SL/DB/MetaSetup/FollowUpAccess.pm index 0a26083f8..fa6898ea9 100644 --- a/SL/DB/MetaSetup/FollowUpAccess.pm +++ b/SL/DB/MetaSetup/FollowUpAccess.pm @@ -4,30 +4,28 @@ package SL::DB::FollowUpAccess; use strict; -use base qw(SL::DB::Object); - -__PACKAGE__->meta->setup( - table => 'follow_up_access', - - columns => [ - who => { type => 'integer', not_null => 1 }, - what => { type => 'integer', not_null => 1 }, - id => { type => 'serial', not_null => 1 }, - ], - - primary_key_columns => [ 'id' ], - - foreign_keys => [ - employee => { - class => 'SL::DB::Employee', - key_columns => { who => 'id' }, - }, - - employee_obj => { - class => 'SL::DB::Employee', - key_columns => { what => 'id' }, - }, - ], +use parent qw(SL::DB::Object); + +__PACKAGE__->meta->table('follow_up_access'); + +__PACKAGE__->meta->columns( + 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( + to_follow_ups_by => { + class => 'SL::DB::Employee', + key_columns => { what => 'id' }, + }, + + with_access => { + class => 'SL::DB::Employee', + key_columns => { who => 'id' }, + }, ); 1;