X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FDB%2FMetaSetup%2FLetter.pm;h=0d29b9fe15bdd2aacbd946322cd4aa86ec28e904;hb=0310ce713a5de3a825e8e8f7b3a9a0476d9ee7f1;hp=a04c4f15931c0f6ea513883e37a8afb930873f78;hpb=a87694dc525b4eabff11029f1e5401621e2bd3bc;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/Letter.pm b/SL/DB/MetaSetup/Letter.pm index a04c4f159..0d29b9fe1 100644 --- a/SL/DB/MetaSetup/Letter.pm +++ b/SL/DB/MetaSetup/Letter.pm @@ -4,37 +4,39 @@ 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' }, + cp_id => { type => 'integer' }, + date => { type => 'date' }, employee_id => { type => 'integer' }, employee_position => { type => 'text' }, - salesman_id => { type => 'integer' }, - salesman_position => { type => 'text' }, + greeting => { type => 'text' }, + id => { type => 'integer', not_null => 1, sequence => 'id' }, + intnotes => { type => 'text' }, itime => { type => 'timestamp', default => 'now()' }, + jobnumber => { type => 'text' }, + letternumber => { type => 'text' }, mtime => { type => 'timestamp' }, - rcv_country => { type => 'text' }, page_created_for => { type => 'text' }, - cp_id => { type => 'integer' }, + rcv_address => { type => 'text' }, + rcv_city => { type => 'text' }, + rcv_contact => { type => 'text' }, + rcv_country => { type => 'text' }, + rcv_countrycode => { type => 'text' }, + rcv_name => { type => 'text' }, + rcv_zipcode => { type => 'text' }, + reference => { type => 'text' }, + salesman_id => { type => 'integer' }, + salesman_position => { type => 'text' }, + subject => { type => 'text' }, + text_created_for => { type => 'text' }, + vc_id => { type => 'integer', not_null => 1 }, ); __PACKAGE__->meta->primary_key_columns([ 'id' ]); @@ -42,6 +44,11 @@ __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' }, + }, + employee => { class => 'SL::DB::Employee', key_columns => { employee_id => 'id' }, @@ -53,7 +60,5 @@ __PACKAGE__->meta->foreign_keys( }, ); -# __PACKAGE__->meta->initialize; - 1; ;