Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b8b112a3

Von Sven Schöling vor mehr als 11 Jahren hinzugefügt

  • ID b8b112a39bd601b0bc717646d78de470631da22a
  • Vorgänger c0931303
  • Nachfolger 2d7e4203

MetaSetup neu generiert

Unterschiede anzeigen:

SL/DB/MetaSetup/GLTransaction.pm
6 6

  
7 7
use base qw(SL::DB::Object);
8 8

  
9
__PACKAGE__->meta->setup(
10
  table   => 'gl',
11

  
12
  columns => [
13
    id             => { type => 'integer', not_null => 1, sequence => 'glid' },
14
    reference      => { type => 'text' },
15
    description    => { type => 'text' },
16
    transdate      => { type => 'date', default => 'now' },
17
    gldate         => { type => 'date', default => 'now' },
18
    employee_id    => { type => 'integer' },
19
    notes          => { type => 'text' },
20
    department_id  => { type => 'integer' },
21
    taxincluded    => { type => 'boolean' },
22
    itime          => { type => 'timestamp', default => 'now()' },
23
    mtime          => { type => 'timestamp' },
24
    type           => { type => 'text' },
25
    storno         => { type => 'boolean', default => 'false' },
26
    storno_id      => { type => 'integer' },
27
    ob_transaction => { type => 'boolean' },
28
    cb_transaction => { type => 'boolean' },
29
  ],
30

  
31
  primary_key_columns => [ 'id' ],
32

  
33
  allow_inline_column_values => 1,
34

  
35
  foreign_keys => [
36
    department => {
37
      class       => 'SL::DB::Department',
38
      key_columns => { department_id => 'id' },
39
    },
40

  
41
    storno_obj => {
42
      class       => 'SL::DB::GLTransaction',
43
      key_columns => { storno_id => 'id' },
44
    },
45
  ],
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' },
46 28
);
47 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

  
48 56
1;
49 57
;

Auch abrufbar als: Unified diff