Bug 12461 - Add patron clubs feature
[koha.git] / Koha / Schema / Result / AuthorisedValue.pm
index 3e71f33..7b978eb 100644 (file)
@@ -1,17 +1,21 @@
+use utf8;
 package Koha::Schema::Result::AuthorisedValue;
 
 # Created by DBIx::Class::Schema::Loader
 # DO NOT MODIFY THE FIRST PART OF THIS FILE
 
+=head1 NAME
+
+Koha::Schema::Result::AuthorisedValue
+
+=cut
+
 use strict;
 use warnings;
 
 use base 'DBIx::Class::Core';
 
-
-=head1 NAME
-
-Koha::Schema::Result::AuthorisedValue
+=head1 TABLE: C<authorised_values>
 
 =cut
 
@@ -29,8 +33,9 @@ __PACKAGE__->table("authorised_values");
 
   data_type: 'varchar'
   default_value: (empty string)
+  is_foreign_key: 1
   is_nullable: 0
-  size: 16
+  size: 32
 
 =head2 authorised_value
 
@@ -63,7 +68,13 @@ __PACKAGE__->add_columns(
   "id",
   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
   "category",
-  { data_type => "varchar", default_value => "", is_nullable => 0, size => 16 },
+  {
+    data_type => "varchar",
+    default_value => "",
+    is_foreign_key => 1,
+    is_nullable => 0,
+    size => 32,
+  },
   "authorised_value",
   { data_type => "varchar", default_value => "", is_nullable => 0, size => 80 },
   "lib",
@@ -73,6 +84,17 @@ __PACKAGE__->add_columns(
   "imageurl",
   { data_type => "varchar", is_nullable => 1, size => 200 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</id>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("id");
 
 =head1 RELATIONS
@@ -92,10 +114,25 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 category
+
+Type: belongs_to
+
+Related object: L<Koha::Schema::Result::AuthorisedValueCategory>
+
+=cut
+
+__PACKAGE__->belongs_to(
+  "category",
+  "Koha::Schema::Result::AuthorisedValueCategory",
+  { category_name => "category" },
+  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
+);
+
 
-# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UQnP1vJKTnc7KwuTT20Orw
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-04-26 16:13:07
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YwvGOd/jzk71ekWfO56xrw
 
 
-# You can replace this text with custom content, and it will be preserved on regeneration
+# You can replace this text with custom code or comments, and it will be preserved on regeneration
 1;