Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / ImportRecordMatch.pm
1 use utf8;
2 package Koha::Schema::Result::ImportRecordMatch;
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::ImportRecordMatch
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<import_record_matches>
19
20 =cut
21
22 __PACKAGE__->table("import_record_matches");
23
24 =head1 ACCESSORS
25
26 =head2 import_record_id
27
28   data_type: 'integer'
29   is_foreign_key: 1
30   is_nullable: 0
31
32 the id given to the imported bib record (import_records.import_record_id)
33
34 =head2 candidate_match_id
35
36   data_type: 'integer'
37   is_nullable: 0
38
39 the biblio the imported record matches (biblio.biblionumber)
40
41 =head2 score
42
43   data_type: 'integer'
44   default_value: 0
45   is_nullable: 0
46
47 the match score
48
49 =head2 chosen
50
51   data_type: 'tinyint'
52   is_nullable: 1
53
54 whether this match has been allowed or denied
55
56 =cut
57
58 __PACKAGE__->add_columns(
59   "import_record_id",
60   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
61   "candidate_match_id",
62   { data_type => "integer", is_nullable => 0 },
63   "score",
64   { data_type => "integer", default_value => 0, is_nullable => 0 },
65   "chosen",
66   { data_type => "tinyint", is_nullable => 1 },
67 );
68
69 =head1 PRIMARY KEY
70
71 =over 4
72
73 =item * L</import_record_id>
74
75 =item * L</candidate_match_id>
76
77 =back
78
79 =cut
80
81 __PACKAGE__->set_primary_key("import_record_id", "candidate_match_id");
82
83 =head1 RELATIONS
84
85 =head2 import_record
86
87 Type: belongs_to
88
89 Related object: L<Koha::Schema::Result::ImportRecord>
90
91 =cut
92
93 __PACKAGE__->belongs_to(
94   "import_record",
95   "Koha::Schema::Result::ImportRecord",
96   { import_record_id => "import_record_id" },
97   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
98 );
99
100
101 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-03 20:30:28
102 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:a1GMA3K9ZgtPGdsCWmDMFw
103
104 __PACKAGE__->add_columns(
105     '+chosen' => { is_boolean => 1 },
106 );
107
108 sub koha_object_class {
109     'Koha::Import::Record::Match';
110 }
111 sub koha_objects_class {
112     'Koha::Import::Record::Matches';
113 }
114
115 1;