Zeiterfassung: Auswählbare Artikel: DB-Upgrade 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   booked          => { type => 'boolean', default => 'false' },
13   customer_id     => { type => 'integer', not_null => 1 },
14   description     => { type => 'text', not_null => 1 },
15   employee_id     => { type => 'integer', not_null => 1 },
16   end_time        => { type => 'timestamp' },
17   id              => { type => 'serial', not_null => 1 },
18   itime           => { type => 'timestamp', default => 'now()', not_null => 1 },
19   mtime           => { type => 'timestamp', default => 'now()', not_null => 1 },
20   part_id         => { type => 'integer' },
21   payroll         => { type => 'boolean', default => 'false' },
22   project_id      => { type => 'integer' },
23   staff_member_id => { type => 'integer', not_null => 1 },
24   start_time      => { type => 'timestamp', not_null => 1 },
25 );
26
27 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
28
29 __PACKAGE__->meta->allow_inline_column_values(1);
30
31 __PACKAGE__->meta->foreign_keys(
32   customer => {
33     class       => 'SL::DB::Customer',
34     key_columns => { customer_id => 'id' },
35   },
36
37   employee => {
38     class       => 'SL::DB::Employee',
39     key_columns => { employee_id => 'id' },
40   },
41
42   part => {
43     class       => 'SL::DB::Part',
44     key_columns => { part_id => 'id' },
45   },
46
47   project => {
48     class       => 'SL::DB::Project',
49     key_columns => { project_id => 'id' },
50   },
51
52   staff_member => {
53     class       => 'SL::DB::Employee',
54     key_columns => { staff_member_id => 'id' },
55   },
56 );
57
58 1;
59 ;