63b0f1a40ce2887275b4435f9234bd1d9af3082f
[kivitendo-erp.git] / SL / DB / MetaSetup / Employee.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::Employee;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('employee');
10
11 __PACKAGE__->meta->columns(
12   id        => { type => 'integer', not_null => 1, sequence => 'id' },
13   login     => { type => 'text' },
14   startdate => { type => 'date', default => 'now' },
15   enddate   => { type => 'date' },
16   notes     => { type => 'text' },
17   sales     => { type => 'boolean', default => 'true' },
18   itime     => { type => 'timestamp', default => 'now()' },
19   mtime     => { type => 'timestamp' },
20   name      => { type => 'text' },
21   addr1     => { type => 'text' },
22   addr2     => { type => 'text' },
23   addr3     => { type => 'text' },
24   addr4     => { type => 'text' },
25   homephone => { type => 'text' },
26   workphone => { type => 'text' },
27   deleted   => { type => 'boolean', default => 'false' },
28 );
29
30 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
31
32 __PACKAGE__->meta->unique_keys([ 'login' ]);
33
34 __PACKAGE__->meta->allow_inline_column_values(1);
35
36 __PACKAGE__->meta->relationships(
37   ap => {
38     class      => 'SL::DB::PurchaseInvoice',
39     column_map => { id => 'employee_id' },
40     type       => 'one to many',
41   },
42
43   ar => {
44     class      => 'SL::DB::Invoice',
45     column_map => { id => 'employee_id' },
46     type       => 'one to many',
47   },
48
49   ar_objs => {
50     class      => 'SL::DB::Invoice',
51     column_map => { id => 'salesman_id' },
52     type       => 'one to many',
53   },
54
55   drafts => {
56     class      => 'SL::DB::Draft',
57     column_map => { id => 'employee_id' },
58     type       => 'one to many',
59   },
60 );
61
62 # __PACKAGE__->meta->initialize;
63
64 1;
65 ;