RDBO Support.
[kivitendo-erp.git] / SL / DB / MetaSetup / Unit.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::Unit;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->setup(
10   table   => 'units',
11
12   columns => [
13     name      => { type => 'varchar', length => 20, not_null => 1 },
14     base_unit => { type => 'varchar', length => 20 },
15     factor    => { type => 'numeric', precision => 5, scale => 20 },
16     type      => { type => 'varchar', length => 20 },
17     sortkey   => { type => 'integer', not_null => 1 },
18   ],
19
20   primary_key_columns => [ 'name' ],
21
22   foreign_keys => [
23     unit => {
24       class       => 'SL::DB::Unit',
25       key_columns => { base_unit => 'name' },
26     },
27   ],
28 );
29
30 1;
31 ;