Bug 18936: (follow-up) Add cloning of circulation rules back to Koha
[koha.git] / Koha / Schema / Result / SearchMarcToField.pm
blob01080160b9a2393597dd53bcbcbaa45661a59a67
1 use utf8;
2 package Koha::Schema::Result::SearchMarcToField;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::SearchMarcToField
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<search_marc_to_field>
20 =cut
22 __PACKAGE__->table("search_marc_to_field");
24 =head1 ACCESSORS
26 =head2 search
28 data_type: 'tinyint'
29 default_value: 1
30 is_nullable: 0
32 =head2 search_marc_map_id
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 search_field_id
40 data_type: 'integer'
41 is_foreign_key: 1
42 is_nullable: 0
44 =head2 facet
46 data_type: 'tinyint'
47 default_value: 0
48 is_nullable: 1
50 true if a facet field should be generated for this
52 =head2 suggestible
54 data_type: 'tinyint'
55 default_value: 0
56 is_nullable: 1
58 true if this field can be used to generate suggestions for browse
60 =head2 sort
62 data_type: 'tinyint'
63 is_nullable: 1
65 true/false creates special sort handling, null doesn't
67 =cut
69 __PACKAGE__->add_columns(
70 "search",
71 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
72 "search_marc_map_id",
73 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
74 "search_field_id",
75 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
76 "facet",
77 { data_type => "tinyint", default_value => 0, is_nullable => 1 },
78 "suggestible",
79 { data_type => "tinyint", default_value => 0, is_nullable => 1 },
80 "sort",
81 { data_type => "tinyint", is_nullable => 1 },
84 =head1 PRIMARY KEY
86 =over 4
88 =item * L</search_marc_map_id>
90 =item * L</search_field_id>
92 =back
94 =cut
96 __PACKAGE__->set_primary_key("search_marc_map_id", "search_field_id");
98 =head1 RELATIONS
100 =head2 search_field
102 Type: belongs_to
104 Related object: L<Koha::Schema::Result::SearchField>
106 =cut
108 __PACKAGE__->belongs_to(
109 "search_field",
110 "Koha::Schema::Result::SearchField",
111 { id => "search_field_id" },
112 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
115 =head2 search_marc_map
117 Type: belongs_to
119 Related object: L<Koha::Schema::Result::SearchMarcMap>
121 =cut
123 __PACKAGE__->belongs_to(
124 "search_marc_map",
125 "Koha::Schema::Result::SearchMarcMap",
126 { id => "search_marc_map_id" },
127 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
131 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-02 12:47:22
132 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9mqZ/zrii+Fv+k+eQNHYUw
135 # You can replace this text with custom code or comments, and it will be preserved on regeneration