1 # This file has been auto-generated. Do not modify it; it will be overwritten
 
   2 # by rose_auto_create_model.pl automatically.
 
   7 use parent qw(SL::DB::Object);
 
   9 __PACKAGE__->meta->table('parts');
 
  11 __PACKAGE__->meta->columns(
 
  12   assembly           => { type => 'boolean', default => 'false' },
 
  13   bin_id             => { type => 'integer' },
 
  14   bom                => { type => 'boolean', default => 'false' },
 
  15   buchungsgruppen_id => { type => 'integer' },
 
  16   description        => { type => 'text' },
 
  17   drawing            => { type => 'text' },
 
  18   ean                => { type => 'text' },
 
  19   expense_accno_id   => { type => 'integer' },
 
  20   formel             => { type => 'text' },
 
  21   gv                 => { type => 'numeric', precision => 15, scale => 5 },
 
  22   has_sernumber      => { type => 'boolean', default => 'false' },
 
  23   id                 => { type => 'integer', not_null => 1, sequence => 'id' },
 
  24   image              => { type => 'text' },
 
  25   income_accno_id    => { type => 'integer' },
 
  26   inventory_accno_id => { type => 'integer' },
 
  27   itime              => { type => 'timestamp', default => 'now()' },
 
  28   lastcost           => { type => 'numeric', precision => 15, scale => 5 },
 
  29   listprice          => { type => 'numeric', precision => 15, scale => 5 },
 
  30   makemodel          => { type => 'boolean', default => 'false' },
 
  31   microfiche         => { type => 'text' },
 
  32   mtime              => { type => 'timestamp' },
 
  33   not_discountable   => { type => 'boolean', default => 'false' },
 
  34   notes              => { type => 'text' },
 
  35   obsolete           => { type => 'boolean', default => 'false' },
 
  36   onhand             => { type => 'numeric', default => '0', precision => 25, scale => 5 },
 
  37   partnumber         => { type => 'text', not_null => 1 },
 
  38   partsgroup_id      => { type => 'integer' },
 
  39   payment_id         => { type => 'integer' },
 
  40   price_factor_id    => { type => 'integer' },
 
  41   priceupdate        => { type => 'date', default => 'now' },
 
  42   rop                => { type => 'float', scale => 4 },
 
  43   sellprice          => { type => 'numeric', precision => 15, scale => 5 },
 
  44   shop               => { type => 'boolean', default => 'false' },
 
  45   stockable          => { type => 'boolean', default => 'false' },
 
  46   unit               => { type => 'varchar', length => 20, not_null => 1 },
 
  47   ve                 => { type => 'integer' },
 
  48   warehouse_id       => { type => 'integer' },
 
  49   weight             => { type => 'float', scale => 4 },
 
  52 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
  54 __PACKAGE__->meta->unique_keys([ 'partnumber' ]);
 
  56 __PACKAGE__->meta->allow_inline_column_values(1);
 
  58 __PACKAGE__->meta->foreign_keys(
 
  60     class       => 'SL::DB::Bin',
 
  61     key_columns => { bin_id => 'id' },
 
  65     class       => 'SL::DB::Buchungsgruppe',
 
  66     key_columns => { buchungsgruppen_id => 'id' },
 
  70     class       => 'SL::DB::Chart',
 
  71     key_columns => { expense_accno_id => 'id' },
 
  75     class       => 'SL::DB::Chart',
 
  76     key_columns => { income_accno_id => 'id' },
 
  79   inventory_account => {
 
  80     class       => 'SL::DB::Chart',
 
  81     key_columns => { inventory_accno_id => 'id' },
 
  85     class       => 'SL::DB::PartsGroup',
 
  86     key_columns => { partsgroup_id => 'id' },
 
  90     class       => 'SL::DB::PaymentTerm',
 
  91     key_columns => { payment_id => 'id' },
 
  95     class       => 'SL::DB::PriceFactor',
 
  96     key_columns => { price_factor_id => 'id' },
 
 100     class       => 'SL::DB::Unit',
 
 101     key_columns => { unit => 'name' },
 
 105     class       => 'SL::DB::Warehouse',
 
 106     key_columns => { warehouse_id => 'id' },