Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3751ebca

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID 3751ebca54b109b6ef3cdb843edf4cdae5034aa5
  • Vorgänger ebd668c1
  • Nachfolger e13733db

PurchaseBasketItem: Datenbankscript und DB-Dateien

Positionsebene für den Einkaufskorb

Unterschiede anzeigen:

SL/DB/Helper/ALL.pm
use SL::DB::ProjectRole;
use SL::DB::ProjectStatus;
use SL::DB::ProjectType;
use SL::DB::PurchaseBasketItem;
use SL::DB::PurchaseInvoice;
use SL::DB::Reclamation;
use SL::DB::ReclamationItem;
SL/DB/Helper/Mappings.pm
project_roles => 'project_role',
project_statuses => 'project_status',
project_types => 'project_type',
purchase_basket_items => 'purchase_basket_item',
reclamations => 'Reclamation',
reclamation_items => 'ReclamationItem',
reclamation_reasons => 'ReclamationReason',
SL/DB/Manager/PurchaseBasketItem.pm
# This file has been auto-generated only because it didn't exist.
# Feel free to modify it at will; it will not be overwritten automatically.
package SL::DB::Manager::PurchaseBasketItem;
use strict;
use parent qw(SL::DB::Helper::Manager);
sub object_class { 'SL::DB::PurchaseBasketItem' }
__PACKAGE__->make_manager_methods;
1;
SL/DB/MetaSetup/PurchaseBasketItem.pm
# This file has been auto-generated. Do not modify it; it will be overwritten
# by rose_auto_create_model.pl automatically.
package SL::DB::PurchaseBasketItem;
use strict;
use parent qw(SL::DB::Object);
__PACKAGE__->meta->table('purchase_basket_items');
__PACKAGE__->meta->columns(
cleared => { type => 'boolean', default => 'false', not_null => 1 },
id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
orderer_id => { type => 'integer' },
part_id => { type => 'integer' },
qty => { type => 'numeric', not_null => 1, precision => 15, scale => 5 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
__PACKAGE__->meta->foreign_keys(
orderer => {
class => 'SL::DB::Employee',
key_columns => { orderer_id => 'id' },
},
part => {
class => 'SL::DB::Part',
key_columns => { part_id => 'id' },
},
);
1;
;
SL/DB/PurchaseBasketItem.pm
# This file has been auto-generated only because it didn't exist.
# Feel free to modify it at will; it will not be overwritten automatically.
package SL::DB::PurchaseBasketItem;
use strict;
use SL::DB::MetaSetup::PurchaseBasketItem;
use SL::DB::Manager::PurchaseBasketItem;
__PACKAGE__->meta->initialize;
1;
sql/Pg-upgrade2/purchase_basket_items.sql
-- @tag: purchase_basket_items
-- @description: Tabelle für den Dispositionsmanager
-- @depends: release_3_8_0
-- @ignore: 0
CREATE TABLE purchase_basket_items (
id SERIAL PRIMARY KEY,
part_id INTEGER REFERENCES parts(id),
orderer_id INTEGER REFERENCES employee(id),
qty NUMERIC(15,5) NOT NULL,
cleared BOOLEAN NOT NULL DEFAULT FALSE,
itime TIMESTAMP without time zone DEFAULT now(),
mtime TIMESTAMP without time zone
);
CREATE TRIGGER mtime_purchase_basket_items
BEFORE UPDATE ON purchase_basket_items
FOR EACH ROW EXECUTE PROCEDURE set_mtime();

Auch abrufbar als: Unified diff