Revision 3eb3d1b1
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/DB/MetaSetup/OrderItem.pm | ||
---|---|---|
9 | 9 |
__PACKAGE__->meta->table('orderitems'); |
10 | 10 |
|
11 | 11 |
__PACKAGE__->meta->columns( |
12 |
trans_id => { type => 'integer' },
|
|
13 |
parts_id => { type => 'integer' },
|
|
12 |
base_qty => { type => 'float', precision => 4 },
|
|
13 |
cusordnumber => { type => 'text' },
|
|
14 | 14 |
description => { type => 'text' }, |
15 |
qty => { type => 'float', precision => 4 }, |
|
16 |
sellprice => { type => 'numeric', precision => 5, scale => 15 }, |
|
17 | 15 |
discount => { type => 'float', precision => 4 }, |
18 |
project_id => { type => 'integer' }, |
|
19 |
reqdate => { type => 'date' }, |
|
20 |
ship => { type => 'float', precision => 4 }, |
|
21 |
serialnumber => { type => 'text' }, |
|
22 | 16 |
id => { type => 'integer', not_null => 1, sequence => 'orderitemsid' }, |
23 | 17 |
itime => { type => 'timestamp', default => 'now()' }, |
18 |
lastcost => { type => 'numeric', precision => 5, scale => 15 }, |
|
19 |
longdescription => { type => 'text' }, |
|
20 |
marge_percent => { type => 'numeric', precision => 5, scale => 15 }, |
|
21 |
marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 }, |
|
22 |
marge_total => { type => 'numeric', precision => 5, scale => 15 }, |
|
24 | 23 |
mtime => { type => 'timestamp' }, |
25 |
pricegroup_id => { type => 'integer' }, |
|
26 | 24 |
ordnumber => { type => 'text' }, |
25 |
parts_id => { type => 'integer' }, |
|
26 |
price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 }, |
|
27 |
price_factor_id => { type => 'integer' }, |
|
28 |
pricegroup_id => { type => 'integer' }, |
|
29 |
project_id => { type => 'integer' }, |
|
30 |
qty => { type => 'float', precision => 4 }, |
|
31 |
reqdate => { type => 'date' }, |
|
32 |
sellprice => { type => 'numeric', precision => 5, scale => 15 }, |
|
33 |
serialnumber => { type => 'text' }, |
|
34 |
ship => { type => 'float', precision => 4 }, |
|
35 |
subtotal => { type => 'boolean', default => 'false' }, |
|
36 |
trans_id => { type => 'integer' }, |
|
27 | 37 |
transdate => { type => 'text' }, |
28 |
cusordnumber => { type => 'text' }, |
|
29 | 38 |
unit => { type => 'varchar', length => 20 }, |
30 |
base_qty => { type => 'float', precision => 4 }, |
|
31 |
subtotal => { type => 'boolean', default => 'false' }, |
|
32 |
longdescription => { type => 'text' }, |
|
33 |
marge_total => { type => 'numeric', precision => 5, scale => 15 }, |
|
34 |
marge_percent => { type => 'numeric', precision => 5, scale => 15 }, |
|
35 |
lastcost => { type => 'numeric', precision => 5, scale => 15 }, |
|
36 |
price_factor_id => { type => 'integer' }, |
|
37 |
price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 }, |
|
38 |
marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 }, |
|
39 | 39 |
); |
40 | 40 |
|
41 | 41 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
... | ... | |
43 | 43 |
__PACKAGE__->meta->allow_inline_column_values(1); |
44 | 44 |
|
45 | 45 |
__PACKAGE__->meta->foreign_keys( |
46 |
order => { |
|
47 |
class => 'SL::DB::Order', |
|
48 |
key_columns => { trans_id => 'id' }, |
|
49 |
}, |
|
50 |
|
|
46 | 51 |
part => { |
47 | 52 |
class => 'SL::DB::Part', |
48 | 53 |
key_columns => { parts_id => 'id' }, |
... | ... | |
62 | 67 |
class => 'SL::DB::Project', |
63 | 68 |
key_columns => { project_id => 'id' }, |
64 | 69 |
}, |
65 |
|
|
66 |
order => { |
|
67 |
class => 'SL::DB::Order', |
|
68 |
key_columns => { trans_id => 'id' }, |
|
69 |
}, |
|
70 | 70 |
); |
71 | 71 |
|
72 |
# __PACKAGE__->meta->initialize; |
|
73 |
|
|
74 | 72 |
1; |
75 | 73 |
; |
Auch abrufbar als: Unified diff
MetaSetup: Spalten- und Fremdschlüsselnamen alphabetisch sortieren