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

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

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

  
12
  columns => [
13
    parts_id      => { type => 'integer' },
14
    pricegroup_id => { type => 'integer' },
15
    price         => { type => 'numeric', precision => 5, scale => 15 },
16
    id            => { type => 'serial', not_null => 1 },
17
  ],
18

  
19
  primary_key_columns => [ 'id' ],
20

  
21
  foreign_keys => [
22
    parts => {
23
      class       => 'SL::DB::Part',
24
      key_columns => { parts_id => 'id' },
25
    },
26

  
27
    pricegroup => {
28
      class       => 'SL::DB::Pricegroup',
29
      key_columns => { pricegroup_id => 'id' },
30
    },
31
  ],
9
__PACKAGE__->meta->table('prices');
10

  
11
__PACKAGE__->meta->columns(
12
  parts_id      => { type => 'integer' },
13
  pricegroup_id => { type => 'integer' },
14
  price         => { type => 'numeric', precision => 5, scale => 15 },
15
  id            => { type => 'serial', not_null => 1 },
16
);
17

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

  
20
__PACKAGE__->meta->foreign_keys(
21
  parts => {
22
    class       => 'SL::DB::Part',
23
    key_columns => { parts_id => 'id' },
24
  },
25

  
26
  pricegroup => {
27
    class       => 'SL::DB::Pricegroup',
28
    key_columns => { pricegroup_id => 'id' },
29
  },
32 30
);
33 31

  
32
# __PACKAGE__->meta->initialize;
33

  
34 34
1;
35 35
;

Auch abrufbar als: Unified diff