Schema/Result/MediaProduct.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Schema/Result/MediaDisplay.pm ↑ Summary Schema/Result/MediaType.pm »
1 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package Interchange6::Schema::Result::MediaProduct;
4  
5 =head1 NAME
6  
7 Interchange6::Schema::Result::MediaProduct
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 media_id
16  
17 FK on L<Interchange6::Schema::Result::Media/media_id>.
18 =cut
19  
20 2 column media_id =>
21 { data_type => "integer", is_foreign_key => 1 };
22  
23 =head2 sku
24  
25 FK on L<Interchange6::Schema::Result::Product/sku>.
26  
27 =cut
28  
29 2 column sku =>
30 { data_type => "varchar", is_foreign_key => 1, size => 64 };
31  
32 =head1 PRIMARY KEY
33  
34 =over 4
35  
36 =item * L</media_id>
37  
38 =item * L</sku>
39  
40 =back
41  
42 =cut
43  
44 2 primary_key "media_id", "sku";
45  
46 =head1 RELATIONS
47  
48 =head2 media
49  
50 Type: belongs_to
51  
52 Related object: L<Interchange6::Schema::Result::Media>
53  
54 =cut
55  
56 2 belongs_to
57 media => "Interchange6::Schema::Result::Media",
58 "media_id",
59 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" };
60  
61 =head2 product
62  
63 Type: belongs_to
64  
65 Related object: L<Interchange6::Schema::Result::Product>
66  
67 =cut
68  
69 2 belongs_to
70 product => "Interchange6::Schema::Result::Product",
71 "sku",
72 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" };
73  
74 2 1;
« Schema/Result/MediaDisplay.pm ↑ Summary Schema/Result/MediaType.pm »