InvoiceItem, OrderItem, DeliveryOrderItem: diverse Fremdschlüssel eingeführt
[kivitendo-erp.git] / SL / DB / MetaSetup / OrderItem.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::OrderItem;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->setup(
10   table   => 'orderitems',
11
12   columns => [
13     trans_id           => { type => 'integer' },
14     parts_id           => { type => 'integer' },
15     description        => { type => 'text' },
16     qty                => { type => 'float', precision => 4 },
17     sellprice          => { type => 'numeric', precision => 5, scale => 15 },
18     discount           => { type => 'float', precision => 4 },
19     project_id         => { type => 'integer' },
20     reqdate            => { type => 'date' },
21     ship               => { type => 'float', precision => 4 },
22     serialnumber       => { type => 'text' },
23     id                 => { type => 'integer', not_null => 1, sequence => 'orderitemsid' },
24     itime              => { type => 'timestamp', default => 'now()' },
25     mtime              => { type => 'timestamp' },
26     pricegroup_id      => { type => 'integer' },
27     ordnumber          => { type => 'text' },
28     transdate          => { type => 'text' },
29     cusordnumber       => { type => 'text' },
30     unit               => { type => 'varchar', length => 20 },
31     base_qty           => { type => 'float', precision => 4 },
32     subtotal           => { type => 'boolean', default => 'false' },
33     longdescription    => { type => 'text' },
34     marge_total        => { type => 'numeric', precision => 5, scale => 15 },
35     marge_percent      => { type => 'numeric', precision => 5, scale => 15 },
36     lastcost           => { type => 'numeric', precision => 5, scale => 15 },
37     price_factor_id    => { type => 'integer' },
38     price_factor       => { type => 'numeric', default => 1, precision => 5, scale => 15 },
39     marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
40   ],
41
42   primary_key_columns => [ 'id' ],
43
44   allow_inline_column_values => 1,
45
46   foreign_keys => [
47     parts => {
48       class       => 'SL::DB::Part',
49       key_columns => { parts_id => 'id' },
50     },
51
52     price_factor_obj => {
53       class       => 'SL::DB::PriceFactor',
54       key_columns => { price_factor_id => 'id' },
55     },
56
57     pricegroup => {
58       class       => 'SL::DB::Pricegroup',
59       key_columns => { pricegroup_id => 'id' },
60     },
61
62     project => {
63       class       => 'SL::DB::Project',
64       key_columns => { project_id => 'id' },
65     },
66
67     trans => {
68       class       => 'SL::DB::Order',
69       key_columns => { trans_id => 'id' },
70     },
71   ],
72 );
73
74 1;
75 ;