255cc93d8a9581bc5952501f7b2d4f6559355cdd
[kivitendo-erp.git] / SL / DB / MetaSetup / Project.pm
1 # This file has been auto-generated. Do not modify it; it will be overwritten
2 # by rose_auto_create_model.pl automatically.
3 package SL::DB::Project;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('project');
10
11 __PACKAGE__->meta->columns(
12   active               => { type => 'boolean', default => 'true' },
13   billable_customer_id => { type => 'integer' },
14   budget_cost          => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
15   budget_minutes       => { type => 'integer', default => '0', not_null => 1 },
16   customer_id          => { type => 'integer' },
17   description          => { type => 'text' },
18   end_date             => { type => 'date' },
19   id                   => { type => 'integer', not_null => 1, sequence => 'id' },
20   itime                => { type => 'timestamp', default => 'now()' },
21   mtime                => { type => 'timestamp' },
22   order_value          => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
23   project_status_id    => { type => 'integer', not_null => 1 },
24   project_type_id      => { type => 'integer', not_null => 1 },
25   projectnumber        => { type => 'text' },
26   start_date           => { type => 'date' },
27   timeframe            => { type => 'boolean', default => 'false', not_null => 1 },
28   valid                => { type => 'boolean', default => 'true' },
29 );
30
31 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
32
33 __PACKAGE__->meta->unique_keys([ 'projectnumber' ]);
34
35 __PACKAGE__->meta->allow_inline_column_values(1);
36
37 __PACKAGE__->meta->foreign_keys(
38   billable_customer => {
39     class       => 'SL::DB::Customer',
40     key_columns => { billable_customer_id => 'id' },
41   },
42
43   customer => {
44     class       => 'SL::DB::Customer',
45     key_columns => { customer_id => 'id' },
46   },
47
48   project_status => {
49     class       => 'SL::DB::ProjectStatus',
50     key_columns => { project_status_id => 'id' },
51   },
52
53   project_type => {
54     class       => 'SL::DB::ProjectType',
55     key_columns => { project_type_id => 'id' },
56   },
57 );
58
59 1;
60 ;