1 # This file has been auto-generated. Do not modify it; it will be overwritten
 
   2 # by rose_auto_create_model.pl automatically.
 
   3 package SL::DB::Stocktaking;
 
   7 use parent qw(SL::DB::Object);
 
   9 __PACKAGE__->meta->table('stocktakings');
 
  11 __PACKAGE__->meta->columns(
 
  12   bestbefore   => { type => 'date' },
 
  13   bin_id       => { type => 'integer', not_null => 1 },
 
  14   chargenumber => { type => 'text', default => '', not_null => 1 },
 
  15   comment      => { type => 'text' },
 
  16   cutoff_date  => { type => 'date', not_null => 1 },
 
  17   employee_id  => { type => 'integer', not_null => 1 },
 
  18   id           => { type => 'integer', not_null => 1, sequence => 'id' },
 
  19   inventory_id => { type => 'integer' },
 
  20   itime        => { type => 'timestamp', default => 'now()' },
 
  21   mtime        => { type => 'timestamp' },
 
  22   parts_id     => { type => 'integer', not_null => 1 },
 
  23   qty          => { type => 'numeric', not_null => 1, precision => 25, scale => 5 },
 
  24   warehouse_id => { type => 'integer', not_null => 1 },
 
  27 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
  29 __PACKAGE__->meta->allow_inline_column_values(1);
 
  31 __PACKAGE__->meta->foreign_keys(
 
  33     class       => 'SL::DB::Bin',
 
  34     key_columns => { bin_id => 'id' },
 
  38     class       => 'SL::DB::Employee',
 
  39     key_columns => { employee_id => 'id' },
 
  43     class       => 'SL::DB::Inventory',
 
  44     key_columns => { inventory_id => 'id' },
 
  48     class       => 'SL::DB::Part',
 
  49     key_columns => { parts_id => 'id' },
 
  53     class       => 'SL::DB::Warehouse',
 
  54     key_columns => { warehouse_id => 'id' },