« lib/Test2/Harness/UI/Schema/PostgreSQL/Session.pm
↑ Summary
lib/Test2/Harness/UI/Schema/PostgreSQL/SourceFile.pm »
| 1 | 1 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | package Test2::Harness::UI::Schema::Result::SessionHost; | ||
| 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("session_hosts"); | |
| 19 | 1 | __PACKAGE__->add_columns( | |
| 20 | "session_host_id", | ||
| 21 | { | ||
| 22 | data_type => "uuid", | ||
| 23 | default_value => \"uuid_generate_v4()", | ||
| 24 | is_nullable => 0, | ||
| 25 | size => 16, | ||
| 26 | }, | ||
| 27 | "session_id", | ||
| 28 | { data_type => "uuid", is_foreign_key => 1, is_nullable => 0, size => 16 }, | ||
| 29 | "user_id", | ||
| 30 | { data_type => "uuid", is_foreign_key => 1, is_nullable => 1, size => 16 }, | ||
| 31 | "created", | ||
| 32 | { | ||
| 33 | data_type => "timestamp", | ||
| 34 | default_value => \"current_timestamp", | ||
| 35 | is_nullable => 0, | ||
| 36 | original => { default_value => \"now()" }, | ||
| 37 | }, | ||
| 38 | "accessed", | ||
| 39 | { | ||
| 40 | data_type => "timestamp", | ||
| 41 | default_value => \"current_timestamp", | ||
| 42 | is_nullable => 0, | ||
| 43 | original => { default_value => \"now()" }, | ||
| 44 | }, | ||
| 45 | "address", | ||
| 46 | { data_type => "text", is_nullable => 0 }, | ||
| 47 | "agent", | ||
| 48 | { data_type => "text", is_nullable => 0 }, | ||
| 49 | ); | ||
| 50 | 1 | __PACKAGE__->set_primary_key("session_host_id"); | |
| 51 | 1 | __PACKAGE__->add_unique_constraint( | |
| 52 | "session_hosts_session_id_address_agent_key", | ||
| 53 | ["session_id", "address", "agent"], | ||
| 54 | ); | ||
| 55 | 1 | __PACKAGE__->belongs_to( | |
| 56 | "session", | ||
| 57 | "Test2::Harness::UI::Schema::Result::Session", | ||
| 58 | { session_id => "session_id" }, | ||
| 59 | { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, | ||
| 60 | ); | ||
| 61 | 1 | __PACKAGE__->belongs_to( | |
| 62 | "user", | ||
| 63 | "Test2::Harness::UI::Schema::Result::User", | ||
| 64 | { user_id => "user_id" }, | ||
| 65 | { | ||
| 66 | is_deferrable => 0, | ||
| 67 | join_type => "LEFT", | ||
| 68 | on_delete => "NO ACTION", | ||
| 69 | on_update => "NO ACTION", | ||
| 70 | }, | ||
| 71 | ); | ||
| 72 | |||
| 73 | |||
| 74 | # Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-02 16:05:20 | ||
| 75 | # DO NOT MODIFY ANY PART OF THIS FILE | ||
| 76 | |||
| 77 | 1 | 1; | |