1 # This file has been auto-generated. Do not modify it; it will be overwritten
2 # by rose_auto_create_model.pl automatically.
7 use base qw(SL::DB::Object);
9 __PACKAGE__->meta->table('parts');
11 __PACKAGE__->meta->columns(
12 alternate => { type => 'boolean', default => 'false' },
13 assembly => { type => 'boolean', default => 'false' },
14 bin_id => { type => 'integer' },
15 bom => { type => 'boolean', default => 'false' },
16 buchungsgruppen_id => { type => 'integer' },
17 description => { type => 'text' },
18 drawing => { type => 'text' },
19 ean => { type => 'text' },
20 expense_accno_id => { type => 'integer' },
21 formel => { type => 'text' },
22 gv => { type => 'numeric', precision => 15, scale => 5 },
23 has_sernumber => { type => 'boolean', default => 'false' },
24 id => { type => 'integer', not_null => 1, sequence => 'id' },
25 image => { type => 'text' },
26 income_accno_id => { type => 'integer' },
27 inventory_accno_id => { type => 'integer' },
28 itime => { type => 'timestamp', default => 'now()' },
29 lastcost => { type => 'numeric', precision => 15, scale => 5 },
30 listprice => { type => 'numeric', precision => 15, scale => 5 },
31 makemodel => { type => 'boolean', default => 'false' },
32 microfiche => { type => 'text' },
33 mtime => { type => 'timestamp' },
34 not_discountable => { type => 'boolean', default => 'false' },
35 notes => { type => 'text' },
36 obsolete => { type => 'boolean', default => 'false' },
37 onhand => { type => 'numeric', default => '0', precision => 25, scale => 5 },
38 partnumber => { type => 'text', not_null => 1 },
39 partsgroup_id => { type => 'integer' },
40 payment_id => { type => 'integer' },
41 price_factor_id => { type => 'integer' },
42 priceupdate => { type => 'date', default => 'now' },
43 rop => { type => 'float', scale => 4 },
44 sellprice => { type => 'numeric', precision => 15, scale => 5 },
45 shop => { type => 'boolean', default => 'false' },
46 stockable => { type => 'boolean', default => 'false' },
47 unit => { type => 'varchar', length => 20, not_null => 1 },
48 ve => { type => 'integer' },
49 warehouse_id => { type => 'integer' },
50 weight => { type => 'float', scale => 4 },
53 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
55 __PACKAGE__->meta->unique_keys([ 'partnumber' ]);
57 __PACKAGE__->meta->allow_inline_column_values(1);
59 __PACKAGE__->meta->foreign_keys(
61 class => 'SL::DB::Bin',
62 key_columns => { bin_id => 'id' },
66 class => 'SL::DB::Buchungsgruppe',
67 key_columns => { buchungsgruppen_id => 'id' },
71 class => 'SL::DB::PartsGroup',
72 key_columns => { partsgroup_id => 'id' },
76 class => 'SL::DB::PaymentTerm',
77 key_columns => { payment_id => 'id' },
81 class => 'SL::DB::PriceFactor',
82 key_columns => { price_factor_id => 'id' },
86 class => 'SL::DB::Unit',
87 key_columns => { unit => 'name' },
91 class => 'SL::DB::Warehouse',
92 key_columns => { warehouse_id => 'id' },