lib/Test2/Harness/UI/Schema/MySQL/ApiKey.pm

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 29 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Test2/Harness/UI/Schema/Result/User.pm ↑ Summary lib/Test2/Harness/UI/Schema/MySQL/Binary.pm »
1 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package Test2::Harness::UI::Schema::Result::ApiKey;
3  
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY ANY PART OF THIS FILE
6  
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use base 'Test2::Harness::UI::Schema::ResultBase';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 __PACKAGE__->load_components(
12 "InflateColumn::DateTime",
13 "InflateColumn::Serializer",
14 "InflateColumn::Serializer::JSON",
15 "Tree::AdjacencyList",
16 "UUIDColumns",
17 );
18 1 __PACKAGE__->table("api_keys");
19 1 __PACKAGE__->add_columns(
20 "api_key_id",
21 { data_type => "binary", is_nullable => 0, size => 16 },
22 "user_id",
23 { data_type => "binary", is_foreign_key => 1, is_nullable => 0, size => 16 },
24 "name",
25 { data_type => "varchar", is_nullable => 0, size => 128 },
26 "value",
27 { data_type => "varchar", is_nullable => 0, size => 16 },
28 "status",
29 {
30 data_type => "enum",
31 extra => { list => ["active", "disabled", "revoked"] },
32 is_nullable => 0,
33 },
34 );
35 1 __PACKAGE__->set_primary_key("api_key_id");
36 1 __PACKAGE__->add_unique_constraint("value", ["value"]);
37 1 __PACKAGE__->belongs_to(
38 "user",
39 "Test2::Harness::UI::Schema::Result::User",
40 { user_id => "user_id" },
41 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
42 );
43  
44  
45 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-02 16:05:14
46 1 ▶use Test2::Harness::UI::UUID qw/uuid_inflate uuid_deflate/;
Subroutine BEGIN: called CC=1 SCAR=0.0
47 1 __PACKAGE__->inflate_column('api_key_id' => { inflate => \&uuid_inflate, deflate => \&uuid_deflate });
48 1 __PACKAGE__->inflate_column('user_id' => { inflate => \&uuid_inflate, deflate => \&uuid_deflate });
49 # DO NOT MODIFY ANY PART OF THIS FILE
50  
51 1 1;
« lib/Test2/Harness/UI/Schema/Result/User.pm ↑ Summary lib/Test2/Harness/UI/Schema/MySQL/Binary.pm »