59085cd8c97ef7c4fb485849eeaec35bc3f1f857
[kivitendo-erp.git] / SL / DB / MetaSetup / Note.pm
1 # This file has been auto-generated. Do not modify it; it will be overwritten
2 # by rose_auto_create_model.pl automatically.
3 package SL::DB::Note;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('notes');
10
11 __PACKAGE__->meta->columns(
12   id           => { type => 'integer', not_null => 1, sequence => 'note_id' },
13   subject      => { type => 'text' },
14   body         => { type => 'text' },
15   created_by   => { type => 'integer', not_null => 1 },
16   trans_id     => { type => 'integer' },
17   trans_module => { type => 'varchar', length => 10 },
18   itime        => { type => 'timestamp', default => 'now()' },
19   mtime        => { type => 'timestamp' },
20 );
21
22 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
23
24 __PACKAGE__->meta->allow_inline_column_values(1);
25
26 __PACKAGE__->meta->foreign_keys(
27   employee => {
28     class       => 'SL::DB::Employee',
29     key_columns => { created_by => 'id' },
30   },
31 );
32
33 __PACKAGE__->meta->relationships(
34   follow_ups => {
35     class      => 'SL::DB::FollowUp',
36     column_map => { id => 'note_id' },
37     type       => 'one to many',
38   },
39 );
40
41 # __PACKAGE__->meta->initialize;
42
43 1;
44 ;