e2093efe82a1cf4bc0c6186625726759fcf571b0
[kivitendo-erp.git] / SL / DB / MetaSetup / Inventory.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::Inventory;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->setup(
10   table   => 'inventory',
11
12   columns => [
13     warehouse_id  => { type => 'integer', not_null => 1 },
14     parts_id      => { type => 'integer', not_null => 1 },
15     oe_id         => { type => 'integer' },
16     orderitems_id => { type => 'integer' },
17     shippingdate  => { type => 'date' },
18     employee_id   => { type => 'integer', not_null => 1 },
19     itime         => { type => 'timestamp', default => 'now()' },
20     mtime         => { type => 'timestamp' },
21     bin_id        => { type => 'integer', not_null => 1 },
22     qty           => { type => 'numeric', precision => 5, scale => 25 },
23     trans_id      => { type => 'integer', not_null => 1 },
24     trans_type_id => { type => 'integer', not_null => 1 },
25     project_id    => { type => 'integer' },
26     chargenumber  => { type => 'text', default => '', not_null => 1 },
27     comment       => { type => 'text' },
28     bestbefore    => { type => 'date' },
29     id            => { type => 'serial', not_null => 1 },
30   ],
31
32   primary_key_columns => [ 'id' ],
33
34   allow_inline_column_values => 1,
35
36   foreign_keys => [
37     bin => {
38       class       => 'SL::DB::Bin',
39       key_columns => { bin_id => 'id' },
40     },
41
42     employee => {
43       class       => 'SL::DB::Employee',
44       key_columns => { employee_id => 'id' },
45     },
46
47     parts => {
48       class       => 'SL::DB::Part',
49       key_columns => { parts_id => 'id' },
50     },
51
52     project => {
53       class       => 'SL::DB::Project',
54       key_columns => { project_id => 'id' },
55     },
56
57     trans_type => {
58       class       => 'SL::DB::TransferType',
59       key_columns => { trans_type_id => 'id' },
60     },
61
62     warehouse => {
63       class       => 'SL::DB::Warehouse',
64       key_columns => { warehouse_id => 'id' },
65     },
66   ],
67 );
68
69 1;
70 ;