X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FNote.pm;h=9a704a82e0d6ef230eebffcc45c937adfc8212fc;hb=660c7e5312f7fae7766b731f7001e5e8197c6887;hp=a055c02ab1745aedf1ad59ed3551e18335543e82;hpb=4fd22b569d4436293e0a9d364d7356b5bfc503e5;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/Note.pm b/SL/DB/MetaSetup/Note.pm index a055c02ab..9a704a82e 100644 --- a/SL/DB/MetaSetup/Note.pm +++ b/SL/DB/MetaSetup/Note.pm @@ -4,32 +4,30 @@ package SL::DB::Note; use strict; -use base qw(SL::DB::Object); - -__PACKAGE__->meta->setup( - table => 'notes', - - columns => [ - id => { type => 'integer', not_null => 1, sequence => 'note_id' }, - subject => { type => 'text' }, - body => { type => 'text' }, - created_by => { type => 'integer', not_null => 1 }, - trans_id => { type => 'integer' }, - trans_module => { type => 'varchar', length => 10 }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - ], - - primary_key_columns => [ 'id' ], - - allow_inline_column_values => 1, - - foreign_keys => [ - employee => { - class => 'SL::DB::Employee', - key_columns => { created_by => 'id' }, - }, - ], +use parent qw(SL::DB::Object); + +__PACKAGE__->meta->table('notes'); + +__PACKAGE__->meta->columns( + body => { type => 'text' }, + created_by => { type => 'integer', not_null => 1 }, + id => { type => 'integer', not_null => 1, sequence => 'note_id' }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + subject => { type => 'text' }, + trans_id => { type => 'integer' }, + trans_module => { type => 'varchar', length => 10 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->allow_inline_column_values(1); + +__PACKAGE__->meta->foreign_keys( + employee => { + class => 'SL::DB::Employee', + key_columns => { created_by => 'id' }, + }, ); 1;