Wechselkurs pro Angebot/Auftrag: DB-Upgrade-Skript + Rose
[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 parent qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('oe');
10
11 __PACKAGE__->meta->columns(
12   amount                  => { type => 'numeric', precision => 15, scale => 5 },
13   closed                  => { type => 'boolean', default => 'false' },
14   cp_id                   => { type => 'integer' },
15   currency_id             => { type => 'integer', not_null => 1 },
16   cusordnumber            => { type => 'text' },
17   customer_id             => { type => 'integer' },
18   delivered               => { type => 'boolean', default => 'false' },
19   delivery_customer_id    => { type => 'integer' },
20   delivery_term_id        => { type => 'integer' },
21   delivery_vendor_id      => { type => 'integer' },
22   department_id           => { type => 'integer' },
23   employee_id             => { type => 'integer' },
24   exchangerate            => { type => 'numeric', precision => 15, scale => 5 },
25   expected_billing_date   => { type => 'date' },
26   globalproject_id        => { type => 'integer' },
27   id                      => { type => 'integer', not_null => 1, sequence => 'id' },
28   intnotes                => { type => 'text' },
29   itime                   => { type => 'timestamp', default => 'now()' },
30   language_id             => { type => 'integer' },
31   marge_percent           => { type => 'numeric', precision => 15, scale => 5 },
32   marge_total             => { type => 'numeric', precision => 15, scale => 5 },
33   mtime                   => { type => 'timestamp' },
34   netamount               => { type => 'numeric', precision => 15, scale => 5 },
35   notes                   => { type => 'text' },
36   order_probability       => { type => 'integer', default => '0', not_null => 1 },
37   ordnumber               => { type => 'text', not_null => 1 },
38   payment_id              => { type => 'integer' },
39   proforma                => { type => 'boolean', default => 'false' },
40   quonumber               => { type => 'text' },
41   quotation               => { type => 'boolean', default => 'false' },
42   reqdate                 => { type => 'date' },
43   salesman_id             => { type => 'integer' },
44   shippingpoint           => { type => 'text' },
45   shipto_id               => { type => 'integer' },
46   shipvia                 => { type => 'text' },
47   taxincluded             => { type => 'boolean' },
48   taxzone_id              => { type => 'integer', not_null => 1 },
49   transaction_description => { type => 'text' },
50   transdate               => { type => 'date', default => 'now' },
51   vendor_id               => { type => 'integer' },
52 );
53
54 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
55
56 __PACKAGE__->meta->allow_inline_column_values(1);
57
58 __PACKAGE__->meta->foreign_keys(
59   contact => {
60     class       => 'SL::DB::Contact',
61     key_columns => { cp_id => 'cp_id' },
62   },
63
64   currency => {
65     class       => 'SL::DB::Currency',
66     key_columns => { currency_id => 'id' },
67   },
68
69   customer => {
70     class       => 'SL::DB::Customer',
71     key_columns => { customer_id => 'id' },
72   },
73
74   delivery_customer => {
75     class       => 'SL::DB::Customer',
76     key_columns => { delivery_customer_id => 'id' },
77   },
78
79   delivery_term => {
80     class       => 'SL::DB::DeliveryTerm',
81     key_columns => { delivery_term_id => 'id' },
82   },
83
84   delivery_vendor => {
85     class       => 'SL::DB::Vendor',
86     key_columns => { delivery_vendor_id => 'id' },
87   },
88
89   department => {
90     class       => 'SL::DB::Department',
91     key_columns => { department_id => 'id' },
92   },
93
94   employee => {
95     class       => 'SL::DB::Employee',
96     key_columns => { employee_id => 'id' },
97   },
98
99   globalproject => {
100     class       => 'SL::DB::Project',
101     key_columns => { globalproject_id => 'id' },
102   },
103
104   language => {
105     class       => 'SL::DB::Language',
106     key_columns => { language_id => 'id' },
107   },
108
109   payment_terms => {
110     class       => 'SL::DB::PaymentTerm',
111     key_columns => { payment_id => 'id' },
112   },
113
114   salesman => {
115     class       => 'SL::DB::Employee',
116     key_columns => { salesman_id => 'id' },
117   },
118
119   shipto => {
120     class       => 'SL::DB::Shipto',
121     key_columns => { shipto_id => 'shipto_id' },
122   },
123
124   taxzone => {
125     class       => 'SL::DB::TaxZone',
126     key_columns => { taxzone_id => 'id' },
127   },
128
129   vendor => {
130     class       => 'SL::DB::Vendor',
131     key_columns => { vendor_id => 'id' },
132   },
133 );
134
135 1;
136 ;