File Coverage

blib/lib/Biblio/Zotero/DB/Schema/Result/Creator.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1 13     13   11600 use utf8;
  13         35  
  13         109  
2             package Biblio::Zotero::DB::Schema::Result::Creator;
3             $Biblio::Zotero::DB::Schema::Result::Creator::VERSION = '0.003';
4             # Created by DBIx::Class::Schema::Loader
5             # DO NOT MODIFY THE FIRST PART OF THIS FILE
6              
7              
8 13     13   738 use strict;
  13         32  
  13         445  
9 13     13   74 use warnings;
  13         27  
  13         477  
10              
11 13     13   67 use base 'DBIx::Class::Core';
  13         27  
  13         5056  
12              
13              
14             __PACKAGE__->table("creators");
15              
16              
17             __PACKAGE__->add_columns(
18             "creatorid",
19             { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
20             "creatordataid",
21             { data_type => "int", is_foreign_key => 1, is_nullable => 0 },
22             "dateadded",
23             {
24             data_type => "timestamp",
25             default_value => \"current_timestamp",
26             is_nullable => 0,
27             },
28             "datemodified",
29             {
30             data_type => "timestamp",
31             default_value => \"current_timestamp",
32             is_nullable => 0,
33             },
34             "clientdatemodified",
35             {
36             data_type => "timestamp",
37             default_value => \"current_timestamp",
38             is_nullable => 0,
39             },
40             "libraryid",
41             { data_type => "int", is_nullable => 1 },
42             "key",
43             { data_type => "text", is_nullable => 0 },
44             );
45              
46              
47             __PACKAGE__->set_primary_key("creatorid");
48              
49              
50             __PACKAGE__->add_unique_constraint("libraryid_key_unique", ["libraryid", "key"]);
51              
52              
53             __PACKAGE__->belongs_to(
54             "creatordataid",
55             "Biblio::Zotero::DB::Schema::Result::CreatorData",
56             { creatordataid => "creatordataid" },
57             { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
58             );
59              
60              
61             __PACKAGE__->has_many(
62             "item_creators",
63             "Biblio::Zotero::DB::Schema::Result::ItemCreator",
64             { "foreign.creatorid" => "self.creatorid" },
65             { cascade_copy => 0, cascade_delete => 0 },
66             );
67              
68              
69             # Created by DBIx::Class::Schema::Loader v0.07035 @ 2013-07-02 23:02:38
70             # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mwOJUSAgJ5GdL3mOqvtqKw
71              
72              
73             # You can replace this text with custom code or comments, and it will be preserved on regeneration
74             1;
75              
76             __END__