Schema/Result/NavigationProduct.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Schema/Result/NavigationMessage.pm ↑ Summary Schema/Result/OrderComment.pm »
1 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package Interchange6::Schema::Result::NavigationProduct;
4  
5 =head1 NAME
6  
7 Interchange6::Schema::Result::NavigationProduct
8  
9 =cut
10  
11 2 ▶use Interchange6::Schema::Candy;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 =head1 ACCESSORS
14  
15 =head2 sku
16  
17 Foreign constraint on L<Interchange6::Schema::Result::Product/sku>
18 via L</product> relationship.
19  
20 =cut
21  
22 2 column sku =>
23 { data_type => "varchar", size => 64 };
24  
25 =head2 navigation_id
26  
27 Foreign constraint on L<Interchange6::Schema::Result::Navigation/navigation_id>
28 via L</navigation> relationship.
29  
30 =cut
31  
32 2 column navigation_id =>
33 { data_type => "integer" };
34  
35 =head2 type
36  
37 Can be used to cache the value held in
38 L<Interchange6::Schema::Result::Navigation/type> though usually ignored.
39  
40 Column is nullable.
41  
42 =cut
43  
44 2 column type =>
45 { data_type => "varchar", is_nullable => 1, size => 16 };
46  
47 =head2 priority
48  
49 Priority (higher number is higher priority) is used to define which category
50 (or other L<Interchange6::Schema::Result::Navigation/type>) should be used
51 when constructing L<Interchange6::Schema::Result::Product/path>.
52  
53 Default is 0.
54  
55 =cut
56  
57 2 column priority => { data_type => "integer", default_value => 0 };
58  
59 =head1 PRIMARY KEY
60  
61 =over 4
62  
63 =item * L</sku>
64  
65 =item * L</navigation_id>
66  
67 =back
68  
69 =cut
70  
71 2 primary_key "sku", "navigation_id";
72  
73 =head1 RELATIONS
74  
75 =head2 navigation
76  
77 Type: belongs_to
78  
79 Related object: L<Interchange6::Schema::Result::Navigation>
80  
81 =cut
82  
83 2 belongs_to
84 navigation => "Interchange6::Schema::Result::Navigation",
85 "navigation_id",
86 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" };
87  
88 =head2 product
89  
90 Type: belongs_to
91  
92 Related object: L<Interchange6::Schema::Result::Product>
93  
94 =cut
95  
96 2 belongs_to
97 product => "Interchange6::Schema::Result::Product",
98 "sku",
99 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" };
100  
101 2 1;
« Schema/Result/NavigationMessage.pm ↑ Summary Schema/Result/OrderComment.pm »