Bug 14899: DB changes
[koha.git] / Koha / Schema / Result / SearchMarcMap.pm
1 use utf8;
2 package Koha::Schema::Result::SearchMarcMap;
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::SearchMarcMap
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<search_marc_map>
19
20 =cut
21
22 __PACKAGE__->table("search_marc_map");
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 index_name
33
34   data_type: 'enum'
35   extra: {list => ["biblios","authorities"]}
36   is_nullable: 0
37
38 what storage index this map is for
39
40 =head2 marc_type
41
42   data_type: 'enum'
43   extra: {list => ["marc21","unimarc","normarc"]}
44   is_nullable: 0
45
46 what MARC type this map is for
47
48 =head2 marc_field
49
50   data_type: 'varchar'
51   is_nullable: 0
52   size: 255
53
54 the MARC specifier for this field
55
56 =head2 facet
57
58   data_type: 'tinyint'
59   default_value: 0
60   is_nullable: 1
61
62 true if a facet field should be generated for this
63
64 =head2 suggestible
65
66   data_type: 'tinyint'
67   default_value: 0
68   is_nullable: 1
69
70 true if this field can be used to generate suggestions for browse
71
72 =head2 sort
73
74   data_type: 'tinyint'
75   is_nullable: 1
76
77 true/false creates special sort handling, null doesn't
78
79 =cut
80
81 __PACKAGE__->add_columns(
82   "id",
83   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
84   "index_name",
85   {
86     data_type => "enum",
87     extra => { list => ["biblios", "authorities"] },
88     is_nullable => 0,
89   },
90   "marc_type",
91   {
92     data_type => "enum",
93     extra => { list => ["marc21", "unimarc", "normarc"] },
94     is_nullable => 0,
95   },
96   "marc_field",
97   { data_type => "varchar", is_nullable => 0, size => 255 },
98   "facet",
99   { data_type => "tinyint", default_value => 0, is_nullable => 1 },
100   "suggestible",
101   { data_type => "tinyint", default_value => 0, is_nullable => 1 },
102   "sort",
103   { data_type => "tinyint", is_nullable => 1 },
104 );
105
106 =head1 PRIMARY KEY
107
108 =over 4
109
110 =item * L</id>
111
112 =back
113
114 =cut
115
116 __PACKAGE__->set_primary_key("id");
117
118 =head1 RELATIONS
119
120 =head2 search_marc_to_fields
121
122 Type: has_many
123
124 Related object: L<Koha::Schema::Result::SearchMarcToField>
125
126 =cut
127
128 __PACKAGE__->has_many(
129   "search_marc_to_fields",
130   "Koha::Schema::Result::SearchMarcToField",
131   { "foreign.search_marc_map_id" => "self.id" },
132   { cascade_copy => 0, cascade_delete => 0 },
133 );
134
135 =head2 search_fields
136
137 Type: many_to_many
138
139 Composing rels: L</search_marc_to_fields> -> search_field
140
141 =cut
142
143 __PACKAGE__->many_to_many("search_fields", "search_marc_to_fields", "search_field");
144
145
146 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-09-25 15:20:52
147 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:o579otqUGA8XhO+NYv99dw
148
149
150 # You can replace this text with custom code or comments, and it will be preserved on regeneration
151 1;