Bug 20434: Update UNIMARC framework - auth (SAUTTIT)
[koha.git] / Koha / Schema / Result / SearchField.pm
blob540d9842741f92322e1579e69b91e0f3bac18d5a
1 use utf8;
2 package Koha::Schema::Result::SearchField;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::SearchField
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<search_field>
20 =cut
22 __PACKAGE__->table("search_field");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 name
34 data_type: 'varchar'
35 is_nullable: 0
36 size: 255
38 the name of the field as it will be stored in the search engine
40 =head2 label
42 data_type: 'varchar'
43 is_nullable: 0
44 size: 255
46 the human readable name of the field, for display
48 =head2 type
50 data_type: 'enum'
51 extra: {list => ["","string","date","number","boolean","sum","isbn","stdno"]}
52 is_nullable: 0
54 what type of data this holds, relevant when storing it in the search engine
56 =head2 weight
58 data_type: 'decimal'
59 is_nullable: 1
60 size: [5,2]
62 =head2 facet_order
64 data_type: 'tinyint'
65 is_nullable: 1
67 the order place of the field in facet list if faceted
69 =head2 staff_client
71 data_type: 'tinyint'
72 default_value: 1
73 is_nullable: 0
75 =head2 opac
77 data_type: 'tinyint'
78 default_value: 1
79 is_nullable: 0
81 =cut
83 __PACKAGE__->add_columns(
84 "id",
85 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
86 "name",
87 { data_type => "varchar", is_nullable => 0, size => 255 },
88 "label",
89 { data_type => "varchar", is_nullable => 0, size => 255 },
90 "type",
92 data_type => "enum",
93 extra => {
94 list => ["", "string", "date", "number", "boolean", "sum", "isbn", "stdno"],
96 is_nullable => 0,
98 "weight",
99 { data_type => "decimal", is_nullable => 1, size => [5, 2] },
100 "facet_order",
101 { data_type => "tinyint", is_nullable => 1 },
102 "staff_client",
103 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
104 "opac",
105 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
108 =head1 PRIMARY KEY
110 =over 4
112 =item * L</id>
114 =back
116 =cut
118 __PACKAGE__->set_primary_key("id");
120 =head1 UNIQUE CONSTRAINTS
122 =head2 C<name>
124 =over 4
126 =item * L</name>
128 =back
130 =cut
132 __PACKAGE__->add_unique_constraint("name", ["name"]);
134 =head1 RELATIONS
136 =head2 search_marc_to_fields
138 Type: has_many
140 Related object: L<Koha::Schema::Result::SearchMarcToField>
142 =cut
144 __PACKAGE__->has_many(
145 "search_marc_to_fields",
146 "Koha::Schema::Result::SearchMarcToField",
147 { "foreign.search_field_id" => "self.id" },
148 { cascade_copy => 0, cascade_delete => 0 },
152 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-02 12:47:22
153 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EbUa4eprgxeUkoOUiXO/Cg
155 __PACKAGE__->many_to_many("search_marc_maps", "search_marc_to_fields", "search_marc_map");