1use utf8;
2package Test2::Harness::UI::Schema::Result::ApiKey;
3
4# Created by DBIx::Class::Schema::Loader
5# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7use strict;
8use warnings;
9
10use base 'DBIx::Class::Core';
11__PACKAGE__->load_components(
12  "InflateColumn::DateTime",
13  "InflateColumn::Serializer",
14  "InflateColumn::Serializer::JSON",
15  "Tree::AdjacencyList",
16  "UUIDColumns",
17);
18__PACKAGE__->table("api_keys");
19__PACKAGE__->add_columns(
20  "api_key_id",
21  { data_type => "char", is_nullable => 0, size => 36 },
22  "user_id",
23  { data_type => "char", is_foreign_key => 1, is_nullable => 0, size => 36 },
24  "name",
25  { data_type => "varchar", is_nullable => 0, size => 128 },
26  "value",
27  { data_type => "varchar", is_nullable => 0, size => 36 },
28  "status",
29  {
30    data_type => "enum",
31    extra => { list => ["active", "disabled", "revoked"] },
32    is_nullable => 0,
33  },
34);
35__PACKAGE__->set_primary_key("api_key_id");
36__PACKAGE__->add_unique_constraint("value", ["value"]);
37__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 @ 2021-10-26 13:48:31
46# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:y2/U/Yp7/kVrgDMWyIfkQg
47
48
49# You can replace this text with custom code or comments, and it will be preserved on regeneration
501;
51