0d29b9fe15bdd2aacbd946322cd4aa86ec28e904
[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 parent qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('letter');
10
11 __PACKAGE__->meta->columns(
12   body              => { type => 'text' },
13   close             => { type => 'text' },
14   company_name      => { type => 'text' },
15   cp_id             => { type => 'integer' },
16   date              => { type => 'date' },
17   employee_id       => { type => 'integer' },
18   employee_position => { type => 'text' },
19   greeting          => { type => 'text' },
20   id                => { type => 'integer', not_null => 1, sequence => 'id' },
21   intnotes          => { type => 'text' },
22   itime             => { type => 'timestamp', default => 'now()' },
23   jobnumber         => { type => 'text' },
24   letternumber      => { type => 'text' },
25   mtime             => { type => 'timestamp' },
26   page_created_for  => { type => 'text' },
27   rcv_address       => { type => 'text' },
28   rcv_city          => { type => 'text' },
29   rcv_contact       => { type => 'text' },
30   rcv_country       => { type => 'text' },
31   rcv_countrycode   => { type => 'text' },
32   rcv_name          => { type => 'text' },
33   rcv_zipcode       => { type => 'text' },
34   reference         => { type => 'text' },
35   salesman_id       => { type => 'integer' },
36   salesman_position => { type => 'text' },
37   subject           => { type => 'text' },
38   text_created_for  => { type => 'text' },
39   vc_id             => { type => 'integer', not_null => 1 },
40 );
41
42 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
43
44 __PACKAGE__->meta->allow_inline_column_values(1);
45
46 __PACKAGE__->meta->foreign_keys(
47   contact => {
48     class       => 'SL::DB::Contact',
49     key_columns => { cp_id => 'cp_id' },
50   },
51
52   employee => {
53     class       => 'SL::DB::Employee',
54     key_columns => { employee_id => 'id' },
55   },
56
57   salesman => {
58     class       => 'SL::DB::Employee',
59     key_columns => { salesman_id => 'id' },
60   },
61 );
62
63 1;
64 ;