use SL::DB::TaxZone;
use SL::DB::TaxzoneChart;
use SL::DB::TimeRecording;
+use SL::DB::TimeRecordingArticle;
use SL::DB::TodoUserConfig;
use SL::DB::TransferType;
use SL::DB::Translation;
taxkeys => 'tax_key',
tax_zones => 'tax_zone',
taxzone_charts => 'taxzone_chart',
+ time_recording_articles => 'time_recording_article',
time_recordings => 'time_recording',
todo_user_config => 'todo_user_config',
transfer_type => 'transfer_type',
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Manager::TimeRecordingArticle;
+
+use strict;
+
+use parent qw(SL::DB::Helper::Manager);
+
+sub object_class { 'SL::DB::TimeRecordingArticle' }
+
+__PACKAGE__->make_manager_methods;
+
+1;
id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => 'now()', not_null => 1 },
mtime => { type => 'timestamp', default => 'now()', not_null => 1 },
+ part_id => { type => 'integer' },
payroll => { type => 'boolean', default => 'false' },
project_id => { type => 'integer' },
staff_member_id => { type => 'integer', not_null => 1 },
key_columns => { employee_id => 'id' },
},
+ part => {
+ class => 'SL::DB::Part',
+ key_columns => { part_id => 'id' },
+ },
+
project => {
class => 'SL::DB::Project',
key_columns => { project_id => 'id' },
--- /dev/null
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::TimeRecordingArticle;
+
+use strict;
+
+use parent qw(SL::DB::Object);
+
+__PACKAGE__->meta->table('time_recording_articles');
+
+__PACKAGE__->meta->columns(
+ id => { type => 'serial', not_null => 1 },
+ part_id => { type => 'integer', not_null => 1 },
+ position => { type => 'integer', not_null => 1 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->unique_keys([ 'part_id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ part => {
+ class => 'SL::DB::Part',
+ key_columns => { part_id => 'id' },
+ rel_type => 'one to one',
+ },
+);
+
+1;
+;
--- /dev/null
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::TimeRecordingArticle;
+
+use strict;
+
+use SL::DB::MetaSetup::TimeRecordingArticle;
+use SL::DB::Manager::TimeRecordingArticle;
+
+__PACKAGE__->meta->initialize;
+
+1;
--- /dev/null
+-- @tag: time_recordings_articles
+-- @description: Zeiterfassungs-Artikel
+-- @depends: time_recordings
+
+CREATE TABLE time_recording_articles (
+ id SERIAL,
+ part_id INTEGER REFERENCES parts(id) UNIQUE NOT NULL,
+ position INTEGER NOT NULL,
+
+ PRIMARY KEY (id)
+);
+
+ALTER TABLE time_recordings ADD COLUMN part_id INTEGER REFERENCES parts(id);