Revision 9654e41b
Von Bernd Bleßmann vor fast 4 Jahren hinzugefügt
SL/DB/Helper/ALL.pm | ||
---|---|---|
134 | 134 |
use SL::DB::TaxKey; |
135 | 135 |
use SL::DB::TaxZone; |
136 | 136 |
use SL::DB::TaxzoneChart; |
137 |
use SL::DB::TimeRecording; |
|
138 |
use SL::DB::TimeRecordingType; |
|
137 | 139 |
use SL::DB::TodoUserConfig; |
138 | 140 |
use SL::DB::TransferType; |
139 | 141 |
use SL::DB::Translation; |
SL/DB/Helper/Mappings.pm | ||
---|---|---|
214 | 214 |
taxkeys => 'tax_key', |
215 | 215 |
tax_zones => 'tax_zone', |
216 | 216 |
taxzone_charts => 'taxzone_chart', |
217 |
time_recording_types => 'time_recording_type', |
|
218 |
time_recordings => 'time_recording', |
|
217 | 219 |
todo_user_config => 'todo_user_config', |
218 | 220 |
transfer_type => 'transfer_type', |
219 | 221 |
translation => 'translation', |
SL/DB/Manager/TimeRecording.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 |
package SL::DB::Manager::TimeRecording; |
|
5 |
|
|
6 |
use strict; |
|
7 |
|
|
8 |
use parent qw(SL::DB::Helper::Manager); |
|
9 |
|
|
10 |
sub object_class { 'SL::DB::TimeRecording' } |
|
11 |
|
|
12 |
__PACKAGE__->make_manager_methods; |
|
13 |
|
|
14 |
1; |
SL/DB/Manager/TimeRecordingType.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 |
package SL::DB::Manager::TimeRecordingType; |
|
5 |
|
|
6 |
use strict; |
|
7 |
|
|
8 |
use parent qw(SL::DB::Helper::Manager); |
|
9 |
|
|
10 |
sub object_class { 'SL::DB::TimeRecordingType' } |
|
11 |
|
|
12 |
__PACKAGE__->make_manager_methods; |
|
13 |
|
|
14 |
1; |
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 |
; |
SL/DB/MetaSetup/TimeRecordingType.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::TimeRecordingType; |
|
4 |
|
|
5 |
use strict; |
|
6 |
|
|
7 |
use parent qw(SL::DB::Object); |
|
8 |
|
|
9 |
__PACKAGE__->meta->table('time_recording_types'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
abbreviation => { type => 'text', not_null => 1 }, |
|
13 |
description => { type => 'text' }, |
|
14 |
id => { type => 'serial', not_null => 1 }, |
|
15 |
obsolete => { type => 'boolean', default => 'false', not_null => 1 }, |
|
16 |
position => { type => 'integer', not_null => 1 }, |
|
17 |
); |
|
18 |
|
|
19 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
20 |
|
|
21 |
1; |
|
22 |
; |
SL/DB/TimeRecording.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 |
package SL::DB::TimeRecording; |
|
5 |
|
|
6 |
use strict; |
|
7 |
|
|
8 |
use SL::DB::MetaSetup::TimeRecording; |
|
9 |
use SL::DB::Manager::TimeRecording; |
|
10 |
|
|
11 |
__PACKAGE__->meta->initialize; |
|
12 |
|
|
13 |
1; |
SL/DB/TimeRecordingType.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 |
package SL::DB::TimeRecordingType; |
|
5 |
|
|
6 |
use strict; |
|
7 |
|
|
8 |
use SL::DB::MetaSetup::TimeRecordingType; |
|
9 |
use SL::DB::Manager::TimeRecordingType; |
|
10 |
|
|
11 |
__PACKAGE__->meta->initialize; |
|
12 |
|
|
13 |
1; |
sql/Pg-upgrade2/time_recordings.sql | ||
---|---|---|
1 |
-- @tag: time_recordings |
|
2 |
-- @description: Tabellen zur Zeiterfassung |
|
3 |
-- @depends: release_3_5_6_1 |
|
4 |
|
|
5 |
CREATE TABLE time_recording_types ( |
|
6 |
id SERIAL, |
|
7 |
abbreviation TEXT NOT NULL, |
|
8 |
description TEXT, |
|
9 |
position INTEGER NOT NULL, |
|
10 |
obsolete BOOLEAN NOT NULL DEFAULT false, |
|
11 |
PRIMARY KEY (id) |
|
12 |
); |
|
13 |
|
|
14 |
CREATE TABLE time_recordings ( |
|
15 |
id SERIAL, |
|
16 |
customer_id INTEGER NOT NULL, |
|
17 |
project_id INTEGER, |
|
18 |
start_time TIMESTAMP NOT NULL, |
|
19 |
end_time TIMESTAMP, |
|
20 |
type_id INTEGER, |
|
21 |
description TEXT NOT NULL, |
|
22 |
staff_member_id INTEGER NOT NULL, |
|
23 |
employee_id INTEGER NOT NULL, |
|
24 |
itime TIMESTAMP NOT NULL DEFAULT now(), |
|
25 |
mtime TIMESTAMP NOT NULL DEFAULT now(), |
|
26 |
|
|
27 |
PRIMARY KEY (id), |
|
28 |
FOREIGN KEY (customer_id) REFERENCES customer (id), |
|
29 |
FOREIGN KEY (staff_member_id) REFERENCES employee (id), |
|
30 |
FOREIGN KEY (employee_id) REFERENCES employee (id), |
|
31 |
FOREIGN KEY (project_id) REFERENCES project (id), |
|
32 |
FOREIGN KEY (type_id) REFERENCES time_recording_types (id) |
|
33 |
); |
|
34 |
|
|
35 |
CREATE TRIGGER mtime_time_recordings BEFORE UPDATE ON time_recordings FOR EACH ROW EXECUTE PROCEDURE set_mtime(); |
Auch abrufbar als: Unified diff
Zeiterfassung: Tabellen und Rose