afa64d815e61b5b0167c4cf7bc00efaf3ff47294
[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 parent qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('orderitems');
10
11 __PACKAGE__->meta->columns(
12   active_discount_source => { type => 'text', default => '', not_null => 1 },
13   active_price_source    => { type => 'text', default => '', not_null => 1 },
14   base_qty               => { type => 'float', precision => 4, scale => 4 },
15   cusordnumber           => { type => 'text' },
16   description            => { type => 'text' },
17   discount               => { type => 'float', precision => 4, scale => 4 },
18   id                     => { type => 'integer', not_null => 1, sequence => 'orderitemsid' },
19   itime                  => { type => 'timestamp', default => 'now()' },
20   lastcost               => { type => 'numeric', precision => 15, scale => 5 },
21   longdescription        => { type => 'text' },
22   marge_percent          => { type => 'numeric', precision => 15, scale => 5 },
23   marge_price_factor     => { type => 'numeric', default => 1, precision => 15, scale => 5 },
24   marge_total            => { type => 'numeric', precision => 15, scale => 5 },
25   mtime                  => { type => 'timestamp' },
26   optional               => { type => 'boolean', default => 'false' },
27   ordnumber              => { type => 'text' },
28   parts_id               => { type => 'integer' },
29   position               => { type => 'integer', not_null => 1 },
30   price_factor           => { type => 'numeric', default => 1, precision => 15, scale => 5 },
31   price_factor_id        => { type => 'integer' },
32   pricegroup_id          => { type => 'integer' },
33   project_id             => { type => 'integer' },
34   qty                    => { type => 'float', precision => 4, scale => 4 },
35   reqdate                => { type => 'date' },
36   sellprice              => { type => 'numeric', precision => 15, scale => 5 },
37   serialnumber           => { type => 'text' },
38   ship                   => { type => 'float', precision => 4, scale => 4 },
39   subtotal               => { type => 'boolean', default => 'false' },
40   trans_id               => { type => 'integer' },
41   transdate              => { type => 'text' },
42   unit                   => { type => 'varchar', length => 20 },
43 );
44
45 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
46
47 __PACKAGE__->meta->allow_inline_column_values(1);
48
49 __PACKAGE__->meta->foreign_keys(
50   order => {
51     class       => 'SL::DB::Order',
52     key_columns => { trans_id => 'id' },
53   },
54
55   part => {
56     class       => 'SL::DB::Part',
57     key_columns => { parts_id => 'id' },
58   },
59
60   price_factor_obj => {
61     class       => 'SL::DB::PriceFactor',
62     key_columns => { price_factor_id => 'id' },
63   },
64
65   pricegroup => {
66     class       => 'SL::DB::Pricegroup',
67     key_columns => { pricegroup_id => 'id' },
68   },
69
70   project => {
71     class       => 'SL::DB::Project',
72     key_columns => { project_id => 'id' },
73   },
74
75   unit_obj => {
76     class       => 'SL::DB::Unit',
77     key_columns => { unit => 'name' },
78   },
79 );
80
81 1;
82 ;