AproJo/DB/Schema/Result/Orderitem.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« AproJo/DB/Schema/Result/Order.pm ↑ Summary AproJo/DB/Schema/Result/Party.pm »
1 package AproJo::DB::Schema::Result::Orderitem;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use base 'DBIx::Class::Core';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 __PACKAGE__->table('orderitems');
9  
10 2 __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 2 __PACKAGE__->set_primary_key('orderitem_id');
56  
57 2 __PACKAGE__->belongs_to('order', 'AproJo::DB::Schema::Result::Order',
58 'order_id');
59 2 __PACKAGE__->belongs_to('article', 'AproJo::DB::Schema::Result::Article',
60 'article_id');
61 2 __PACKAGE__->belongs_to('unit', 'AproJo::DB::Schema::Result::Unit', 'unit_id');
62  
63 2 1;
« AproJo/DB/Schema/Result/Order.pm ↑ Summary AproJo/DB/Schema/Result/Party.pm »