Bug 17216: DBIC Schema changes
[koha.git] / Koha / Schema / Result / ItemsSearchField.pm
1 use utf8;
2 package Koha::Schema::Result::ItemsSearchField;
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::ItemsSearchField
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<items_search_fields>
19
20 =cut
21
22 __PACKAGE__->table("items_search_fields");
23
24 =head1 ACCESSORS
25
26 =head2 name
27
28   data_type: 'varchar'
29   is_nullable: 0
30   size: 255
31
32 =head2 label
33
34   data_type: 'varchar'
35   is_nullable: 0
36   size: 255
37
38 =head2 tagfield
39
40   data_type: 'char'
41   is_nullable: 0
42   size: 3
43
44 =head2 tagsubfield
45
46   data_type: 'char'
47   is_nullable: 1
48   size: 1
49
50 =head2 authorised_values_category
51
52   data_type: 'varchar'
53   is_foreign_key: 1
54   is_nullable: 1
55   size: 80
56
57 =cut
58
59 __PACKAGE__->add_columns(
60   "name",
61   { data_type => "varchar", is_nullable => 0, size => 255 },
62   "label",
63   { data_type => "varchar", is_nullable => 0, size => 255 },
64   "tagfield",
65   { data_type => "char", is_nullable => 0, size => 3 },
66   "tagsubfield",
67   { data_type => "char", is_nullable => 1, size => 1 },
68   "authorised_values_category",
69   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
70 );
71
72 =head1 PRIMARY KEY
73
74 =over 4
75
76 =item * L</name>
77
78 =back
79
80 =cut
81
82 __PACKAGE__->set_primary_key("name");
83
84 =head1 RELATIONS
85
86 =head2 authorised_values_category
87
88 Type: belongs_to
89
90 Related object: L<Koha::Schema::Result::AuthorisedValueCategory>
91
92 =cut
93
94 __PACKAGE__->belongs_to(
95   "authorised_values_category",
96   "Koha::Schema::Result::AuthorisedValueCategory",
97   { category_name => "authorised_values_category" },
98   {
99     is_deferrable => 1,
100     join_type     => "LEFT",
101     on_delete     => "SET NULL",
102     on_update     => "CASCADE",
103   },
104 );
105
106
107 # Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-08-29 11:50:45
108 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5iB4gfxlZLHw2fqwoK/Wtg
109
110
111 # You can replace this text with custom code or comments, and it will be preserved on regeneration
112 1;