X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/6cf3f7762efd40bee49a2b8f11bb4ab6915d9071..a2bab345aedcfbb03bdf0e0aa1f28a5c57a5d02b:/SL/DB/MetaSetup/Buchungsgruppe.pm diff --git a/SL/DB/MetaSetup/Buchungsgruppe.pm b/SL/DB/MetaSetup/Buchungsgruppe.pm index 8acc5a75f..e89cb4b1c 100644 --- a/SL/DB/MetaSetup/Buchungsgruppe.pm +++ b/SL/DB/MetaSetup/Buchungsgruppe.pm @@ -4,27 +4,24 @@ package SL::DB::Buchungsgruppe; use strict; -use base qw(SL::DB::Object); +use parent qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'buchungsgruppen', +__PACKAGE__->meta->table('buchungsgruppen'); - columns => [ - id => { type => 'integer', not_null => 1, sequence => 'id' }, - description => { type => 'text' }, - inventory_accno_id => { type => 'integer' }, - income_accno_id_0 => { type => 'integer' }, - expense_accno_id_0 => { type => 'integer' }, - income_accno_id_1 => { type => 'integer' }, - expense_accno_id_1 => { type => 'integer' }, - income_accno_id_2 => { type => 'integer' }, - expense_accno_id_2 => { type => 'integer' }, - income_accno_id_3 => { type => 'integer' }, - expense_accno_id_3 => { type => 'integer' }, - sortkey => { type => 'integer', not_null => 1 }, - ], +__PACKAGE__->meta->columns( + description => { type => 'text' }, + id => { type => 'integer', not_null => 1, sequence => 'id' }, + inventory_accno_id => { type => 'integer', not_null => 1 }, + sortkey => { type => 'integer', not_null => 1 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->foreign_keys( + inventory_accno => { + class => 'SL::DB::Chart', + key_columns => { inventory_accno_id => 'id' }, + }, ); 1;