Sprache um Attribut ungültig erweitert
[kivitendo-erp.git] / SL / DB / MetaSetup / TodoUserConfig.pm
index 2be46cd..f745dae 100644 (file)
@@ -4,29 +4,27 @@ package SL::DB::TodoUserConfig;
 
 use strict;
 
-use base qw(SL::DB::Object);
+use parent qw(SL::DB::Object);
 
-__PACKAGE__->meta->setup(
-  table   => 'todo_user_config',
+__PACKAGE__->meta->table('todo_user_config');
 
-  columns => [
-    employee_id                         => { type => 'integer', not_null => 1 },
-    show_after_login                    => { type => 'boolean', default => 'true' },
-    show_follow_ups                     => { type => 'boolean', default => 'true' },
-    show_follow_ups_login               => { type => 'boolean', default => 'true' },
-    show_overdue_sales_quotations       => { type => 'boolean', default => 'true' },
-    show_overdue_sales_quotations_login => { type => 'boolean', default => 'true' },
-    id                                  => { type => 'serial', not_null => 1 },
-  ],
+__PACKAGE__->meta->columns(
+  employee_id                         => { type => 'integer', not_null => 1 },
+  id                                  => { type => 'serial', not_null => 1 },
+  show_after_login                    => { type => 'boolean', default => 'true' },
+  show_follow_ups                     => { type => 'boolean', default => 'true' },
+  show_follow_ups_login               => { type => 'boolean', default => 'true' },
+  show_overdue_sales_quotations       => { type => 'boolean', default => 'true' },
+  show_overdue_sales_quotations_login => { type => 'boolean', default => 'true' },
+);
 
-  primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-  foreign_keys => [
-    employee => {
-      class       => 'SL::DB::Employee',
-      key_columns => { employee_id => 'id' },
-    },
-  ],
+__PACKAGE__->meta->foreign_keys(
+  employee => {
+    class       => 'SL::DB::Employee',
+    key_columns => { employee_id => 'id' },
+  },
 );
 
 1;