MetaSetup: Folgerun um die Foreign Keys umzudrehen
[kivitendo-erp.git] / SL / DB / MetaSetup / PurchaseInvoice.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::PurchaseInvoice;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('ap');
10
11 __PACKAGE__->meta->columns(
12   id                      => { type => 'integer', not_null => 1, sequence => 'glid' },
13   invnumber               => { type => 'text', not_null => 1 },
14   transdate               => { type => 'date', default => 'now' },
15   gldate                  => { type => 'date', default => 'now' },
16   vendor_id               => { type => 'integer' },
17   taxincluded             => { type => 'boolean', default => 'false' },
18   amount                  => { type => 'numeric', precision => 5, scale => 15 },
19   netamount               => { type => 'numeric', precision => 5, scale => 15 },
20   paid                    => { type => 'numeric', precision => 5, scale => 15 },
21   datepaid                => { type => 'date' },
22   duedate                 => { type => 'date' },
23   invoice                 => { type => 'boolean', default => 'false' },
24   ordnumber               => { type => 'text' },
25   notes                   => { type => 'text' },
26   employee_id             => { type => 'integer' },
27   quonumber               => { type => 'text' },
28   intnotes                => { type => 'text' },
29   department_id           => { type => 'integer' },
30   itime                   => { type => 'timestamp', default => 'now()' },
31   mtime                   => { type => 'timestamp' },
32   shipvia                 => { type => 'text' },
33   cp_id                   => { type => 'integer' },
34   language_id             => { type => 'integer' },
35   payment_id              => { type => 'integer' },
36   storno                  => { type => 'boolean', default => 'false' },
37   taxzone_id              => { type => 'integer' },
38   type                    => { type => 'text' },
39   orddate                 => { type => 'date' },
40   quodate                 => { type => 'date' },
41   globalproject_id        => { type => 'integer' },
42   transaction_description => { type => 'text' },
43   storno_id               => { type => 'integer' },
44   direct_debit            => { type => 'boolean', default => 'false' },
45   deliverydate            => { type => 'date' },
46   currency_id             => { type => 'integer', not_null => 1 },
47 );
48
49 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
50
51 __PACKAGE__->meta->allow_inline_column_values(1);
52
53 __PACKAGE__->meta->foreign_keys(
54   contact => {
55     class       => 'SL::DB::Contact',
56     key_columns => { cp_id => 'cp_id' },
57   },
58
59   currency => {
60     class       => 'SL::DB::Currency',
61     key_columns => { currency_id => 'id' },
62   },
63
64   department => {
65     class       => 'SL::DB::Department',
66     key_columns => { department_id => 'id' },
67   },
68
69   employee => {
70     class       => 'SL::DB::Employee',
71     key_columns => { employee_id => 'id' },
72   },
73
74   globalproject => {
75     class       => 'SL::DB::Project',
76     key_columns => { globalproject_id => 'id' },
77   },
78
79   language => {
80     class       => 'SL::DB::Language',
81     key_columns => { language_id => 'id' },
82   },
83
84   payment_terms => {
85     class       => 'SL::DB::PaymentTerm',
86     key_columns => { payment_id => 'id' },
87   },
88
89   storno_obj => {
90     class       => 'SL::DB::PurchaseInvoice',
91     key_columns => { storno_id => 'id' },
92   },
93
94   vendor => {
95     class       => 'SL::DB::Vendor',
96     key_columns => { vendor_id => 'id' },
97   },
98 );
99
100 # __PACKAGE__->meta->initialize;
101
102 1;
103 ;