Line 0
Link Here
|
0 |
- |
1 |
use utf8; |
|
|
2 |
package Koha::Schema::Result::CatalogConcern; |
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::CatalogConcern |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<catalog_concerns> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("catalog_concerns"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 id |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
primary key |
33 |
|
34 |
=head2 biblio_id |
35 |
|
36 |
data_type: 'integer' |
37 |
is_foreign_key: 1 |
38 |
is_nullable: 0 |
39 |
|
40 |
id of biblio record the report concerns |
41 |
|
42 |
=head2 reporter_id |
43 |
|
44 |
data_type: 'integer' |
45 |
default_value: 0 |
46 |
is_foreign_key: 1 |
47 |
is_nullable: 0 |
48 |
|
49 |
id of the patron who reported the concern |
50 |
|
51 |
=head2 reported_date |
52 |
|
53 |
data_type: 'timestamp' |
54 |
datetime_undef_if_invalid: 1 |
55 |
default_value: current_timestamp |
56 |
is_nullable: 0 |
57 |
|
58 |
date and time this concern was reported |
59 |
|
60 |
=head2 message |
61 |
|
62 |
data_type: 'text' |
63 |
is_nullable: 0 |
64 |
|
65 |
concern message content |
66 |
|
67 |
=head2 resolver_id |
68 |
|
69 |
data_type: 'integer' |
70 |
is_foreign_key: 1 |
71 |
is_nullable: 1 |
72 |
|
73 |
id of the user who resolved the concern |
74 |
|
75 |
=head2 resolved_date |
76 |
|
77 |
data_type: 'datetime' |
78 |
datetime_undef_if_invalid: 1 |
79 |
is_nullable: 1 |
80 |
|
81 |
date and time this concern was resolved |
82 |
|
83 |
=head2 resolution_message |
84 |
|
85 |
data_type: 'text' |
86 |
is_nullable: 1 |
87 |
|
88 |
resolution message content |
89 |
|
90 |
=cut |
91 |
|
92 |
__PACKAGE__->add_columns( |
93 |
"id", |
94 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
95 |
"biblio_id", |
96 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
97 |
"reporter_id", |
98 |
{ |
99 |
data_type => "integer", |
100 |
default_value => 0, |
101 |
is_foreign_key => 1, |
102 |
is_nullable => 0, |
103 |
}, |
104 |
"reported_date", |
105 |
{ |
106 |
data_type => "timestamp", |
107 |
datetime_undef_if_invalid => 1, |
108 |
default_value => \"current_timestamp", |
109 |
is_nullable => 0, |
110 |
}, |
111 |
"message", |
112 |
{ data_type => "text", is_nullable => 0 }, |
113 |
"resolver_id", |
114 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
115 |
"resolved_date", |
116 |
{ |
117 |
data_type => "datetime", |
118 |
datetime_undef_if_invalid => 1, |
119 |
is_nullable => 1, |
120 |
}, |
121 |
"resolution_message", |
122 |
{ data_type => "text", is_nullable => 1 }, |
123 |
); |
124 |
|
125 |
=head1 PRIMARY KEY |
126 |
|
127 |
=over 4 |
128 |
|
129 |
=item * L</id> |
130 |
|
131 |
=back |
132 |
|
133 |
=cut |
134 |
|
135 |
__PACKAGE__->set_primary_key("id"); |
136 |
|
137 |
=head1 RELATIONS |
138 |
|
139 |
=head2 biblio |
140 |
|
141 |
Type: belongs_to |
142 |
|
143 |
Related object: L<Koha::Schema::Result::Biblio> |
144 |
|
145 |
=cut |
146 |
|
147 |
__PACKAGE__->belongs_to( |
148 |
"biblio", |
149 |
"Koha::Schema::Result::Biblio", |
150 |
{ biblionumber => "biblio_id" }, |
151 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
152 |
); |
153 |
|
154 |
=head2 reporter |
155 |
|
156 |
Type: belongs_to |
157 |
|
158 |
Related object: L<Koha::Schema::Result::Borrower> |
159 |
|
160 |
=cut |
161 |
|
162 |
__PACKAGE__->belongs_to( |
163 |
"reporter", |
164 |
"Koha::Schema::Result::Borrower", |
165 |
{ borrowernumber => "reporter_id" }, |
166 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
167 |
); |
168 |
|
169 |
=head2 resolver |
170 |
|
171 |
Type: belongs_to |
172 |
|
173 |
Related object: L<Koha::Schema::Result::Borrower> |
174 |
|
175 |
=cut |
176 |
|
177 |
__PACKAGE__->belongs_to( |
178 |
"resolver", |
179 |
"Koha::Schema::Result::Borrower", |
180 |
{ borrowernumber => "resolver_id" }, |
181 |
{ |
182 |
is_deferrable => 1, |
183 |
join_type => "LEFT", |
184 |
on_delete => "CASCADE", |
185 |
on_update => "CASCADE", |
186 |
}, |
187 |
); |
188 |
|
189 |
|
190 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-08-16 12:51:38 |
191 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6J4cyyPvysbR2ZBd7o1hyw |
192 |
|
193 |
|
194 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
195 |
1; |