"Fossies" - the Fresh Open Source Software Archive

Member "koha-19.11.15/Koha/Schema/Result/ApiKey.pm" (23 Feb 2021, 1983 Bytes) of package /linux/misc/koha-19.11.15.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ApiKey.pm" see the Fossies "Dox" file reference documentation.

    1 use utf8;
    2 package Koha::Schema::Result::ApiKey;
    3 
    4 # Created by DBIx::Class::Schema::Loader
    5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
    6 
    7 =head1 NAME
    8 
    9 Koha::Schema::Result::ApiKey
   10 
   11 =cut
   12 
   13 use strict;
   14 use warnings;
   15 
   16 use base 'DBIx::Class::Core';
   17 
   18 =head1 TABLE: C<api_keys>
   19 
   20 =cut
   21 
   22 __PACKAGE__->table("api_keys");
   23 
   24 =head1 ACCESSORS
   25 
   26 =head2 client_id
   27 
   28   data_type: 'varchar'
   29   is_nullable: 0
   30   size: 191
   31 
   32 =head2 secret
   33 
   34   data_type: 'varchar'
   35   is_nullable: 0
   36   size: 191
   37 
   38 =head2 description
   39 
   40   data_type: 'varchar'
   41   is_nullable: 0
   42   size: 255
   43 
   44 =head2 patron_id
   45 
   46   data_type: 'integer'
   47   is_foreign_key: 1
   48   is_nullable: 0
   49 
   50 =head2 active
   51 
   52   data_type: 'tinyint'
   53   default_value: 1
   54   is_nullable: 0
   55 
   56 =cut
   57 
   58 __PACKAGE__->add_columns(
   59   "client_id",
   60   { data_type => "varchar", is_nullable => 0, size => 191 },
   61   "secret",
   62   { data_type => "varchar", is_nullable => 0, size => 191 },
   63   "description",
   64   { data_type => "varchar", is_nullable => 0, size => 255 },
   65   "patron_id",
   66   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
   67   "active",
   68   { data_type => "tinyint", default_value => 1, is_nullable => 0 },
   69 );
   70 
   71 =head1 PRIMARY KEY
   72 
   73 =over 4
   74 
   75 =item * L</client_id>
   76 
   77 =back
   78 
   79 =cut
   80 
   81 __PACKAGE__->set_primary_key("client_id");
   82 
   83 =head1 UNIQUE CONSTRAINTS
   84 
   85 =head2 C<secret>
   86 
   87 =over 4
   88 
   89 =item * L</secret>
   90 
   91 =back
   92 
   93 =cut
   94 
   95 __PACKAGE__->add_unique_constraint("secret", ["secret"]);
   96 
   97 =head1 RELATIONS
   98 
   99 =head2 patron
  100 
  101 Type: belongs_to
  102 
  103 Related object: L<Koha::Schema::Result::Borrower>
  104 
  105 =cut
  106 
  107 __PACKAGE__->belongs_to(
  108   "patron",
  109   "Koha::Schema::Result::Borrower",
  110   { borrowernumber => "patron_id" },
  111   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
  112 );
  113 
  114 
  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
  117 
  118 __PACKAGE__->add_columns(
  119     '+active' => { is_boolean => 1 }
  120 );
  121 
  122 # You can replace this text with custom code or comments, and it will be preserved on regeneration
  123 1;