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

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

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

  
12
  columns => [
13
    id                     => { type => 'integer', not_null => 1, sequence => 'id' },
14
    delivery_order_item_id => { type => 'integer', not_null => 1 },
15
    qty                    => { type => 'numeric', not_null => 1, precision => 5, scale => 15 },
16
    unit                   => { type => 'varchar', length => 20, not_null => 1 },
17
    warehouse_id           => { type => 'integer', not_null => 1 },
18
    bin_id                 => { type => 'integer', not_null => 1 },
19
    chargenumber           => { type => 'text' },
20
    itime                  => { type => 'timestamp', default => 'now()' },
21
    mtime                  => { type => 'timestamp' },
22
    bestbefore             => { type => 'date' },
23
  ],
24

  
25
  primary_key_columns => [ 'id' ],
26

  
27
  allow_inline_column_values => 1,
28

  
29
  foreign_keys => [
30
    bin => {
31
      class       => 'SL::DB::Bin',
32
      key_columns => { bin_id => 'id' },
33
    },
34

  
35
    delivery_order_item => {
36
      class       => 'SL::DB::DeliveryOrderItem',
37
      key_columns => { delivery_order_item_id => 'id' },
38
    },
39

  
40
    warehouse => {
41
      class       => 'SL::DB::Warehouse',
42
      key_columns => { warehouse_id => 'id' },
43
    },
44
  ],
9
__PACKAGE__->meta->table('delivery_order_items_stock');
10

  
11
__PACKAGE__->meta->columns(
12
  id                     => { type => 'integer', not_null => 1, sequence => 'id' },
13
  delivery_order_item_id => { type => 'integer', not_null => 1 },
14
  qty                    => { type => 'numeric', not_null => 1, precision => 5, scale => 15 },
15
  unit                   => { type => 'varchar', length => 20, not_null => 1 },
16
  warehouse_id           => { type => 'integer', not_null => 1 },
17
  bin_id                 => { type => 'integer', not_null => 1 },
18
  chargenumber           => { type => 'text' },
19
  itime                  => { type => 'timestamp', default => 'now()' },
20
  mtime                  => { type => 'timestamp' },
21
  bestbefore             => { type => 'date' },
45 22
);
46 23

  
24
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
25

  
26
__PACKAGE__->meta->allow_inline_column_values(1);
27

  
28
__PACKAGE__->meta->foreign_keys(
29
  bin => {
30
    class       => 'SL::DB::Bin',
31
    key_columns => { bin_id => 'id' },
32
  },
33

  
34
  delivery_order_item => {
35
    class       => 'SL::DB::DeliveryOrderItem',
36
    key_columns => { delivery_order_item_id => 'id' },
37
  },
38

  
39
  warehouse => {
40
    class       => 'SL::DB::Warehouse',
41
    key_columns => { warehouse_id => 'id' },
42
  },
43
);
44

  
45
# __PACKAGE__->meta->initialize;
46

  
47 47
1;
48 48
;

Auch abrufbar als: Unified diff