83850fffa4bd942a6f737e725bc9904e012a472f
[kivitendo-erp.git] / SL / DB / MetaSetup / RecordTemplate.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::RecordTemplate;
4
5 use strict;
6
7 use parent qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('record_templates');
10
11 __PACKAGE__->meta->columns(
12   ar_ap_chart_id => { type => 'integer' },
13   cb_transaction => { type => 'boolean', default => 'false', not_null => 1 },
14   currency_id    => { type => 'integer', not_null => 1 },
15   customer_id    => { type => 'integer' },
16   department_id  => { type => 'integer' },
17   description    => { type => 'text' },
18   direct_debit   => { type => 'boolean', default => 'false', not_null => 1 },
19   employee_id    => { type => 'integer' },
20   id             => { type => 'serial', not_null => 1 },
21   itime          => { type => 'timestamp', default => 'now()', not_null => 1 },
22   mtime          => { type => 'timestamp', default => 'now()', not_null => 1 },
23   notes          => { type => 'text' },
24   ob_transaction => { type => 'boolean', default => 'false', not_null => 1 },
25   ordnumber      => { type => 'text' },
26   payment_id     => { type => 'integer' },
27   project_id     => { type => 'integer' },
28   reference      => { type => 'text' },
29   show_details   => { type => 'boolean', default => 'false', not_null => 1 },
30   taxincluded    => { type => 'boolean', default => 'false', not_null => 1 },
31   template_name  => { type => 'text', not_null => 1 },
32   template_type  => { type => 'enum', check_in => [ 'ar_transaction', 'ap_transaction', 'gl_transaction' ], db_type => 'record_template_type', not_null => 1 },
33   vendor_id      => { type => 'integer' },
34 );
35
36 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
37
38 __PACKAGE__->meta->allow_inline_column_values(1);
39
40 __PACKAGE__->meta->foreign_keys(
41   ar_ap_chart => {
42     class       => 'SL::DB::Chart',
43     key_columns => { ar_ap_chart_id => 'id' },
44   },
45
46   currency => {
47     class       => 'SL::DB::Currency',
48     key_columns => { currency_id => 'id' },
49   },
50
51   customer => {
52     class       => 'SL::DB::Customer',
53     key_columns => { customer_id => 'id' },
54   },
55
56   department => {
57     class       => 'SL::DB::Department',
58     key_columns => { department_id => 'id' },
59   },
60
61   employee => {
62     class       => 'SL::DB::Employee',
63     key_columns => { employee_id => 'id' },
64   },
65
66   payment => {
67     class       => 'SL::DB::PaymentTerm',
68     key_columns => { payment_id => 'id' },
69   },
70
71   project => {
72     class       => 'SL::DB::Project',
73     key_columns => { project_id => 'id' },
74   },
75
76   vendor => {
77     class       => 'SL::DB::Vendor',
78     key_columns => { vendor_id => 'id' },
79   },
80 );
81
82 1;
83 ;