Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / SearchField.pm
1 use utf8;
2 package Koha::Schema::Result::SearchField;
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::SearchField
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<search_field>
19
20 =cut
21
22 __PACKAGE__->table("search_field");
23
24 =head1 ACCESSORS
25
26 =head2 id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 name
33
34   data_type: 'varchar'
35   is_nullable: 0
36   size: 255
37
38 the name of the field as it will be stored in the search engine
39
40 =head2 label
41
42   data_type: 'varchar'
43   is_nullable: 0
44   size: 255
45
46 the human readable name of the field, for display
47
48 =head2 type
49
50   data_type: 'enum'
51   extra: {list => ["","string","date","number","boolean","sum","isbn","stdno","year","callnumber"]}
52   is_nullable: 0
53
54 what type of data this holds, relevant when storing it in the search engine
55
56 =head2 weight
57
58   data_type: 'decimal'
59   is_nullable: 1
60   size: [5,2]
61
62 =head2 facet_order
63
64   data_type: 'tinyint'
65   is_nullable: 1
66
67 the order place of the field in facet list if faceted
68
69 =head2 staff_client
70
71   data_type: 'tinyint'
72   default_value: 1
73   is_nullable: 0
74
75 =head2 opac
76
77   data_type: 'tinyint'
78   default_value: 1
79   is_nullable: 0
80
81 =head2 mandatory
82
83   data_type: 'tinyint'
84   is_nullable: 1
85
86 if marked this field is not editable or removable
87
88 =cut
89
90 __PACKAGE__->add_columns(
91   "id",
92   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
93   "name",
94   { data_type => "varchar", is_nullable => 0, size => 255 },
95   "label",
96   { data_type => "varchar", is_nullable => 0, size => 255 },
97   "type",
98   {
99     data_type => "enum",
100     extra => {
101       list => [
102         "",
103         "string",
104         "date",
105         "number",
106         "boolean",
107         "sum",
108         "isbn",
109         "stdno",
110         "year",
111         "callnumber",
112       ],
113     },
114     is_nullable => 0,
115   },
116   "weight",
117   { data_type => "decimal", is_nullable => 1, size => [5, 2] },
118   "facet_order",
119   { data_type => "tinyint", is_nullable => 1 },
120   "staff_client",
121   { data_type => "tinyint", default_value => 1, is_nullable => 0 },
122   "opac",
123   { data_type => "tinyint", default_value => 1, is_nullable => 0 },
124   "mandatory",
125   { data_type => "tinyint", is_nullable => 1 },
126 );
127
128 =head1 PRIMARY KEY
129
130 =over 4
131
132 =item * L</id>
133
134 =back
135
136 =cut
137
138 __PACKAGE__->set_primary_key("id");
139
140 =head1 UNIQUE CONSTRAINTS
141
142 =head2 C<name>
143
144 =over 4
145
146 =item * L</name>
147
148 =back
149
150 =cut
151
152 __PACKAGE__->add_unique_constraint("name", ["name"]);
153
154 =head1 RELATIONS
155
156 =head2 search_marc_to_fields
157
158 Type: has_many
159
160 Related object: L<Koha::Schema::Result::SearchMarcToField>
161
162 =cut
163
164 __PACKAGE__->has_many(
165   "search_marc_to_fields",
166   "Koha::Schema::Result::SearchMarcToField",
167   { "foreign.search_field_id" => "self.id" },
168   { cascade_copy => 0, cascade_delete => 0 },
169 );
170
171
172 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-07-18 15:10:43
173 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uk5JsfPJo0XVvGfMfJg3cg
174
175 __PACKAGE__->add_columns(
176     '+mandatory' => { is_boolean => 1 },
177 );
178
179 __PACKAGE__->many_to_many("search_marc_maps", "search_marc_to_fields", "search_marc_map");
180
181 1;