Bug 12478: change the schema for storing mappings
[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 =cut
39
40 __PACKAGE__->add_columns(
41   "search_marc_map_id",
42   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
43   "search_field_id",
44   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
45 );
46
47 =head1 PRIMARY KEY
48
49 =over 4
50
51 =item * L</search_marc_map_id>
52
53 =item * L</search_field_id>
54
55 =back
56
57 =cut
58
59 __PACKAGE__->set_primary_key("search_marc_map_id", "search_field_id");
60
61 =head1 RELATIONS
62
63 =head2 search_field
64
65 Type: belongs_to
66
67 Related object: L<Koha::Schema::Result::SearchField>
68
69 =cut
70
71 __PACKAGE__->belongs_to(
72   "search_field",
73   "Koha::Schema::Result::SearchField",
74   { id => "search_field_id" },
75   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
76 );
77
78 =head2 search_marc_map
79
80 Type: belongs_to
81
82 Related object: L<Koha::Schema::Result::SearchMarcMap>
83
84 =cut
85
86 __PACKAGE__->belongs_to(
87   "search_marc_map",
88   "Koha::Schema::Result::SearchMarcMap",
89   { id => "search_marc_map_id" },
90   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
91 );
92
93
94 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-06-10 14:32:07
95 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZNdjnjdGpK+5P478RkCWnA
96
97
98 # You can replace this text with custom code or comments, and it will be preserved on regeneration
99 1;