MetaSetup neu generiert
[kivitendo-erp.git] / SL / DB / MetaSetup / GLTransaction.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::GLTransaction;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('gl');
10
11 __PACKAGE__->meta->columns(
12   id             => { type => 'integer', not_null => 1, sequence => 'glid' },
13   reference      => { type => 'text' },
14   description    => { type => 'text' },
15   transdate      => { type => 'date', default => 'now' },
16   gldate         => { type => 'date', default => 'now' },
17   employee_id    => { type => 'integer' },
18   notes          => { type => 'text' },
19   department_id  => { type => 'integer' },
20   taxincluded    => { type => 'boolean' },
21   itime          => { type => 'timestamp', default => 'now()' },
22   mtime          => { type => 'timestamp' },
23   type           => { type => 'text' },
24   storno         => { type => 'boolean', default => 'false' },
25   storno_id      => { type => 'integer' },
26   ob_transaction => { type => 'boolean' },
27   cb_transaction => { type => 'boolean' },
28 );
29
30 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
31
32 __PACKAGE__->meta->allow_inline_column_values(1);
33
34 __PACKAGE__->meta->foreign_keys(
35   department => {
36     class       => 'SL::DB::Department',
37     key_columns => { department_id => 'id' },
38   },
39
40   storno_obj => {
41     class       => 'SL::DB::GLTransaction',
42     key_columns => { storno_id => 'id' },
43   },
44 );
45
46 __PACKAGE__->meta->relationships(
47   gl => {
48     class      => 'SL::DB::GLTransaction',
49     column_map => { id => 'storno_id' },
50     type       => 'one to many',
51   },
52 );
53
54 # __PACKAGE__->meta->initialize;
55
56 1;
57 ;