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/Department.pm
6 6

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

  
9
__PACKAGE__->meta->setup(
10
  table   => 'department',
9
__PACKAGE__->meta->table('department');
11 10

  
12
  columns => [
13
    id          => { type => 'integer', not_null => 1, sequence => 'id' },
14
    description => { type => 'text' },
15
    itime       => { type => 'timestamp', default => 'now()' },
16
    mtime       => { type => 'timestamp' },
17
  ],
11
__PACKAGE__->meta->columns(
12
  id          => { type => 'integer', not_null => 1, sequence => 'id' },
13
  description => { type => 'text' },
14
  itime       => { type => 'timestamp', default => 'now()' },
15
  mtime       => { type => 'timestamp' },
16
);
17

  
18
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
18 19

  
19
  primary_key_columns => [ 'id' ],
20
__PACKAGE__->meta->allow_inline_column_values(1);
20 21

  
21
  allow_inline_column_values => 1,
22
__PACKAGE__->meta->relationships(
23
  ap => {
24
    class      => 'SL::DB::PurchaseInvoice',
25
    column_map => { id => 'department_id' },
26
    type       => 'one to many',
27
  },
28

  
29
  ar => {
30
    class      => 'SL::DB::Invoice',
31
    column_map => { id => 'department_id' },
32
    type       => 'one to many',
33
  },
22 34
);
23 35

  
36
# __PACKAGE__->meta->initialize;
37

  
24 38
1;
25 39
;

Auch abrufbar als: Unified diff