3eda536acee73bc9c233b2e29579f177583d871f
[kivitendo-erp.git] / SL / DB / MetaSetup / PaymentTerm.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::PaymentTerm;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('payment_terms');
10
11 __PACKAGE__->meta->columns(
12   id               => { type => 'integer', not_null => 1, sequence => 'id' },
13   description      => { type => 'text' },
14   description_long => { type => 'text' },
15   terms_netto      => { type => 'integer' },
16   terms_skonto     => { type => 'integer' },
17   percent_skonto   => { type => 'float', precision => 4 },
18   itime            => { type => 'timestamp', default => 'now()' },
19   mtime            => { type => 'timestamp' },
20   ranking          => { type => 'integer' },
21   sortkey          => { type => 'integer', not_null => 1 },
22 );
23
24 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
25
26 __PACKAGE__->meta->allow_inline_column_values(1);
27
28 __PACKAGE__->meta->relationships(
29   ap => {
30     class      => 'SL::DB::PurchaseInvoice',
31     column_map => { id => 'payment_id' },
32     type       => 'one to many',
33   },
34
35   ar => {
36     class      => 'SL::DB::Invoice',
37     column_map => { id => 'payment_id' },
38     type       => 'one to many',
39   },
40
41   customer => {
42     class      => 'SL::DB::Customer',
43     column_map => { id => 'payment_id' },
44     type       => 'one to many',
45   },
46
47   oe => {
48     class      => 'SL::DB::Order',
49     column_map => { id => 'payment_id' },
50     type       => 'one to many',
51   },
52
53   parts => {
54     class      => 'SL::DB::Part',
55     column_map => { id => 'payment_id' },
56     type       => 'one to many',
57   },
58 );
59
60 # __PACKAGE__->meta->initialize;
61
62 1;
63 ;