X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/ff159a4d47b9a2d10744dcfc23da2c63605c8a32..eeb5375ee7727c956cc357cc8f90b19d1bfe80b9:/SL/DB/MetaSetup/EmailJournal.pm diff --git a/SL/DB/MetaSetup/EmailJournal.pm b/SL/DB/MetaSetup/EmailJournal.pm index d6dceb7ac..7e1e6bc1e 100644 --- a/SL/DB/MetaSetup/EmailJournal.pm +++ b/SL/DB/MetaSetup/EmailJournal.pm @@ -9,18 +9,24 @@ use parent qw(SL::DB::Object); __PACKAGE__->meta->table('email_journal'); __PACKAGE__->meta->columns( - body => { type => 'text', not_null => 1 }, - extended_status => { type => 'text', not_null => 1 }, - from => { type => 'text', not_null => 1 }, - headers => { type => 'text', not_null => 1 }, - id => { type => 'serial', not_null => 1 }, - itime => { type => 'timestamp', default => 'now()', not_null => 1 }, - mtime => { type => 'timestamp', default => 'now()', not_null => 1 }, - recipients => { type => 'text', not_null => 1 }, - sender_id => { type => 'integer' }, - sent_on => { type => 'timestamp', default => 'now()', not_null => 1 }, - status => { type => 'text', not_null => 1 }, - subject => { type => 'text', not_null => 1 }, + body => { type => 'text', not_null => 1 }, + email_import_id => { type => 'integer' }, + extended_status => { type => 'text', not_null => 1 }, + folder => { type => 'text' }, + folder_uidvalidity => { type => 'text' }, + from => { type => 'text', not_null => 1 }, + headers => { type => 'text', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()', not_null => 1 }, + mtime => { type => 'timestamp', default => 'now()', not_null => 1 }, + obsolete => { type => 'boolean', default => 'false', not_null => 1 }, + recipients => { type => 'text', not_null => 1 }, + record_type => { type => 'enum', check_in => [ 'sales_order', 'purchase_order', 'sales_quotation', 'request_quotation', 'purchase_quotation_intake', 'sales_order_intake', 'sales_delivery_order', 'purchase_delivery_order', 'supplier_delivery_order', 'rma_delivery_order', 'sales_reclamation', 'purchase_reclamation', 'invoice', 'invoice_for_advance_payment', 'invoice_for_advance_payment_storno', 'final_invoice', 'invoice_storno', 'credit_note', 'credit_note_storno', 'purchase_invoice', 'purchase_credit_note', 'ap_transaction', 'ar_transaction', 'gl_transaction', 'purchase_order_confirmation', 'catch_all' ], db_type => 'email_journal_record_type' }, + sender_id => { type => 'integer' }, + sent_on => { type => 'timestamp', default => 'now()', not_null => 1 }, + status => { type => 'enum', check_in => [ 'sent', 'send_failed', 'imported' ], db_type => 'email_journal_status', not_null => 1 }, + subject => { type => 'text', not_null => 1 }, + uid => { type => 'integer' }, ); __PACKAGE__->meta->primary_key_columns([ 'id' ]); @@ -28,6 +34,11 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); __PACKAGE__->meta->foreign_keys( + email_import => { + class => 'SL::DB::EmailImport', + key_columns => { email_import_id => 'id' }, + }, + sender => { class => 'SL::DB::Employee', key_columns => { sender_id => 'id' },