Doppelter foreign key auf oe wieder entfernt
[kivitendo-erp.git] / SL / DB / MetaSetup / Order.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::Order;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->setup(
10   table   => 'oe',
11
12   columns => [
13     id                      => { type => 'integer', not_null => 1, sequence => 'id' },
14     ordnumber               => { type => 'text', not_null => 1 },
15     transdate               => { type => 'date', default => 'now' },
16     vendor_id               => { type => 'integer' },
17     customer_id             => { type => 'integer' },
18     amount                  => { type => 'numeric', precision => 5, scale => 15 },
19     netamount               => { type => 'numeric', precision => 5, scale => 15 },
20     reqdate                 => { type => 'date' },
21     taxincluded             => { type => 'boolean' },
22     shippingpoint           => { type => 'text' },
23     notes                   => { type => 'text' },
24     curr                    => { type => 'character', length => 3 },
25     employee_id             => { type => 'integer' },
26     closed                  => { type => 'boolean', default => 'false' },
27     quotation               => { type => 'boolean', default => 'false' },
28     quonumber               => { type => 'text' },
29     cusordnumber            => { type => 'text' },
30     intnotes                => { type => 'text' },
31     department_id           => { type => 'integer' },
32     itime                   => { type => 'timestamp', default => 'now()' },
33     mtime                   => { type => 'timestamp' },
34     shipvia                 => { type => 'text' },
35     cp_id                   => { type => 'integer' },
36     language_id             => { type => 'integer' },
37     payment_id              => { type => 'integer' },
38     delivery_customer_id    => { type => 'integer' },
39     delivery_vendor_id      => { type => 'integer' },
40     taxzone_id              => { type => 'integer' },
41     proforma                => { type => 'boolean', default => 'false' },
42     shipto_id               => { type => 'integer' },
43     delivered               => { type => 'boolean', default => 'false' },
44     globalproject_id        => { type => 'integer' },
45     salesman_id             => { type => 'integer' },
46     transaction_description => { type => 'text' },
47     marge_total             => { type => 'numeric', precision => 5, scale => 15 },
48     marge_percent           => { type => 'numeric', precision => 5, scale => 15 },
49   ],
50
51   primary_key_columns => [ 'id' ],
52
53   allow_inline_column_values => 1,
54
55   foreign_keys => [
56     contact => {
57       class       => 'SL::DB::Contact',
58       key_columns => { cp_id => 'cp_id' },
59     },
60
61     customer => {
62       class       => 'SL::DB::Customer',
63       key_columns => { customer_id => 'id' },
64     },
65
66     delivery_customer => {
67       class       => 'SL::DB::Customer',
68       key_columns => { delivery_customer_id => 'id' },
69     },
70
71     delivery_vendor => {
72       class       => 'SL::DB::Vendor',
73       key_columns => { delivery_vendor_id => 'id' },
74     },
75
76     department => {
77       class       => 'SL::DB::Department',
78       key_columns => { department_id => 'id' },
79     },
80
81     employee => {
82       class       => 'SL::DB::Employee',
83       key_columns => { employee_id => 'id' },
84     },
85
86     globalproject => {
87       class       => 'SL::DB::Project',
88       key_columns => { globalproject_id => 'id' },
89     },
90
91     language => {
92       class       => 'SL::DB::Language',
93       key_columns => { language_id => 'id' },
94     },
95
96     payment => {
97       class       => 'SL::DB::PaymentTerm',
98       key_columns => { payment_id => 'id' },
99     },
100
101     salesman => {
102       class       => 'SL::DB::Employee',
103       key_columns => { salesman_id => 'id' },
104     },
105
106     shipto => {
107       class       => 'SL::DB::Shipto',
108       key_columns => { shipto_id => 'shipto_id' },
109     },
110
111     vendor => {
112       class       => 'SL::DB::Vendor',
113       key_columns => { vendor_id => 'id' },
114     },
115   ],
116 );
117
118 1;
119 ;