epic-ts
[kivitendo-erp.git] / SL / DB / MetaSetup / AuthClientGroup.pm
index e922639..d74a1ed 100644 (file)
@@ -4,29 +4,28 @@ package SL::DB::AuthClientGroup;
 
 use strict;
 
-use base qw(SL::DB::Object);
+use parent qw(SL::DB::Object);
 
-__PACKAGE__->meta->setup(
-  table   => 'clients_groups',
+__PACKAGE__->meta->table('clients_groups');
+__PACKAGE__->meta->schema('auth');
 
-  columns => [
-    client_id => { type => 'integer', not_null => 1 },
-    group_id  => { type => 'integer', not_null => 1 },
-  ],
+__PACKAGE__->meta->columns(
+  client_id => { type => 'integer', not_null => 1 },
+  group_id  => { type => 'integer', not_null => 1 },
+);
 
-  primary_key_columns => [ 'client_id', 'group_id' ],
+__PACKAGE__->meta->primary_key_columns([ 'client_id', 'group_id' ]);
 
-  foreign_keys => [
-    client => {
-      class       => 'SL::DB::AuthClient',
-      key_columns => { client_id => 'id' },
-    },
+__PACKAGE__->meta->foreign_keys(
+  client => {
+    class       => 'SL::DB::AuthClient',
+    key_columns => { client_id => 'id' },
+  },
 
-    group => {
-      class       => 'SL::DB::AuthGroup',
-      key_columns => { group_id => 'id' },
-    },
-  ],
+  group => {
+    class       => 'SL::DB::AuthGroup',
+    key_columns => { group_id => 'id' },
+  },
 );
 
 1;