File Coverage

blib/lib/OpusVL/Preferences/Schema/Result/PrfPreference.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1              
2             package OpusVL::Preferences::Schema::Result::PrfPreference;
3              
4 1     1   2072 use strict;
  1         3  
  1         28  
5 1     1   4 use warnings;
  1         3  
  1         23  
6 1     1   4 use Moose;
  1         2  
  1         8  
7 1     1   5741 use MooseX::NonMoose;
  1         2  
  1         6  
8 1     1   4533 use namespace::autoclean;
  1         2  
  1         9  
9              
10             extends 'DBIx::Class::Core';
11              
12             __PACKAGE__->table("prf_preferences");
13              
14             __PACKAGE__->add_columns
15             (
16             prf_preference_id =>
17             {
18             data_type => "integer",
19             is_nullable => 0,
20             is_auto_increment => 1
21             },
22              
23             prf_owner_id =>
24             {
25             data_type => 'integer',
26             is_nullable => 0
27             },
28              
29             prf_owner_type_id =>
30             {
31             data_type => "integer",
32             is_nullable => 0,
33             },
34              
35             name =>
36             {
37             data_type => 'varchar',
38             is_nullable => 0
39             },
40              
41             value =>
42             {
43             data_type => 'varchar',
44             is_nullable => 1
45             },
46             );
47              
48             __PACKAGE__->set_primary_key("prf_preference_id");
49              
50             __PACKAGE__->add_unique_constraint([ qw/prf_preference_id prf_owner_type_id name/ ]);
51              
52             __PACKAGE__->belongs_to
53             (
54             prf_owner => 'OpusVL::Preferences::Schema::Result::PrfOwner',
55             {
56             'foreign.prf_owner_id' => 'self.prf_owner_id',
57             'foreign.prf_owner_type_id' => 'self.prf_owner_type_id'
58             }
59             );
60              
61             __PACKAGE__->might_have(unique_value =>
62             "OpusVL::Preferences::Schema::Result::CustomDataUniqueValues",
63             {
64             "foreign.prf_owner_type_id" => "self.prf_owner_type_id",
65             "foreign.name" => "self.name",
66             "foreign.value_id" => "self.prf_preference_id"
67             },
68             { is_foreign_key_constraint => 0, cascade_delete => 1 });
69              
70              
71             return 1;
72              
73             __END__
74              
75             =pod
76              
77             =encoding UTF-8
78              
79             =head1 NAME
80              
81             OpusVL::Preferences::Schema::Result::PrfPreference
82              
83             =head1 VERSION
84              
85             version 0.27
86              
87             =head1 DESCRIPTION
88              
89             =head1 METHODS
90              
91             =head1 ATTRIBUTES
92              
93             =head2 prf_owner
94              
95             =head2 prf_preference_id
96              
97             =head2 prf_owner_id
98              
99             =head2 prf_owner_type_id
100              
101             =head2 name
102              
103             =head2 value
104              
105             =head1 LICENSE AND COPYRIGHT
106              
107             Copyright 2012 OpusVL.
108              
109             This software is licensed according to the "IP Assignment Schedule" provided with the development project.
110              
111             =head1 AUTHOR
112              
113             OpusVL - www.opusvl.com
114              
115             =head1 COPYRIGHT AND LICENSE
116              
117             This software is copyright (c) 2011 by OpusVL - www.opusvl.com.
118              
119             This is free software; you can redistribute it and/or modify it under
120             the same terms as the Perl 5 programming language system itself.
121              
122             =cut