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

(-)a/Koha/RestrictionType.pm (-3 / +3 lines)
Lines 28-34 Koha::RestrictionType - Koha RestrictionType Object class Link Here
28
28
29
=head1 API
29
=head1 API
30
30
31
=head2 Class Methods
31
=head2 Class methods
32
32
33
=head3 delete
33
=head3 delete
34
34
Lines 87-98 sub make_default { Link Here
87
87
88
=head2 Internal methods
88
=head2 Internal methods
89
89
90
=head3 type
90
=head3 _type
91
91
92
=cut
92
=cut
93
93
94
sub _type {
94
sub _type {
95
    return 'DebarmentType';
95
    return 'RestrictionType';
96
}
96
}
97
97
98
1;
98
1;
(-)a/Koha/RestrictionTypes.pm (-6 / +2 lines)
Lines 17-26 package Koha::RestrictionTypes; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
22
use C4::Context;
23
24
use Koha::Database;
20
use Koha::Database;
25
use Koha::RestrictionType;
21
use Koha::RestrictionType;
26
22
Lines 32-38 Koha::RestrictionTypes - Koha Restriction Types Object set class Link Here
32
28
33
=head1 API
29
=head1 API
34
30
35
=head2 Class Methods
31
=head2 Class methods
36
32
37
=cut
33
=cut
38
34
Lines 59-65 sub keyed_on_code { Link Here
59
=cut
55
=cut
60
56
61
sub _type {
57
sub _type {
62
    return 'DebarmentType';
58
    return 'RestrictionType';
63
}
59
}
64
60
65
=head3 object_class
61
=head3 object_class
(-)a/Koha/Schema/Result/BorrowerDebarment.pm (-5 / +5 lines)
Lines 54-60 expiration date of the restriction Link Here
54
  is_nullable: 0
54
  is_nullable: 0
55
  size: 50
55
  size: 50
56
56
57
type of restriction, FK to debarment_types.code
57
type of restriction, FK to restriction_types.code
58
58
59
=head2 comment
59
=head2 comment
60
60
Lines 150-169 __PACKAGE__->belongs_to( Link Here
150
150
151
Type: belongs_to
151
Type: belongs_to
152
152
153
Related object: L<Koha::Schema::Result::DebarmentType>
153
Related object: L<Koha::Schema::Result::RestrictionType>
154
154
155
=cut
155
=cut
156
156
157
__PACKAGE__->belongs_to(
157
__PACKAGE__->belongs_to(
158
  "type",
158
  "type",
159
  "Koha::Schema::Result::DebarmentType",
159
  "Koha::Schema::Result::RestrictionType",
160
  { code => "type" },
160
  { code => "type" },
161
  { is_deferrable => 1, on_delete => "NO ACTION", on_update => "CASCADE" },
161
  { is_deferrable => 1, on_delete => "NO ACTION", on_update => "CASCADE" },
162
);
162
);
163
163
164
164
165
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-04 11:05:19
165
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-08-19 17:53:04
166
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bxRDwUTv9cZVpDfNDatosQ
166
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kDCkA7XrjKXlrFG5lk8Lgg
167
167
168
168
169
# You can replace this text with custom code or comments, and it will be preserved on regeneration
169
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/DebarmentType.pm (-7 / +6 lines)
Lines 1-12 Link Here
1
use utf8;
1
use utf8;
2
package Koha::Schema::Result::DebarmentType;
2
package Koha::Schema::Result::RestrictionType;
3
3
4
# Created by DBIx::Class::Schema::Loader
4
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
6
7
=head1 NAME
7
=head1 NAME
8
8
9
Koha::Schema::Result::DebarmentType
9
Koha::Schema::Result::RestrictionType
10
10
11
=cut
11
=cut
12
12
Lines 15-25 use warnings; Link Here
15
15
16
use base 'DBIx::Class::Core';
16
use base 'DBIx::Class::Core';
17
17
18
=head1 TABLE: C<debarment_types>
18
=head1 TABLE: C<restriction_types>
19
19
20
=cut
20
=cut
21
21
22
__PACKAGE__->table("debarment_types");
22
__PACKAGE__->table("restriction_types");
23
23
24
=head1 ACCESSORS
24
=head1 ACCESSORS
25
25
Lines 89-96 __PACKAGE__->has_many( Link Here
89
);
89
);
90
90
91
91
92
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-04 11:05:19
92
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-08-19 17:53:05
93
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cRSViJItfpT3mxCX82/9eQ
93
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CC8yZ6IqZPnySpMC5Mn/ig
94
94
95
__PACKAGE__->add_columns(
95
__PACKAGE__->add_columns(
96
    '+is_system'  => { is_boolean => 1 },
96
    '+is_system'  => { is_boolean => 1 },
97
- 

Return to bug 23681