Lines 1-208
Link Here
|
1 |
use utf8; |
|
|
2 |
package Koha::Schema::Result::Overduerule; |
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::Overduerule |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<overduerules> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("overduerules"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 overduerules_id |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
unique identifier for the overduerules |
33 |
|
34 |
=head2 branchcode |
35 |
|
36 |
data_type: 'varchar' |
37 |
default_value: (empty string) |
38 |
is_nullable: 0 |
39 |
size: 10 |
40 |
|
41 |
foreign key from the branches table to define which branch this rule is for (if blank it's all libraries) |
42 |
|
43 |
=head2 categorycode |
44 |
|
45 |
data_type: 'varchar' |
46 |
default_value: (empty string) |
47 |
is_nullable: 0 |
48 |
size: 10 |
49 |
|
50 |
foreign key from the categories table to define which patron category this rule is for |
51 |
|
52 |
=head2 delay1 |
53 |
|
54 |
data_type: 'integer' |
55 |
is_nullable: 1 |
56 |
|
57 |
number of days after the item is overdue that the first notice is sent |
58 |
|
59 |
=head2 letter1 |
60 |
|
61 |
data_type: 'varchar' |
62 |
is_nullable: 1 |
63 |
size: 20 |
64 |
|
65 |
foreign key from the letter table to define which notice should be sent as the first notice |
66 |
|
67 |
=head2 debarred1 |
68 |
|
69 |
data_type: 'varchar' |
70 |
default_value: 0 |
71 |
is_nullable: 1 |
72 |
size: 1 |
73 |
|
74 |
is the patron restricted when the first notice is sent (1 for yes, 0 for no) |
75 |
|
76 |
=head2 delay2 |
77 |
|
78 |
data_type: 'integer' |
79 |
is_nullable: 1 |
80 |
|
81 |
number of days after the item is overdue that the second notice is sent |
82 |
|
83 |
=head2 debarred2 |
84 |
|
85 |
data_type: 'varchar' |
86 |
default_value: 0 |
87 |
is_nullable: 1 |
88 |
size: 1 |
89 |
|
90 |
is the patron restricted when the second notice is sent (1 for yes, 0 for no) |
91 |
|
92 |
=head2 letter2 |
93 |
|
94 |
data_type: 'varchar' |
95 |
is_nullable: 1 |
96 |
size: 20 |
97 |
|
98 |
foreign key from the letter table to define which notice should be sent as the second notice |
99 |
|
100 |
=head2 delay3 |
101 |
|
102 |
data_type: 'integer' |
103 |
is_nullable: 1 |
104 |
|
105 |
number of days after the item is overdue that the third notice is sent |
106 |
|
107 |
=head2 letter3 |
108 |
|
109 |
data_type: 'varchar' |
110 |
is_nullable: 1 |
111 |
size: 20 |
112 |
|
113 |
foreign key from the letter table to define which notice should be sent as the third notice |
114 |
|
115 |
=head2 debarred3 |
116 |
|
117 |
data_type: 'integer' |
118 |
default_value: 0 |
119 |
is_nullable: 1 |
120 |
|
121 |
is the patron restricted when the third notice is sent (1 for yes, 0 for no) |
122 |
|
123 |
=cut |
124 |
|
125 |
__PACKAGE__->add_columns( |
126 |
"overduerules_id", |
127 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
128 |
"branchcode", |
129 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, |
130 |
"categorycode", |
131 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, |
132 |
"delay1", |
133 |
{ data_type => "integer", is_nullable => 1 }, |
134 |
"letter1", |
135 |
{ data_type => "varchar", is_nullable => 1, size => 20 }, |
136 |
"debarred1", |
137 |
{ data_type => "varchar", default_value => 0, is_nullable => 1, size => 1 }, |
138 |
"delay2", |
139 |
{ data_type => "integer", is_nullable => 1 }, |
140 |
"debarred2", |
141 |
{ data_type => "varchar", default_value => 0, is_nullable => 1, size => 1 }, |
142 |
"letter2", |
143 |
{ data_type => "varchar", is_nullable => 1, size => 20 }, |
144 |
"delay3", |
145 |
{ data_type => "integer", is_nullable => 1 }, |
146 |
"letter3", |
147 |
{ data_type => "varchar", is_nullable => 1, size => 20 }, |
148 |
"debarred3", |
149 |
{ data_type => "integer", default_value => 0, is_nullable => 1 }, |
150 |
); |
151 |
|
152 |
=head1 PRIMARY KEY |
153 |
|
154 |
=over 4 |
155 |
|
156 |
=item * L</overduerules_id> |
157 |
|
158 |
=back |
159 |
|
160 |
=cut |
161 |
|
162 |
__PACKAGE__->set_primary_key("overduerules_id"); |
163 |
|
164 |
=head1 UNIQUE CONSTRAINTS |
165 |
|
166 |
=head2 C<overduerules_branch_cat> |
167 |
|
168 |
=over 4 |
169 |
|
170 |
=item * L</branchcode> |
171 |
|
172 |
=item * L</categorycode> |
173 |
|
174 |
=back |
175 |
|
176 |
=cut |
177 |
|
178 |
__PACKAGE__->add_unique_constraint("overduerules_branch_cat", ["branchcode", "categorycode"]); |
179 |
|
180 |
=head1 RELATIONS |
181 |
|
182 |
=head2 overduerules_transport_types |
183 |
|
184 |
Type: has_many |
185 |
|
186 |
Related object: L<Koha::Schema::Result::OverduerulesTransportType> |
187 |
|
188 |
=cut |
189 |
|
190 |
__PACKAGE__->has_many( |
191 |
"overduerules_transport_types", |
192 |
"Koha::Schema::Result::OverduerulesTransportType", |
193 |
{ "foreign.overduerules_id" => "self.overduerules_id" }, |
194 |
{ cascade_copy => 0, cascade_delete => 0 }, |
195 |
); |
196 |
|
197 |
|
198 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 |
199 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pORigxtC5qztZWHI29mZ/g |
200 |
|
201 |
sub koha_object_class { |
202 |
'Koha::OverdueRule'; |
203 |
} |
204 |
sub koha_objects_class { |
205 |
'Koha::OverdueRules'; |
206 |
} |
207 |
|
208 |
1; |