Merge branch 'master' of github.com:kivitendo/kivitendo-erp
[kivitendo-erp.git] / SL / DB / MetaSetup / Employee.pm
index f86174f..b79d078 100644 (file)
@@ -6,34 +6,32 @@ use strict;
 
 use base qw(SL::DB::Object);
 
-__PACKAGE__->meta->setup(
-  table   => 'employee',
-
-  columns => [
-    id        => { type => 'integer', not_null => 1, sequence => 'id' },
-    login     => { type => 'text' },
-    startdate => { type => 'date', default => 'now' },
-    enddate   => { type => 'date' },
-    notes     => { type => 'text' },
-    role      => { type => 'text' },
-    sales     => { type => 'boolean', default => 'true' },
-    itime     => { type => 'timestamp', default => 'now()' },
-    mtime     => { type => 'timestamp' },
-    name      => { type => 'text' },
-    addr1     => { type => 'text' },
-    addr2     => { type => 'text' },
-    addr3     => { type => 'text' },
-    addr4     => { type => 'text' },
-    homephone => { type => 'text' },
-    workphone => { type => 'text' },
-  ],
-
-  primary_key_columns => [ 'id' ],
-
-  unique_key => [ 'login' ],
-
-  allow_inline_column_values => 1,
+__PACKAGE__->meta->table('employee');
+
+__PACKAGE__->meta->columns(
+  addr1     => { type => 'text' },
+  addr2     => { type => 'text' },
+  addr3     => { type => 'text' },
+  addr4     => { type => 'text' },
+  deleted   => { type => 'boolean', default => 'false' },
+  enddate   => { type => 'date' },
+  homephone => { type => 'text' },
+  id        => { type => 'integer', not_null => 1, sequence => 'id' },
+  itime     => { type => 'timestamp', default => 'now()' },
+  login     => { type => 'text' },
+  mtime     => { type => 'timestamp' },
+  name      => { type => 'text' },
+  notes     => { type => 'text' },
+  sales     => { type => 'boolean', default => 'true' },
+  startdate => { type => 'date', default => 'now' },
+  workphone => { type => 'text' },
 );
 
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->unique_keys([ 'login' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
 1;
 ;