Merge branch 'master' of github.com:kivitendo/kivitendo-erp
[kivitendo-erp.git] / SL / DB / MetaSetup / Project.pm
index 4805568..5131535 100644 (file)
@@ -9,15 +9,15 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('project');
 
 __PACKAGE__->meta->columns(
-  active        => { type => 'boolean', default => 'true' },
-  customer_id   => { type => 'integer' },
-  description   => { type => 'text' },
-  id            => { type => 'integer', not_null => 1, sequence => 'id' },
-  itime         => { type => 'timestamp', default => 'now()' },
-  mtime         => { type => 'timestamp' },
-  projectnumber => { type => 'text' },
-  type          => { type => 'text' },
-  valid         => { type => 'boolean', default => 'true' },
+  active          => { type => 'boolean', default => 'true' },
+  customer_id     => { type => 'integer' },
+  description     => { type => 'text' },
+  id              => { type => 'integer', not_null => 1, sequence => 'id' },
+  itime           => { type => 'timestamp', default => 'now()' },
+  mtime           => { type => 'timestamp' },
+  project_type_id => { type => 'integer', not_null => 1 },
+  projectnumber   => { type => 'text' },
+  valid           => { type => 'boolean', default => 'true' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -31,6 +31,11 @@ __PACKAGE__->meta->foreign_keys(
     class       => 'SL::DB::Customer',
     key_columns => { customer_id => 'id' },
   },
+
+  project_type => {
+    class       => 'SL::DB::ProjectType',
+    key_columns => { project_type_id => 'id' },
+  },
 );
 
 1;