Neues DB-Setup für Währungen
[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     employee_id             => { type => 'integer' },
25     closed                  => { type => 'boolean', default => 'false' },
26     quotation               => { type => 'boolean', default => 'false' },
27     quonumber               => { type => 'text' },
28     cusordnumber            => { type => 'text' },
29     intnotes                => { type => 'text' },
30     department_id           => { type => 'integer' },
31     itime                   => { type => 'timestamp', default => 'now()' },
32     mtime                   => { type => 'timestamp' },
33     shipvia                 => { type => 'text' },
34     cp_id                   => { type => 'integer' },
35     language_id             => { type => 'integer' },
36     payment_id              => { type => 'integer' },
37     delivery_customer_id    => { type => 'integer' },
38     delivery_vendor_id      => { type => 'integer' },
39     taxzone_id              => { type => 'integer' },
40     proforma                => { type => 'boolean', default => 'false' },
41     shipto_id               => { type => 'integer' },
42     delivered               => { type => 'boolean', default => 'false' },
43     globalproject_id        => { type => 'integer' },
44     salesman_id             => { type => 'integer' },
45     marge_total             => { type => 'numeric', precision => 5, scale => 15 },
46     marge_percent           => { type => 'numeric', precision => 5, scale => 15 },
47     transaction_description => { type => 'text' },
48     currency_id             => { type => 'integer', not_null => 1 },
49   ],
50
51   primary_key_columns => [ 'id' ],
52
53   foreign_keys => [
54     contact => {
55       class       => 'SL::DB::Contact',
56       key_columns => { cp_id => 'cp_id' },
57     },
58
59     customer => {
60       class       => 'SL::DB::Customer',
61       key_columns => { customer_id => 'id' },
62     },
63
64     delivery_customer => {
65       class       => 'SL::DB::Customer',
66       key_columns => { delivery_customer_id => 'id' },
67     },
68
69     delivery_vendor => {
70       class       => 'SL::DB::Vendor',
71       key_columns => { delivery_vendor_id => 'id' },
72     },
73
74     department => {
75       class       => 'SL::DB::Department',
76       key_columns => { department_id => 'id' },
77     },
78
79     employee => {
80       class       => 'SL::DB::Employee',
81       key_columns => { employee_id => 'id' },
82     },
83
84     globalproject => {
85       class       => 'SL::DB::Project',
86       key_columns => { globalproject_id => 'id' },
87     },
88
89     language => {
90       class       => 'SL::DB::Language',
91       key_columns => { language_id => 'id' },
92     },
93
94     payment_terms => {
95       class       => 'SL::DB::PaymentTerm',
96       key_columns => { payment_id => 'id' },
97     },
98
99     salesman => {
100       class       => 'SL::DB::Employee',
101       key_columns => { salesman_id => 'id' },
102     },
103
104     shipto => {
105       class       => 'SL::DB::Shipto',
106       key_columns => { shipto_id => 'shipto_id' },
107     },
108
109     vendor => {
110       class       => 'SL::DB::Vendor',
111       key_columns => { vendor_id => 'id' },
112     },
113   ],
114 );
115
116 1;
117 ;