X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FAuthGroupRight.pm;h=92c4db3e149f58a55c5fc56f974cd0cf9f774425;hb=5d1790289c565ace01143d524538bd505859a57c;hp=677796631473aa7e4939684111e03780965f993e;hpb=3568f2f8cb1f21031ee5255f054c0431544c5607;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/AuthGroupRight.pm b/SL/DB/MetaSetup/AuthGroupRight.pm index 677796631..92c4db3e1 100644 --- a/SL/DB/MetaSetup/AuthGroupRight.pm +++ b/SL/DB/MetaSetup/AuthGroupRight.pm @@ -4,19 +4,24 @@ package SL::DB::AuthGroupRight; use strict; -use base qw(SL::DB::Object); +use parent qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'group_rights', - schema => 'auth', +__PACKAGE__->meta->table('group_rights'); +__PACKAGE__->meta->schema('auth'); - columns => [ - group_id => { type => 'integer', not_null => 1 }, - right => { type => 'text', not_null => 1 }, - granted => { type => 'boolean', not_null => 1 }, - ], +__PACKAGE__->meta->columns( + granted => { type => 'boolean', not_null => 1 }, + group_id => { type => 'integer', not_null => 1 }, + right => { type => 'text', not_null => 1 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'group_id', 'right' ]); - primary_key_columns => [ 'group_id', 'right' ], +__PACKAGE__->meta->foreign_keys( + group => { + class => 'SL::DB::AuthGroup', + key_columns => { group_id => 'id' }, + }, ); 1;