View | Details | Raw Unified | Return to bug 22456
Collapse All | Expand All

(-)a/Koha/Schema/Result/Borrower.pm (-2 / +32 lines)
Lines 1249-1254 __PACKAGE__->has_many( Link Here
1249
  { cascade_copy => 0, cascade_delete => 0 },
1249
  { cascade_copy => 0, cascade_delete => 0 },
1250
);
1250
);
1251
1251
1252
=head2 hold_cancellation_requests_requesters
1253
1254
Type: has_many
1255
1256
Related object: L<Koha::Schema::Result::HoldCancellationRequest>
1257
1258
=cut
1259
1260
__PACKAGE__->has_many(
1261
  "hold_cancellation_requests_requesters",
1262
  "Koha::Schema::Result::HoldCancellationRequest",
1263
  { "foreign.requester_id" => "self.borrowernumber" },
1264
  { cascade_copy => 0, cascade_delete => 0 },
1265
);
1266
1267
=head2 hold_cancellation_requests_resolvers
1268
1269
Type: has_many
1270
1271
Related object: L<Koha::Schema::Result::HoldCancellationRequest>
1272
1273
=cut
1274
1275
__PACKAGE__->has_many(
1276
  "hold_cancellation_requests_resolvers",
1277
  "Koha::Schema::Result::HoldCancellationRequest",
1278
  { "foreign.resolver_id" => "self.borrowernumber" },
1279
  { cascade_copy => 0, cascade_delete => 0 },
1280
);
1281
1252
=head2 hold_fill_targets
1282
=head2 hold_fill_targets
1253
1283
1254
Type: has_many
1284
Type: has_many
Lines 1965-1972 Composing rels: L</user_permissions> -> permission Link Here
1965
__PACKAGE__->many_to_many("permissions", "user_permissions", "permission");
1995
__PACKAGE__->many_to_many("permissions", "user_permissions", "permission");
1966
1996
1967
1997
1968
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-06 19:32:13
1998
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-16 18:18:02
1969
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lGlRQ4XvRdsrqTye6sDpYg
1999
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WK9kGNgMgN3hH/ZRf7SH1g
1970
2000
1971
__PACKAGE__->has_many(
2001
__PACKAGE__->has_many(
1972
  "extended_attributes",
2002
  "extended_attributes",
(-)a/Koha/Schema/Result/HoldCancellationRequest.pm (+219 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::HoldCancellationRequest;
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::HoldCancellationRequest
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<hold_cancellation_requests>
19
20
=cut
21
22
__PACKAGE__->table("hold_cancellation_requests");
23
24
=head1 ACCESSORS
25
26
=head2 hold_cancellation_request_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
Unique ID of the cancellation request
33
34
=head2 hold_id
35
36
  data_type: 'integer'
37
  is_nullable: 0
38
39
ID of the hold
40
41
=head2 requester_id
42
43
  data_type: 'integer'
44
  is_foreign_key: 1
45
  is_nullable: 1
46
47
ID of the user that made the cancellation request
48
49
=head2 creation_date
50
51
  data_type: 'timestamp'
52
  datetime_undef_if_invalid: 1
53
  is_nullable: 1
54
55
Time and date the cancellation request was created
56
57
=head2 source
58
59
  data_type: 'enum'
60
  default_value: 'owner'
61
  extra: {list => ["owner"]}
62
  is_nullable: 0
63
64
The source for the cancellation request
65
66
=head2 status
67
68
  data_type: 'enum'
69
  default_value: 'requested'
70
  extra: {list => ["requested","accepted","rejected"]}
71
  is_nullable: 1
72
73
request status
74
75
=head2 resolution_date
76
77
  data_type: 'timestamp'
78
  datetime_undef_if_invalid: 1
79
  is_nullable: 1
80
81
Time and date cancellation request was resolved
82
83
=head2 resolver_id
84
85
  data_type: 'integer'
86
  is_foreign_key: 1
87
  is_nullable: 1
88
89
ID of the staff member that resolved the request
90
91
=cut
92
93
__PACKAGE__->add_columns(
94
  "hold_cancellation_request_id",
95
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
96
  "hold_id",
97
  { data_type => "integer", is_nullable => 0 },
98
  "requester_id",
99
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
100
  "creation_date",
101
  {
102
    data_type => "timestamp",
103
    datetime_undef_if_invalid => 1,
104
    is_nullable => 1,
105
  },
106
  "source",
107
  {
108
    data_type => "enum",
109
    default_value => "owner",
110
    extra => { list => ["owner"] },
111
    is_nullable => 0,
112
  },
113
  "status",
114
  {
115
    data_type => "enum",
116
    default_value => "requested",
117
    extra => { list => ["requested", "accepted", "rejected"] },
118
    is_nullable => 1,
119
  },
120
  "resolution_date",
121
  {
122
    data_type => "timestamp",
123
    datetime_undef_if_invalid => 1,
124
    is_nullable => 1,
125
  },
126
  "resolver_id",
127
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
128
);
129
130
=head1 PRIMARY KEY
131
132
=over 4
133
134
=item * L</hold_cancellation_request_id>
135
136
=back
137
138
=cut
139
140
__PACKAGE__->set_primary_key("hold_cancellation_request_id");
141
142
=head1 UNIQUE CONSTRAINTS
143
144
=head2 C<hold_requester_uniq>
145
146
=over 4
147
148
=item * L</hold_id>
149
150
=item * L</requester_id>
151
152
=back
153
154
=cut
155
156
__PACKAGE__->add_unique_constraint("hold_requester_uniq", ["hold_id", "requester_id"]);
157
158
=head1 RELATIONS
159
160
=head2 requester
161
162
Type: belongs_to
163
164
Related object: L<Koha::Schema::Result::Borrower>
165
166
=cut
167
168
__PACKAGE__->belongs_to(
169
  "requester",
170
  "Koha::Schema::Result::Borrower",
171
  { borrowernumber => "requester_id" },
172
  {
173
    is_deferrable => 1,
174
    join_type     => "LEFT",
175
    on_delete     => "CASCADE",
176
    on_update     => "CASCADE",
177
  },
178
);
179
180
=head2 resolver
181
182
Type: belongs_to
183
184
Related object: L<Koha::Schema::Result::Borrower>
185
186
=cut
187
188
__PACKAGE__->belongs_to(
189
  "resolver",
190
  "Koha::Schema::Result::Borrower",
191
  { borrowernumber => "resolver_id" },
192
  {
193
    is_deferrable => 1,
194
    join_type     => "LEFT",
195
    on_delete     => "SET NULL",
196
    on_update     => "CASCADE",
197
  },
198
);
199
200
201
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-18 17:36:48
202
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LQw6vNCU3DspZ7UOdgHvjg
203
204
# FIXME: Revisit after bug 25260
205
__PACKAGE__->might_have(
206
    "hold",
207
    "Koha::Schema::Result::Reserve",
208
    { "foreign.reserve_id" => "self.hold_id" },
209
    { cascade_copy       => 0, cascade_delete => 0 },
210
);
211
212
sub koha_object_class {
213
    'Koha::Hold::CancellationRequest';
214
}
215
sub koha_objects_class {
216
    'Koha::Hold::CancellationRequests';
217
}
218
219
1;
(-)a/Koha/Schema/Result/Reserve.pm (-3 / +2 lines)
Lines 431-438 __PACKAGE__->belongs_to( Link Here
431
);
431
);
432
432
433
433
434
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-01-28 20:08:09
434
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-04-19 15:00:15
435
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7Q8/GFCOkXdn+jg69HZ0GQ
435
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nlwpni0zHBZZ5sODq9eF8w
436
436
437
__PACKAGE__->belongs_to(
437
__PACKAGE__->belongs_to(
438
  "item",
438
  "item",
439
- 

Return to bug 22456