Bug 12478: update the schema
[koha.git] / Koha / Schema / Result / SearchMarcToField.pm
1 use utf8;
2 package Koha::Schema::Result::SearchMarcToField;
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::SearchMarcToField
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<search_marc_to_field>
19
20 =cut
21
22 __PACKAGE__->table("search_marc_to_field");
23
24 =head1 ACCESSORS
25
26 =head2 search_marc_map_id
27
28   data_type: 'integer'
29   is_foreign_key: 1
30   is_nullable: 0
31
32 =head2 search_field_id
33
34   data_type: 'integer'
35   is_foreign_key: 1
36   is_nullable: 0
37
38 =head2 facet
39
40   data_type: 'tinyint'
41   default_value: 0
42   is_nullable: 1
43
44 true if a facet field should be generated for this
45
46 =head2 suggestible
47
48   data_type: 'tinyint'
49   default_value: 0
50   is_nullable: 1
51
52 true if this field can be used to generate suggestions for browse
53
54 =head2 sort
55
56   data_type: 'tinyint'
57   is_nullable: 1
58
59 true/false creates special sort handling, null doesn't
60
61 =cut
62
63 __PACKAGE__->add_columns(
64   "search_marc_map_id",
65   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
66   "search_field_id",
67   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
68   "facet",
69   { data_type => "tinyint", default_value => 0, is_nullable => 1 },
70   "suggestible",
71   { data_type => "tinyint", default_value => 0, is_nullable => 1 },
72   "sort",
73   { data_type => "tinyint", is_nullable => 1 },
74 );
75
76 =head1 PRIMARY KEY
77
78 =over 4
79
80 =item * L</search_marc_map_id>
81
82 =item * L</search_field_id>
83
84 =back
85
86 =cut
87
88 __PACKAGE__->set_primary_key("search_marc_map_id", "search_field_id");
89
90 =head1 RELATIONS
91
92 =head2 search_field
93
94 Type: belongs_to
95
96 Related object: L<Koha::Schema::Result::SearchField>
97
98 =cut
99
100 __PACKAGE__->belongs_to(
101   "search_field",
102   "Koha::Schema::Result::SearchField",
103   { id => "search_field_id" },
104   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
105 );
106
107 =head2 search_marc_map
108
109 Type: belongs_to
110
111 Related object: L<Koha::Schema::Result::SearchMarcMap>
112
113 =cut
114
115 __PACKAGE__->belongs_to(
116   "search_marc_map",
117   "Koha::Schema::Result::SearchMarcMap",
118   { id => "search_marc_map_id" },
119   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
120 );
121
122
123 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-10-12 16:41:47
124 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ccnCYwDdtPGZ/VArAe1kPA
125
126
127 # You can replace this text with custom code or comments, and it will be preserved on regeneration
128 1;