File Coverage

blib/lib/Biblio/Zotero/DB/Schema/Result/ItemTypeField.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   11387 use utf8;
  13         32  
  13         95  
2             package Biblio::Zotero::DB::Schema::Result::ItemTypeField;
3             $Biblio::Zotero::DB::Schema::Result::ItemTypeField::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   688 use strict;
  13         27  
  13         403  
9 13     13   68 use warnings;
  13         30  
  13         369  
10              
11 13     13   69 use base 'DBIx::Class::Core';
  13         24  
  13         3219  
12              
13              
14             __PACKAGE__->table("itemTypeFields");
15              
16              
17             __PACKAGE__->add_columns(
18             "itemtypeid",
19             { data_type => "int", is_foreign_key => 1, is_nullable => 0 },
20             "fieldid",
21             { data_type => "int", is_foreign_key => 1, is_nullable => 1 },
22             "hide",
23             { data_type => "int", is_nullable => 1 },
24             "orderindex",
25             { data_type => "int", is_nullable => 0 },
26             );
27              
28              
29             __PACKAGE__->set_primary_key("itemtypeid", "orderindex");
30              
31              
32             __PACKAGE__->add_unique_constraint("itemtypeid_fieldid_unique", ["itemtypeid", "fieldid"]);
33              
34              
35             __PACKAGE__->belongs_to(
36             "fieldid",
37             "Biblio::Zotero::DB::Schema::Result::Field",
38             { fieldid => "fieldid" },
39             {
40             is_deferrable => 0,
41             join_type => "LEFT",
42             on_delete => "NO ACTION",
43             on_update => "NO ACTION",
44             },
45             );
46              
47              
48             __PACKAGE__->belongs_to(
49             "itemtypeid",
50             "Biblio::Zotero::DB::Schema::Result::ItemType",
51             { itemtypeid => "itemtypeid" },
52             { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
53             );
54              
55              
56             # Created by DBIx::Class::Schema::Loader v0.07035 @ 2013-07-02 23:02:38
57             # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ll2i1+6bR2ZFBomvgzNn2g
58              
59              
60             # You can replace this text with custom code or comments, and it will be preserved on regeneration
61             1;
62              
63             __END__