Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[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   order_id        => { type => 'integer' },
23   part_id         => { type => 'integer' },
24   payroll         => { type => 'boolean', default => 'false' },
25   project_id      => { type => 'integer' },
26   staff_member_id => { type => 'integer', not_null => 1 },
27   start_time      => { type => 'timestamp' },
28 );
29
30 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
31
32 __PACKAGE__->meta->allow_inline_column_values(1);
33
34 __PACKAGE__->meta->foreign_keys(
35   customer => {
36     class       => 'SL::DB::Customer',
37     key_columns => { customer_id => 'id' },
38   },
39
40   employee => {
41     class       => 'SL::DB::Employee',
42     key_columns => { employee_id => 'id' },
43   },
44
45   order => {
46     class       => 'SL::DB::Order',
47     key_columns => { order_id => 'id' },
48   },
49
50   part => {
51     class       => 'SL::DB::Part',
52     key_columns => { part_id => 'id' },
53   },
54
55   project => {
56     class       => 'SL::DB::Project',
57     key_columns => { project_id => 'id' },
58   },
59
60   staff_member => {
61     class       => 'SL::DB::Employee',
62     key_columns => { staff_member_id => 'id' },
63   },
64 );
65
66 1;
67 ;