Bug 25655: DBIC schema
[srvgit] / Koha / Schema / Result / TagAll.pm
1 use utf8;
2 package Koha::Schema::Result::TagAll;
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::TagAll
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<tags_all>
19
20 =cut
21
22 __PACKAGE__->table("tags_all");
23
24 =head1 ACCESSORS
25
26 =head2 tag_id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 unique id and primary key
33
34 =head2 borrowernumber
35
36   data_type: 'integer'
37   is_foreign_key: 1
38   is_nullable: 1
39
40 the patron who added the tag (borrowers.borrowernumber)
41
42 =head2 biblionumber
43
44   data_type: 'integer'
45   is_foreign_key: 1
46   is_nullable: 0
47
48 the bib record this tag was left on (biblio.biblionumber)
49
50 =head2 term
51
52   data_type: 'varchar'
53   is_nullable: 0
54   size: 191
55
56 the tag
57
58 =head2 language
59
60   data_type: 'integer'
61   is_nullable: 1
62
63 the language the tag was left in
64
65 =head2 date_created
66
67   data_type: 'datetime'
68   datetime_undef_if_invalid: 1
69   is_nullable: 0
70
71 the date the tag was added
72
73 =cut
74
75 __PACKAGE__->add_columns(
76   "tag_id",
77   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
78   "borrowernumber",
79   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
80   "biblionumber",
81   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
82   "term",
83   { data_type => "varchar", is_nullable => 0, size => 191 },
84   "language",
85   { data_type => "integer", is_nullable => 1 },
86   "date_created",
87   {
88     data_type => "datetime",
89     datetime_undef_if_invalid => 1,
90     is_nullable => 0,
91   },
92 );
93
94 =head1 PRIMARY KEY
95
96 =over 4
97
98 =item * L</tag_id>
99
100 =back
101
102 =cut
103
104 __PACKAGE__->set_primary_key("tag_id");
105
106 =head1 RELATIONS
107
108 =head2 biblionumber
109
110 Type: belongs_to
111
112 Related object: L<Koha::Schema::Result::Biblio>
113
114 =cut
115
116 __PACKAGE__->belongs_to(
117   "biblionumber",
118   "Koha::Schema::Result::Biblio",
119   { biblionumber => "biblionumber" },
120   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
121 );
122
123 =head2 borrowernumber
124
125 Type: belongs_to
126
127 Related object: L<Koha::Schema::Result::Borrower>
128
129 =cut
130
131 __PACKAGE__->belongs_to(
132   "borrowernumber",
133   "Koha::Schema::Result::Borrower",
134   { borrowernumber => "borrowernumber" },
135   {
136     is_deferrable => 1,
137     join_type     => "LEFT",
138     on_delete     => "SET NULL",
139     on_update     => "CASCADE",
140   },
141 );
142
143
144 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
145 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qQsYlIAUc1KP7M/RUaqd8g
146
147 sub koha_object_class {
148     'Koha::Tag';
149 }
150 sub koha_objects_class {
151     'Koha::Tags';
152 }
153
154 1;