MetaSetup neu generiert
[kivitendo-erp.git] / SL / DB / MetaSetup / TaxKey.pm
index 3dc0895..4265037 100644 (file)
@@ -6,34 +6,34 @@ use strict;
 
 use base qw(SL::DB::Object);
 
-__PACKAGE__->meta->setup(
-  table   => 'taxkeys',
-
-  columns => [
-    id        => { type => 'integer', not_null => 1, sequence => 'id' },
-    chart_id  => { type => 'integer', not_null => 1 },
-    tax_id    => { type => 'integer', not_null => 1 },
-    taxkey_id => { type => 'integer', not_null => 1 },
-    pos_ustva => { type => 'integer' },
-    startdate => { type => 'date', not_null => 1 },
-  ],
-
-  primary_key_columns => [ 'id' ],
-
-  unique_key => [ 'chart_id', 'startdate' ],
-
-  foreign_keys => [
-    chart => {
-      class       => 'SL::DB::Chart',
-      key_columns => { chart_id => 'id' },
-    },
-
-    tax => {
-      class       => 'SL::DB::Tax',
-      key_columns => { tax_id => 'id' },
-    },
-  ],
+__PACKAGE__->meta->table('taxkeys');
+
+__PACKAGE__->meta->columns(
+  id        => { type => 'integer', not_null => 1, sequence => 'id' },
+  chart_id  => { type => 'integer', not_null => 1 },
+  tax_id    => { type => 'integer', not_null => 1 },
+  taxkey_id => { type => 'integer', not_null => 1 },
+  pos_ustva => { type => 'integer' },
+  startdate => { type => 'date', not_null => 1 },
 );
 
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->unique_keys([ 'chart_id', 'startdate' ]);
+
+__PACKAGE__->meta->foreign_keys(
+  chart => {
+    class       => 'SL::DB::Chart',
+    key_columns => { chart_id => 'id' },
+  },
+
+  tax => {
+    class       => 'SL::DB::Tax',
+    key_columns => { tax_id => 'id' },
+  },
+);
+
+# __PACKAGE__->meta->initialize;
+
 1;
 ;