Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 42428c08

Von Tamino Steinert vor 5 Monaten hinzugefügt

  • ID 42428c08808162c0a84111f68c090b18d09d1d8e
  • Vorgänger a9d80e98
  • Nachfolger 1796abb6

PartLabelPrint: sql-Skript und DB-Objekte

Tabelle zum Merken ob Etiketten für eine Preisänderung gedruckt
wurden.

Unterschiede anzeigen:

SL/DB/Helper/ALL.pm
use SL::DB::Part;
use SL::DB::PartClassification;
use SL::DB::PartCustomerPrice;
use SL::DB::PartLabelPrint;
use SL::DB::PartsGroup;
use SL::DB::PartsPriceHistory;
use SL::DB::PaymentTerm;
SL/DB/Helper/Mappings.pm
part_classifications => 'PartClassification',
part_customer_prices => 'PartCustomerPrice',
parts_price_history => 'PartsPriceHistory',
part_label_prints => 'PartLabelPrint',
payment_terms => 'payment_term',
periodic_invoices => 'periodic_invoice',
periodic_invoices_configs => 'periodic_invoices_config',
SL/DB/Manager/PartLabelPrint.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::PartLabelPrint;
use strict;
use parent qw(SL::DB::Helper::Manager);
sub object_class { 'SL::DB::PartLabelPrint' }
__PACKAGE__->make_manager_methods;
1;
SL/DB/MetaSetup/PartLabelPrint.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::PartLabelPrint;
use strict;
use parent qw(SL::DB::Object);
__PACKAGE__->meta->table('part_label_prints');
__PACKAGE__->meta->columns(
price_history_id => { type => 'integer', not_null => 1 },
print_type => { type => 'enum', check_in => [ 'single', 'stock' ], db_type => 'part_label_print_types', not_null => 1 },
template => { type => 'text', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'price_history_id', 'print_type', 'template' ]);
__PACKAGE__->meta->foreign_keys(
price_history => {
class => 'SL::DB::PartsPriceHistory',
key_columns => { price_history_id => 'id' },
},
);
1;
;
SL/DB/PartLabelPrint.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::PartLabelPrint;
use strict;
use SL::DB::MetaSetup::PartLabelPrint;
use SL::DB::Manager::PartLabelPrint;
__PACKAGE__->meta->initialize;
1;
SL/DB/PartsPriceHistory.pm
use SL::DB::MetaSetup::PartsPriceHistory;
use SL::DB::Manager::PartsPriceHistory;
__PACKAGE__->meta->add_relationships(
part_label_prints => {
type => 'many to one',
class => 'SL::DB::PartLabelPrint',
column_map => { id => 'price_history_id' },
},
);
__PACKAGE__->meta->initialize;
1;
sql/Pg-upgrade2/create_part_label_prints.sql
-- @tag: create_part_label_prints
-- @description: Tabelle für automatischen Edikettendruck
-- @depends: release_3_9_1
CREATE TYPE part_label_print_types AS ENUM (
'single',
'stock'
);
CREATE TABLE part_label_prints (
price_history_id INTEGER REFERENCES parts_price_history(id) NOT NULL,
print_type part_label_print_types NOT NULL,
template TEXT NOT NULL,
PRIMARY KEY (price_history_id, print_type, template)
);

Auch abrufbar als: Unified diff