Neues DB-Setup für Währungen
[kivitendo-erp.git] / SL / DB / MetaSetup / DeliveryOrder.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::DeliveryOrder;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->setup(
10   table   => 'delivery_orders',
11
12   columns => [
13     id                      => { type => 'integer', not_null => 1, sequence => 'id' },
14     donumber                => { type => 'text', not_null => 1 },
15     ordnumber               => { type => 'text' },
16     transdate               => { type => 'date', default => 'now()' },
17     vendor_id               => { type => 'integer' },
18     customer_id             => { type => 'integer' },
19     reqdate                 => { type => 'date' },
20     shippingpoint           => { type => 'text' },
21     notes                   => { type => 'text' },
22     intnotes                => { type => 'text' },
23     employee_id             => { type => 'integer' },
24     closed                  => { type => 'boolean', default => 'false' },
25     delivered               => { type => 'boolean', default => 'false' },
26     cusordnumber            => { type => 'text' },
27     oreqnumber              => { type => 'text' },
28     department_id           => { type => 'integer' },
29     shipvia                 => { type => 'text' },
30     cp_id                   => { type => 'integer' },
31     language_id             => { type => 'integer' },
32     shipto_id               => { type => 'integer' },
33     globalproject_id        => { type => 'integer' },
34     salesman_id             => { type => 'integer' },
35     transaction_description => { type => 'text' },
36     is_sales                => { type => 'boolean' },
37     itime                   => { type => 'timestamp', default => 'now()' },
38     mtime                   => { type => 'timestamp' },
39     taxzone_id              => { type => 'integer' },
40     taxincluded             => { type => 'boolean' },
41     terms                   => { type => 'integer' },
42     currency_id             => { type => 'integer', not_null => 1 },
43   ],
44
45   primary_key_columns => [ 'id' ],
46
47   foreign_keys => [
48     contact => {
49       class       => 'SL::DB::Contact',
50       key_columns => { cp_id => 'cp_id' },
51     },
52
53     customer => {
54       class       => 'SL::DB::Customer',
55       key_columns => { customer_id => 'id' },
56     },
57
58     department => {
59       class       => 'SL::DB::Department',
60       key_columns => { department_id => 'id' },
61     },
62
63     employee => {
64       class       => 'SL::DB::Employee',
65       key_columns => { employee_id => 'id' },
66     },
67
68     globalproject => {
69       class       => 'SL::DB::Project',
70       key_columns => { globalproject_id => 'id' },
71     },
72
73     language => {
74       class       => 'SL::DB::Language',
75       key_columns => { language_id => 'id' },
76     },
77
78     salesman => {
79       class       => 'SL::DB::Employee',
80       key_columns => { salesman_id => 'id' },
81     },
82
83     shipto => {
84       class       => 'SL::DB::Shipto',
85       key_columns => { shipto_id => 'shipto_id' },
86     },
87
88     vendor => {
89       class       => 'SL::DB::Vendor',
90       key_columns => { vendor_id => 'id' },
91     },
92   ],
93 );
94
95 1;
96 ;