X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FLetter.pm;h=64d513e9589c55e35b9e1df7b7c8f5d9f3effa58;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hp=a04c4f15931c0f6ea513883e37a8afb930873f78;hpb=4b7f17c8d92bff2e9f495d476a650dc3897c3097;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/Letter.pm b/SL/DB/MetaSetup/Letter.pm index a04c4f159..64d513e95 100644 --- a/SL/DB/MetaSetup/Letter.pm +++ b/SL/DB/MetaSetup/Letter.pm @@ -4,37 +4,26 @@ package SL::DB::Letter; use strict; -use base qw(SL::DB::Object); +use parent qw(SL::DB::Object); __PACKAGE__->meta->table('letter'); __PACKAGE__->meta->columns( - id => { type => 'integer', not_null => 1, sequence => 'id' }, - vc_id => { type => 'integer', not_null => 1 }, - rcv_name => { type => 'text' }, - rcv_contact => { type => 'text' }, - rcv_address => { type => 'text' }, - rcv_countrycode => { type => 'text' }, - rcv_zipcode => { type => 'text' }, - rcv_city => { type => 'text' }, - letternumber => { type => 'text' }, - jobnumber => { type => 'text' }, - text_created_for => { type => 'text' }, - date => { type => 'text' }, - subject => { type => 'text' }, - greeting => { type => 'text' }, - body => { type => 'text' }, - close => { type => 'text' }, - company_name => { type => 'text' }, - employee_id => { type => 'integer' }, - employee_position => { type => 'text' }, - salesman_id => { type => 'integer' }, - salesman_position => { type => 'text' }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - rcv_country => { type => 'text' }, - page_created_for => { type => 'text' }, - cp_id => { type => 'integer' }, + body => { type => 'text' }, + cp_id => { type => 'integer' }, + customer_id => { type => 'integer' }, + date => { type => 'date' }, + employee_id => { type => 'integer' }, + greeting => { type => 'text' }, + id => { type => 'integer', not_null => 1, sequence => 'id' }, + intnotes => { type => 'text' }, + itime => { type => 'timestamp', default => 'now()' }, + letternumber => { type => 'text' }, + mtime => { type => 'timestamp' }, + reference => { type => 'text' }, + salesman_id => { type => 'integer' }, + subject => { type => 'text' }, + vendor_id => { type => 'integer' }, ); __PACKAGE__->meta->primary_key_columns([ 'id' ]); @@ -42,6 +31,16 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); __PACKAGE__->meta->foreign_keys( + contact => { + class => 'SL::DB::Contact', + key_columns => { cp_id => 'cp_id' }, + }, + + customer => { + class => 'SL::DB::Customer', + key_columns => { customer_id => 'id' }, + }, + employee => { class => 'SL::DB::Employee', key_columns => { employee_id => 'id' }, @@ -51,9 +50,12 @@ __PACKAGE__->meta->foreign_keys( class => 'SL::DB::Employee', key_columns => { salesman_id => 'id' }, }, -); -# __PACKAGE__->meta->initialize; + vendor => { + class => 'SL::DB::Vendor', + key_columns => { vendor_id => 'id' }, + }, +); 1; ;