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;
7 use parent qw(SL::DB::Object);
9 __PACKAGE__->meta->table('orderitems');
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 orderer_id => { type => 'integer' },
28 ordnumber => { type => 'text' },
29 parts_id => { type => 'integer' },
30 position => { type => 'integer', not_null => 1 },
31 price_factor => { type => 'numeric', default => 1, precision => 15, scale => 5 },
32 price_factor_id => { type => 'integer' },
33 pricegroup_id => { type => 'integer' },
34 project_id => { type => 'integer' },
35 qty => { type => 'numeric', precision => 25, scale => 5 },
36 recurring_billing_invoice_id => { type => 'integer' },
37 recurring_billing_mode => { type => 'enum', check_in => [ 'never', 'once', 'always' ], db_type => 'items_recurring_billing_mode', default => 'always', not_null => 1 },
38 reqdate => { type => 'date' },
39 sellprice => { type => 'numeric', precision => 15, scale => 5 },
40 serialnumber => { type => 'text' },
41 ship => { type => 'float', precision => 4, scale => 4 },
42 subtotal => { type => 'boolean', default => 'false' },
43 trans_id => { type => 'integer' },
44 transdate => { type => 'text' },
45 unit => { type => 'varchar', length => 20 },
48 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
50 __PACKAGE__->meta->allow_inline_column_values(1);
52 __PACKAGE__->meta->foreign_keys(
54 class => 'SL::DB::Order',
55 key_columns => { trans_id => 'id' },
59 class => 'SL::DB::Employee',
60 key_columns => { orderer_id => 'id' },
64 class => 'SL::DB::Part',
65 key_columns => { parts_id => 'id' },
69 class => 'SL::DB::PriceFactor',
70 key_columns => { price_factor_id => 'id' },
74 class => 'SL::DB::Pricegroup',
75 key_columns => { pricegroup_id => 'id' },
79 class => 'SL::DB::Project',
80 key_columns => { project_id => 'id' },
83 recurring_billing_invoice => {
84 class => 'SL::DB::Invoice',
85 key_columns => { recurring_billing_invoice_id => 'id' },
89 class => 'SL::DB::Unit',
90 key_columns => { unit => 'name' },