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

(-)a/Koha/Schema/Result/BorrowerDebarment.pm (-12 / +22 lines)
Lines 49-60 expiration date of the restriction Link Here
49
49
50
=head2 type
50
=head2 type
51
51
52
  data_type: 'enum'
52
  data_type: 'varchar'
53
  default_value: 'MANUAL'
53
  is_foreign_key: 1
54
  extra: {list => ["SUSPENSION","OVERDUES","MANUAL","DISCHARGE"]}
55
  is_nullable: 0
54
  is_nullable: 0
55
  size: 50
56
56
57
type of restriction
57
type of restriction, FK to debarment_types.code
58
58
59
=head2 comment
59
=head2 comment
60
60
Lines 97-108 __PACKAGE__->add_columns( Link Here
97
  "expiration",
97
  "expiration",
98
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
98
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
99
  "type",
99
  "type",
100
  {
100
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 50 },
101
    data_type => "enum",
102
    default_value => "MANUAL",
103
    extra => { list => ["SUSPENSION", "OVERDUES", "MANUAL", "DISCHARGE"] },
104
    is_nullable => 0,
105
  },
106
  "comment",
101
  "comment",
107
  { data_type => "mediumtext", is_nullable => 1 },
102
  { data_type => "mediumtext", is_nullable => 1 },
108
  "manager_id",
103
  "manager_id",
Lines 151-159 __PACKAGE__->belongs_to( Link Here
151
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
146
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
152
);
147
);
153
148
149
=head2 type
150
151
Type: belongs_to
152
153
Related object: L<Koha::Schema::Result::DebarmentType>
154
155
=cut
156
157
__PACKAGE__->belongs_to(
158
  "type",
159
  "Koha::Schema::Result::DebarmentType",
160
  { code => "type" },
161
  { is_deferrable => 1, on_delete => "NO ACTION", on_update => "CASCADE" },
162
);
163
154
164
155
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
165
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-04 11:05:19
156
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vQL2xYGB5GI//2l4FdIR9w
166
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bxRDwUTv9cZVpDfNDatosQ
157
167
158
168
159
# 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 (-1 / +102 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::DebarmentType;
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::DebarmentType
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<debarment_types>
19
20
=cut
21
22
__PACKAGE__->table("debarment_types");
23
24
=head1 ACCESSORS
25
26
=head2 code
27
28
  data_type: 'varchar'
29
  is_nullable: 0
30
  size: 50
31
32
=head2 display_text
33
34
  data_type: 'text'
35
  is_nullable: 0
36
37
=head2 is_system
38
39
  data_type: 'tinyint'
40
  default_value: 0
41
  is_nullable: 0
42
43
=head2 is_default
44
45
  data_type: 'tinyint'
46
  default_value: 0
47
  is_nullable: 0
48
49
=cut
50
51
__PACKAGE__->add_columns(
52
  "code",
53
  { data_type => "varchar", is_nullable => 0, size => 50 },
54
  "display_text",
55
  { data_type => "text", is_nullable => 0 },
56
  "is_system",
57
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
58
  "is_default",
59
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
60
);
61
62
=head1 PRIMARY KEY
63
64
=over 4
65
66
=item * L</code>
67
68
=back
69
70
=cut
71
72
__PACKAGE__->set_primary_key("code");
73
74
=head1 RELATIONS
75
76
=head2 borrower_debarments
77
78
Type: has_many
79
80
Related object: L<Koha::Schema::Result::BorrowerDebarment>
81
82
=cut
83
84
__PACKAGE__->has_many(
85
  "borrower_debarments",
86
  "Koha::Schema::Result::BorrowerDebarment",
87
  { "foreign.type" => "self.code" },
88
  { cascade_copy => 0, cascade_delete => 0 },
89
);
90
91
92
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-04 11:05:19
93
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cRSViJItfpT3mxCX82/9eQ
94
95
sub koha_object_class {
96
    'Koha::RestrictionType';
97
}
98
sub koha_objects_class {
99
    'Koha::RestrictionTypes';
100
}
101
102
1;

Return to bug 23681