DB und MetaSetup für Letter Tabellen
[kivitendo-erp.git] / SL / DB / MetaSetup / Letter.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::Letter;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('letter');
10
11 __PACKAGE__->meta->columns(
12   id                => { type => 'integer', not_null => 1, sequence => 'id' },
13   vc_id             => { type => 'integer', not_null => 1 },
14   rcv_name          => { type => 'text' },
15   rcv_contact       => { type => 'text' },
16   rcv_address       => { type => 'text' },
17   rcv_countrycode   => { type => 'text' },
18   rcv_zipcode       => { type => 'text' },
19   rcv_city          => { type => 'text' },
20   letternumber      => { type => 'text' },
21   jobnumber         => { type => 'text' },
22   text_created_for  => { type => 'text' },
23   date              => { type => 'text' },
24   subject           => { type => 'text' },
25   greeting          => { type => 'text' },
26   body              => { type => 'text' },
27   close             => { type => 'text' },
28   company_name      => { type => 'text' },
29   employee_id       => { type => 'integer' },
30   employee_position => { type => 'text' },
31   salesman_id       => { type => 'integer' },
32   salesman_position => { type => 'text' },
33   itime             => { type => 'timestamp', default => 'now()' },
34   mtime             => { type => 'timestamp' },
35   rcv_country       => { type => 'text' },
36   page_created_for  => { type => 'text' },
37   cp_id             => { type => 'integer' },
38 );
39
40 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
41
42 __PACKAGE__->meta->allow_inline_column_values(1);
43
44 __PACKAGE__->meta->foreign_keys(
45   employee => {
46     class       => 'SL::DB::Employee',
47     key_columns => { employee_id => 'id' },
48   },
49
50   salesman => {
51     class       => 'SL::DB::Employee',
52     key_columns => { salesman_id => 'id' },
53   },
54 );
55
56 # __PACKAGE__->meta->initialize;
57
58 1;
59 ;