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

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

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

  
12
  columns => [
13
    id         => { type => 'integer', not_null => 1, sequence => 'id' },
14
    partsgroup => { 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
  partsgroup => { 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
  parts => {
24
    class      => 'SL::DB::Part',
25
    column_map => { id => 'partsgroup_id' },
26
    type       => 'one to many',
27
  },
22 28
);
23 29

  
30
# __PACKAGE__->meta->initialize;
31

  
24 32
1;
25 33
;

Auch abrufbar als: Unified diff