Zeiterfassung: Tabellen und Rose
[kivitendo-erp.git] / SL / DB / MetaSetup / TimeRecording.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::TimeRecording;
4
5 use strict;
6
7 use parent qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('time_recordings');
10
11 __PACKAGE__->meta->columns(
12   customer_id     => { type => 'integer', not_null => 1 },
13   description     => { type => 'text', not_null => 1 },
14   employee_id     => { type => 'integer', not_null => 1 },
15   end_time        => { type => 'timestamp' },
16   id              => { type => 'serial', not_null => 1 },
17   itime           => { type => 'timestamp', default => 'now()', not_null => 1 },
18   mtime           => { type => 'timestamp', default => 'now()', not_null => 1 },
19   project_id      => { type => 'integer' },
20   staff_member_id => { type => 'integer', not_null => 1 },
21   start_time      => { type => 'timestamp', not_null => 1 },
22   type_id         => { type => 'integer' },
23 );
24
25 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
26
27 __PACKAGE__->meta->allow_inline_column_values(1);
28
29 __PACKAGE__->meta->foreign_keys(
30   customer => {
31     class       => 'SL::DB::Customer',
32     key_columns => { customer_id => 'id' },
33   },
34
35   employee => {
36     class       => 'SL::DB::Employee',
37     key_columns => { employee_id => 'id' },
38   },
39
40   project => {
41     class       => 'SL::DB::Project',
42     key_columns => { project_id => 'id' },
43   },
44
45   staff_member => {
46     class       => 'SL::DB::Employee',
47     key_columns => { staff_member_id => 'id' },
48   },
49
50   type => {
51     class       => 'SL::DB::TimeRecordingType',
52     key_columns => { type_id => 'id' },
53   },
54 );
55
56 1;
57 ;