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