Bug 20073: Update DBIC Schema changes
[koha.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"]}
52   is_nullable: 0
53
54 what type of data this holds, relevant when storing it in the search engine
55
56 =cut
57
58 __PACKAGE__->add_columns(
59   "id",
60   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
61   "name",
62   { data_type => "varchar", is_nullable => 0, size => 255 },
63   "label",
64   { data_type => "varchar", is_nullable => 0, size => 255 },
65   "type",
66   {
67     data_type => "enum",
68     extra => {
69       list => ["", "string", "date", "number", "boolean", "sum", "isbn", "stdno"],
70     },
71     is_nullable => 0,
72   },
73 );
74
75 =head1 PRIMARY KEY
76
77 =over 4
78
79 =item * L</id>
80
81 =back
82
83 =cut
84
85 __PACKAGE__->set_primary_key("id");
86
87 =head1 UNIQUE CONSTRAINTS
88
89 =head2 C<name>
90
91 =over 4
92
93 =item * L</name>
94
95 =back
96
97 =cut
98
99 __PACKAGE__->add_unique_constraint("name", ["name"]);
100
101 =head1 RELATIONS
102
103 =head2 search_marc_to_fields
104
105 Type: has_many
106
107 Related object: L<Koha::Schema::Result::SearchMarcToField>
108
109 =cut
110
111 __PACKAGE__->has_many(
112   "search_marc_to_fields",
113   "Koha::Schema::Result::SearchMarcToField",
114   { "foreign.search_field_id" => "self.id" },
115   { cascade_copy => 0, cascade_delete => 0 },
116 );
117
118
119 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-05-09 12:50:58
120 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NDRiXH19vBOhrMoyJqVTGQ
121
122 __PACKAGE__->many_to_many("search_marc_maps", "search_marc_to_fields", "search_marc_map");
123
124 1;