rdbo models: Parts nach 066fbb38f
[kivitendo-erp.git] / SL / DB / MetaSetup / Part.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::Part;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->setup(
10   table   => 'parts',
11
12   columns => [
13     id                 => { type => 'integer', not_null => 1, sequence => 'id' },
14     partnumber         => { type => 'text', not_null => 1 },
15     description        => { type => 'text' },
16     listprice          => { type => 'numeric', precision => 5, scale => 15 },
17     sellprice          => { type => 'numeric', precision => 5, scale => 15 },
18     lastcost           => { type => 'numeric', precision => 5, scale => 15 },
19     priceupdate        => { type => 'date', default => 'now' },
20     weight             => { type => 'float', precision => 4 },
21     notes              => { type => 'text' },
22     makemodel          => { type => 'boolean', default => 'false' },
23     assembly           => { type => 'boolean', default => 'false' },
24     alternate          => { type => 'boolean', default => 'false' },
25     rop                => { type => 'float', precision => 4 },
26     inventory_accno_id => { type => 'integer' },
27     income_accno_id    => { type => 'integer' },
28     expense_accno_id   => { type => 'integer' },
29     bin                => { type => 'text' },
30     shop               => { type => 'boolean', default => 'false' },
31     obsolete           => { type => 'boolean', default => 'false' },
32     bom                => { type => 'boolean', default => 'false' },
33     image              => { type => 'text' },
34     drawing            => { type => 'text' },
35     microfiche         => { type => 'text' },
36     partsgroup_id      => { type => 'integer' },
37     ve                 => { type => 'integer' },
38     gv                 => { type => 'numeric', precision => 5, scale => 15 },
39     itime              => { type => 'timestamp', default => 'now()' },
40     mtime              => { type => 'timestamp' },
41     unit               => { type => 'varchar', length => 20, not_null => 1 },
42     formel             => { type => 'text' },
43     not_discountable   => { type => 'boolean', default => 'false' },
44     buchungsgruppen_id => { type => 'integer' },
45     payment_id         => { type => 'integer' },
46     ean                => { type => 'text' },
47     price_factor_id    => { type => 'integer' },
48     onhand             => { type => 'numeric', default => '0', precision => 5, scale => 25 },
49     stockable          => { type => 'boolean', default => 'false' },
50     has_sernumber      => { type => 'boolean', default => 'false' },
51   ],
52
53   primary_key_columns => [ 'id' ],
54
55   allow_inline_column_values => 1,
56
57   foreign_keys => [
58     buchungsgruppen => {
59       class       => 'SL::DB::Buchungsgruppe',
60       key_columns => { buchungsgruppen_id => 'id' },
61     },
62
63     unit_obj => {
64       class       => 'SL::DB::Unit',
65       key_columns => { unit => 'name' },
66     },
67   ],
68 );
69
70 1;
71 ;