2 package Koha::Schema::Result::SearchField;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::SearchField
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<search_field>
22 __PACKAGE__->table("search_field");
38 the name of the field as it will be stored in the search engine
46 the human readable name of the field, for display
51 extra: {list => ["","string","date","number","boolean","sum","isbn","stdno","year","callnumber","geo_point"]}
54 what type of data this holds, relevant when storing it in the search engine
67 the order place of the field in facet list if faceted
86 if marked this field is not editable or removable
90 __PACKAGE__->add_columns(
92 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
94 { data_type => "varchar", is_nullable => 0, size => 255 },
96 { data_type => "varchar", is_nullable => 0, size => 255 },
118 { data_type => "decimal", is_nullable => 1, size => [5, 2] },
120 { data_type => "tinyint", is_nullable => 1 },
122 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
124 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
126 { data_type => "tinyint", is_nullable => 1 },
139 __PACKAGE__->set_primary_key("id");
141 =head1 UNIQUE CONSTRAINTS
153 __PACKAGE__->add_unique_constraint("name", ["name"]);
157 =head2 search_marc_to_fields
161 Related object: L<Koha::Schema::Result::SearchMarcToField>
165 __PACKAGE__->has_many(
166 "search_marc_to_fields",
167 "Koha::Schema::Result::SearchMarcToField",
168 { "foreign.search_field_id" => "self.id" },
169 { cascade_copy => 0, cascade_delete => 0 },
173 # Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-04-30 09:10:16
174 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NE6QXq/8skTxjjoK15fYrg
176 __PACKAGE__->add_columns(
177 '+mandatory' => { is_boolean => 1 },
180 __PACKAGE__->many_to_many("search_marc_maps", "search_marc_to_fields", "search_marc_map");