X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FInventory.pm;h=fce09e7c4695d8edc2e6249749625ed674b3d611;hb=b9d2f81497c6ff60be298ed1e7697c0c6a4316fa;hp=e2093efe82a1cf4bc0c6186625726759fcf571b0;hpb=35b746e48500af6da78e70a0a9c11b618c1cfde8;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/Inventory.pm b/SL/DB/MetaSetup/Inventory.pm index e2093efe8..fce09e7c4 100644 --- a/SL/DB/MetaSetup/Inventory.pm +++ b/SL/DB/MetaSetup/Inventory.pm @@ -6,64 +6,72 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'inventory', +__PACKAGE__->meta->table('inventory'); - columns => [ - warehouse_id => { type => 'integer', not_null => 1 }, - parts_id => { type => 'integer', not_null => 1 }, - oe_id => { type => 'integer' }, - orderitems_id => { type => 'integer' }, - shippingdate => { type => 'date' }, - employee_id => { type => 'integer', not_null => 1 }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - bin_id => { type => 'integer', not_null => 1 }, - qty => { type => 'numeric', precision => 5, scale => 25 }, - trans_id => { type => 'integer', not_null => 1 }, - trans_type_id => { type => 'integer', not_null => 1 }, - project_id => { type => 'integer' }, - chargenumber => { type => 'text', default => '', not_null => 1 }, - comment => { type => 'text' }, - bestbefore => { type => 'date' }, - id => { type => 'serial', not_null => 1 }, - ], +__PACKAGE__->meta->columns( + bestbefore => { type => 'date' }, + bin_id => { type => 'integer', not_null => 1 }, + chargenumber => { type => 'text', default => '', not_null => 1 }, + comment => { type => 'text' }, + delivery_order_items_stock_id => { type => 'integer' }, + employee_id => { type => 'integer', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + oe_id => { type => 'integer' }, + parts_id => { type => 'integer', not_null => 1 }, + project_id => { type => 'integer' }, + qty => { type => 'numeric', precision => 25, scale => 5 }, + shippingdate => { type => 'date' }, + trans_id => { type => 'integer', not_null => 1 }, + trans_type_id => { type => 'integer', not_null => 1 }, + warehouse_id => { type => 'integer', not_null => 1 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->allow_inline_column_values(1); - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->foreign_keys( + bin => { + class => 'SL::DB::Bin', + key_columns => { bin_id => 'id' }, + }, - allow_inline_column_values => 1, + delivery_order_items_stock => { + class => 'SL::DB::DeliveryOrderItemsStock', + key_columns => { delivery_order_items_stock_id => 'id' }, + }, - foreign_keys => [ - bin => { - class => 'SL::DB::Bin', - key_columns => { bin_id => 'id' }, - }, + employee => { + class => 'SL::DB::Employee', + key_columns => { employee_id => 'id' }, + }, - employee => { - class => 'SL::DB::Employee', - key_columns => { employee_id => 'id' }, - }, + oe => { + class => 'SL::DB::DeliveryOrder', + key_columns => { oe_id => 'id' }, + }, - parts => { - class => 'SL::DB::Part', - key_columns => { parts_id => 'id' }, - }, + parts => { + class => 'SL::DB::Part', + key_columns => { parts_id => 'id' }, + }, - project => { - class => 'SL::DB::Project', - key_columns => { project_id => 'id' }, - }, + project => { + class => 'SL::DB::Project', + key_columns => { project_id => 'id' }, + }, - trans_type => { - class => 'SL::DB::TransferType', - key_columns => { trans_type_id => 'id' }, - }, + trans_type => { + class => 'SL::DB::TransferType', + key_columns => { trans_type_id => 'id' }, + }, - warehouse => { - class => 'SL::DB::Warehouse', - key_columns => { warehouse_id => 'id' }, - }, - ], + warehouse => { + class => 'SL::DB::Warehouse', + key_columns => { warehouse_id => 'id' }, + }, ); 1;