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