Preferences/Schema/Result/CustomDataUniqueValues.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 21 / 21 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Preferences.pm ↑ Summary Preferences/Schema/Result/PrfDefaultValues.pm »
1 package OpusVL::Preferences::Schema::Result::CustomDataUniqueValues;
2  
3 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use MooseX::NonMoose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 extends 'DBIx::Class::Core';
7  
8 1 __PACKAGE__->table("prf_unique_vals");
9 1 __PACKAGE__->add_columns
10 (
11 id => {
12 data_type => 'int',
13 is_auto_increment => 1,
14 },
15 value_id => {
16 data_type => 'integer',
17 is_nullable => 0,
18 },
19 value => {
20 data_type => 'text',
21 is_nullable => 1,
22 },
23 prf_owner_type_id =>
24 {
25 data_type => "integer",
26 is_nullable => 0,
27 },
28 name =>
29 {
30 data_type => 'varchar',
31 is_nullable => 0
32 },
33 );
34  
35 1 __PACKAGE__->set_primary_key("id");
36  
37 1 __PACKAGE__->add_unique_constraint([ qw/value_id prf_owner_type_id name/ ]);
38 1 __PACKAGE__->add_unique_constraint([ qw/value prf_owner_type_id name/ ]);
39  
40 1 __PACKAGE__->belongs_to(field =>
41 "OpusVL::Preferences::Schema::Result::PrfDefault",
42 {
43 "foreign.prf_owner_type_id" => "self.prf_owner_type_id",
44 "foreign.name" => "self.name",
45 });
46  
47 1 __PACKAGE__->belongs_to(parent_value =>
48 "OpusVL::Preferences::Schema::Result::PrfPreference",
49 {
50 "foreign.prf_owner_type_id" => "self.prf_owner_type_id",
51 "foreign.name" => "self.name",
52 "foreign.prf_preference_id" => "self.value_id"
53 });
54  
55  
56 1 1;
57  
58 =head1 DESCRIPTION
59  
60 I thought this was obvious until I realised it has a 'name' column and now I
61 have no idea what it does.
62  
63 =head1 METHODS
64  
65 =head1 ATTRIBUTES
66  
67 =head2 id
68  
69 =head2 value_id
70  
71 =head2 value
72  
73 =head2 field_id
74  
75 =head2 field
76  
77 =head2 parent_value
78  
79  
80 =head1 LICENSE AND COPYRIGHT
81  
82 Copyright 2013 OpusVL.
83  
84 This software is licensed according to the "IP Assignment Schedule" provided with the development project.
85  
86 =cut
« Preferences.pm ↑ Summary Preferences/Schema/Result/PrfDefaultValues.pm »