Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / TagsIndex.pm
1 use utf8;
2 package Koha::Schema::Result::TagsIndex;
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::TagsIndex
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<tags_index>
19
20 =cut
21
22 __PACKAGE__->table("tags_index");
23
24 =head1 ACCESSORS
25
26 =head2 term
27
28   data_type: 'varchar'
29   is_foreign_key: 1
30   is_nullable: 0
31   size: 191
32
33 the tag
34
35 =head2 biblionumber
36
37   data_type: 'integer'
38   is_foreign_key: 1
39   is_nullable: 0
40
41 the bib record this tag was used on (biblio.biblionumber)
42
43 =head2 weight
44
45   data_type: 'integer'
46   default_value: 1
47   is_nullable: 0
48
49 the number of times this term was used on this bib record
50
51 =cut
52
53 __PACKAGE__->add_columns(
54   "term",
55   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 191 },
56   "biblionumber",
57   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
58   "weight",
59   { data_type => "integer", default_value => 1, is_nullable => 0 },
60 );
61
62 =head1 PRIMARY KEY
63
64 =over 4
65
66 =item * L</term>
67
68 =item * L</biblionumber>
69
70 =back
71
72 =cut
73
74 __PACKAGE__->set_primary_key("term", "biblionumber");
75
76 =head1 RELATIONS
77
78 =head2 biblionumber
79
80 Type: belongs_to
81
82 Related object: L<Koha::Schema::Result::Biblio>
83
84 =cut
85
86 __PACKAGE__->belongs_to(
87   "biblionumber",
88   "Koha::Schema::Result::Biblio",
89   { biblionumber => "biblionumber" },
90   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
91 );
92
93 =head2 term
94
95 Type: belongs_to
96
97 Related object: L<Koha::Schema::Result::TagsApproval>
98
99 =cut
100
101 __PACKAGE__->belongs_to(
102   "term",
103   "Koha::Schema::Result::TagsApproval",
104   { term => "term" },
105   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
106 );
107
108
109 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
110 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:s+HP8nlAKZz2S7PI8MQBOA
111
112 sub koha_object_class {
113     'Koha::Tags::Index';
114 }
115 sub koha_objects_class {
116     'Koha::Tags::Indexes';
117 }
118
119 1;