Revision b8b112a3
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
SL/DB/MetaSetup/Printer.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'printers', |
|
9 |
__PACKAGE__->meta->table('printers'); |
|
11 | 10 |
|
12 |
columns => [ |
|
13 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
14 |
printer_description => { type => 'text', not_null => 1 }, |
|
15 |
printer_command => { type => 'text' }, |
|
16 |
template_code => { type => 'text' }, |
|
17 |
], |
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
13 |
printer_description => { type => 'text', not_null => 1 }, |
|
14 |
printer_command => { type => 'text' }, |
|
15 |
template_code => { type => 'text' }, |
|
16 |
); |
|
17 |
|
|
18 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
18 | 19 |
|
19 |
primary_key_columns => [ 'id' ], |
|
20 |
__PACKAGE__->meta->relationships( |
|
21 |
periodic_invoices_configs => { |
|
22 |
class => 'SL::DB::PeriodicInvoicesConfig', |
|
23 |
column_map => { id => 'printer_id' }, |
|
24 |
type => 'one to many', |
|
25 |
}, |
|
20 | 26 |
); |
21 | 27 |
|
28 |
# __PACKAGE__->meta->initialize; |
|
29 |
|
|
22 | 30 |
1; |
23 | 31 |
; |
Auch abrufbar als: Unified diff
MetaSetup neu generiert