2 package Koha::Schema::Result::ApiKey;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::ApiKey
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<api_keys>
22 __PACKAGE__->table("api_keys");
58 __PACKAGE__->add_columns(
60 { data_type => "varchar", is_nullable => 0, size => 191 },
62 { data_type => "varchar", is_nullable => 0, size => 191 },
64 { data_type => "varchar", is_nullable => 0, size => 255 },
66 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
68 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
81 __PACKAGE__->set_primary_key("client_id");
83 =head1 UNIQUE CONSTRAINTS
95 __PACKAGE__->add_unique_constraint("secret", ["secret"]);
103 Related object: L<Koha::Schema::Result::Borrower>
107 __PACKAGE__->belongs_to(
109 "Koha::Schema::Result::Borrower",
110 { borrowernumber => "patron_id" },
111 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
115 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-04-14 14:48:10
116 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qnu4QSACpOSQaZgd52ozmw
118 __PACKAGE__->add_columns(
119 '+active' => { is_boolean => 1 }
122 # You can replace this text with custom code or comments, and it will be preserved on regeneration