line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package AproJo::DB::Schema::Result::Orderitem; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1207
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
72
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
63
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
10
|
use base 'DBIx::Class::Core'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
487
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->table('orderitems'); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->add_columns( |
11
|
|
|
|
|
|
|
'orderitem_id', |
12
|
|
|
|
|
|
|
{data_type => 'integer', is_auto_increment => 1, is_nullable => 0}, |
13
|
|
|
|
|
|
|
'order_id', |
14
|
|
|
|
|
|
|
{data_type => 'integer', is_nullable => 0, is_foreign_key => 1}, |
15
|
|
|
|
|
|
|
'line_item_id', |
16
|
|
|
|
|
|
|
{data_type => 'integer', is_nullable => 0}, |
17
|
|
|
|
|
|
|
'article_id', |
18
|
|
|
|
|
|
|
{data_type => 'integer', is_nullable => 0, is_foreign_key => 1}, |
19
|
|
|
|
|
|
|
'quantity', |
20
|
|
|
|
|
|
|
{ |
21
|
|
|
|
|
|
|
data_type => 'decimal', |
22
|
|
|
|
|
|
|
default_value => '1.00', |
23
|
|
|
|
|
|
|
is_nullable => 0, |
24
|
|
|
|
|
|
|
size => [10, 2], |
25
|
|
|
|
|
|
|
}, |
26
|
|
|
|
|
|
|
'unit_id', |
27
|
|
|
|
|
|
|
{ |
28
|
|
|
|
|
|
|
data_type => 'integer', |
29
|
|
|
|
|
|
|
default_value => 1, |
30
|
|
|
|
|
|
|
is_nullable => 0, |
31
|
|
|
|
|
|
|
is_foreign_key => 1 |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
'article_price', |
34
|
|
|
|
|
|
|
{ |
35
|
|
|
|
|
|
|
data_type => 'decimal', |
36
|
|
|
|
|
|
|
default_value => '0.00', |
37
|
|
|
|
|
|
|
is_nullable => 0, |
38
|
|
|
|
|
|
|
size => [10, 2], |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
'delivery_date', |
41
|
|
|
|
|
|
|
{ |
42
|
|
|
|
|
|
|
data_type => 'date', |
43
|
|
|
|
|
|
|
datetime_undef_if_invalid => 1, |
44
|
|
|
|
|
|
|
default_value => '1900-01-01', |
45
|
|
|
|
|
|
|
is_nullable => 0, |
46
|
|
|
|
|
|
|
}, |
47
|
|
|
|
|
|
|
'partial_shipment_allowed', |
48
|
|
|
|
|
|
|
{data_type => 'varchar', default_value => '', is_nullable => 0, size => 255}, |
49
|
|
|
|
|
|
|
'transport', |
50
|
|
|
|
|
|
|
{data_type => 'varchar', default_value => '', is_nullable => 0, size => 255}, |
51
|
|
|
|
|
|
|
'remark', |
52
|
|
|
|
|
|
|
{data_type => 'varchar', default_value => '', is_nullable => 0, size => 255}, |
53
|
|
|
|
|
|
|
); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__PACKAGE__->set_primary_key('orderitem_id'); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__PACKAGE__->belongs_to('order', 'AproJo::DB::Schema::Result::Order', |
58
|
|
|
|
|
|
|
'order_id'); |
59
|
|
|
|
|
|
|
__PACKAGE__->belongs_to('article', 'AproJo::DB::Schema::Result::Article', |
60
|
|
|
|
|
|
|
'article_id'); |
61
|
|
|
|
|
|
|
__PACKAGE__->belongs_to('unit', 'AproJo::DB::Schema::Result::Unit', 'unit_id'); |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |