« lib/Test2/Harness/UI/Schema/MySQL/RunField.pm
↑ Summary
lib/Test2/Harness/UI/Schema/MySQL/SessionHost.pm »
| 1 | 1 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | package Test2::Harness::UI::Schema::Result::Session; | ||
| 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("sessions"); | |
| 19 | 1 | __PACKAGE__->add_columns( | |
| 20 | "session_id", | ||
| 21 | { data_type => "binary", is_nullable => 0, size => 16 }, | ||
| 22 | "active", | ||
| 23 | { data_type => "tinyint", default_value => 1, is_nullable => 1 }, | ||
| 24 | ); | ||
| 25 | 1 | __PACKAGE__->set_primary_key("session_id"); | |
| 26 | 1 | __PACKAGE__->has_many( | |
| 27 | "session_hosts", | ||
| 28 | "Test2::Harness::UI::Schema::Result::SessionHost", | ||
| 29 | { "foreign.session_id" => "self.session_id" }, | ||
| 30 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 31 | ); | ||
| 32 | |||
| 33 | |||
| 34 | # Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-02 16:05:14 | ||
| 35 | 1 | ▶ | use Test2::Harness::UI::UUID qw/uuid_inflate uuid_deflate/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 36 | 1 | __PACKAGE__->inflate_column('session_id' => { inflate => \&uuid_inflate, deflate => \&uuid_deflate }); | |
| 37 | # DO NOT MODIFY ANY PART OF THIS FILE | ||
| 38 | |||
| 39 | 1 | 1; | |