RDBO-Model von delivery_terms neu erzeugen, als Mapping hinzufügen
authorMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 10 Dec 2013 14:49:45 +0000 (15:49 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 10 Dec 2013 14:50:29 +0000 (15:50 +0100)
SL/DB/Helper/Mappings.pm
SL/DB/MetaSetup/DeliveryTerm.pm

index e8dfb56..35d601d 100644 (file)
@@ -120,6 +120,7 @@ my %kivitendo_package_names = (
   delivery_orders                => 'delivery_order',
   delivery_order_items           => 'delivery_order_item',
   delivery_order_items_stock     => 'delivery_order_items_stock',
+  delivery_terms                 => 'delivery_term',
   department                     => 'department',
   drafts                         => 'draft',
   dunning                        => 'dunning',
index ebcc7ea..672aba1 100644 (file)
@@ -6,22 +6,20 @@ use strict;
 
 use base qw(SL::DB::Object);
 
-__PACKAGE__->meta->setup(
-  table   => 'delivery_terms',
+__PACKAGE__->meta->table('delivery_terms');
 
-  columns => [
-    id               => { type => 'integer', not_null => 1, sequence => 'id' },
-    description      => { type => 'text' },
-    description_long => { type => 'text' },
-    sortkey          => { type => 'integer', not_null => 1 },
-    itime            => { type => 'timestamp', default => 'now()' },
-    mtime            => { type => 'timestamp' },
-  ],
+__PACKAGE__->meta->columns(
+  description      => { type => 'text' },
+  description_long => { type => 'text' },
+  id               => { type => 'integer', not_null => 1, sequence => 'id' },
+  itime            => { type => 'timestamp', default => 'now()' },
+  mtime            => { type => 'timestamp' },
+  sortkey          => { type => 'integer', not_null => 1 },
+);
 
-  primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-  allow_inline_column_values => 1,
-);
+__PACKAGE__->meta->allow_inline_column_values(1);
 
 1;
 ;