Revision 42428c08
Von Tamino Steinert vor 8 Tagen hinzugefügt
SL/DB/Helper/ALL.pm | ||
---|---|---|
92 | 92 |
use SL::DB::Part; |
93 | 93 |
use SL::DB::PartClassification; |
94 | 94 |
use SL::DB::PartCustomerPrice; |
95 |
use SL::DB::PartLabelPrint; |
|
95 | 96 |
use SL::DB::PartsGroup; |
96 | 97 |
use SL::DB::PartsPriceHistory; |
97 | 98 |
use SL::DB::PaymentTerm; |
SL/DB/Helper/Mappings.pm | ||
---|---|---|
173 | 173 |
part_classifications => 'PartClassification', |
174 | 174 |
part_customer_prices => 'PartCustomerPrice', |
175 | 175 |
parts_price_history => 'PartsPriceHistory', |
176 |
part_label_prints => 'PartLabelPrint', |
|
176 | 177 |
payment_terms => 'payment_term', |
177 | 178 |
periodic_invoices => 'periodic_invoice', |
178 | 179 |
periodic_invoices_configs => 'periodic_invoices_config', |
SL/DB/Manager/PartLabelPrint.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 |
package SL::DB::Manager::PartLabelPrint; |
|
5 |
|
|
6 |
use strict; |
|
7 |
|
|
8 |
use parent qw(SL::DB::Helper::Manager); |
|
9 |
|
|
10 |
sub object_class { 'SL::DB::PartLabelPrint' } |
|
11 |
|
|
12 |
__PACKAGE__->make_manager_methods; |
|
13 |
|
|
14 |
1; |
SL/DB/MetaSetup/PartLabelPrint.pm | ||
---|---|---|
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::PartLabelPrint; |
|
4 |
|
|
5 |
use strict; |
|
6 |
|
|
7 |
use parent qw(SL::DB::Object); |
|
8 |
|
|
9 |
__PACKAGE__->meta->table('part_label_prints'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
price_history_id => { type => 'integer', not_null => 1 }, |
|
13 |
print_type => { type => 'enum', check_in => [ 'single', 'stock' ], db_type => 'part_label_print_types', not_null => 1 }, |
|
14 |
template => { type => 'text', not_null => 1 }, |
|
15 |
); |
|
16 |
|
|
17 |
__PACKAGE__->meta->primary_key_columns([ 'price_history_id', 'print_type', 'template' ]); |
|
18 |
|
|
19 |
__PACKAGE__->meta->foreign_keys( |
|
20 |
price_history => { |
|
21 |
class => 'SL::DB::PartsPriceHistory', |
|
22 |
key_columns => { price_history_id => 'id' }, |
|
23 |
}, |
|
24 |
); |
|
25 |
|
|
26 |
1; |
|
27 |
; |
SL/DB/PartLabelPrint.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 |
package SL::DB::PartLabelPrint; |
|
5 |
|
|
6 |
use strict; |
|
7 |
|
|
8 |
use SL::DB::MetaSetup::PartLabelPrint; |
|
9 |
use SL::DB::Manager::PartLabelPrint; |
|
10 |
|
|
11 |
__PACKAGE__->meta->initialize; |
|
12 |
|
|
13 |
1; |
SL/DB/PartsPriceHistory.pm | ||
---|---|---|
5 | 5 |
use SL::DB::MetaSetup::PartsPriceHistory; |
6 | 6 |
use SL::DB::Manager::PartsPriceHistory; |
7 | 7 |
|
8 |
__PACKAGE__->meta->add_relationships( |
|
9 |
part_label_prints => { |
|
10 |
type => 'many to one', |
|
11 |
class => 'SL::DB::PartLabelPrint', |
|
12 |
column_map => { id => 'price_history_id' }, |
|
13 |
}, |
|
14 |
); |
|
15 |
|
|
8 | 16 |
__PACKAGE__->meta->initialize; |
9 | 17 |
|
10 | 18 |
1; |
sql/Pg-upgrade2/create_part_label_prints.sql | ||
---|---|---|
1 |
-- @tag: create_part_label_prints |
|
2 |
-- @description: Tabelle für automatischen Edikettendruck |
|
3 |
-- @depends: release_3_9_1 |
|
4 |
|
|
5 |
CREATE TYPE part_label_print_types AS ENUM ( |
|
6 |
'single', |
|
7 |
'stock' |
|
8 |
); |
|
9 |
|
|
10 |
CREATE TABLE part_label_prints ( |
|
11 |
price_history_id INTEGER REFERENCES parts_price_history(id) NOT NULL, |
|
12 |
print_type part_label_print_types NOT NULL, |
|
13 |
template TEXT NOT NULL, |
|
14 |
|
|
15 |
PRIMARY KEY (price_history_id, print_type, template) |
|
16 |
); |
Auch abrufbar als: Unified diff
PartLabelPrint: sql-Skript und DB-Objekte