2 package Koha::Schema::Result::Overduerule;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Overduerule
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<overduerules>
22 __PACKAGE__->table("overduerules");
26 =head2 overduerules_id
32 unique identifier for the overduerules
37 default_value: (empty string)
41 foreign key from the branches table to define which branch this rule is for (if blank it's all libraries)
46 default_value: (empty string)
50 foreign key from the categories table to define which patron category this rule is for
57 number of days after the item is overdue that the first notice is sent
65 foreign key from the letter table to define which notice should be sent as the first notice
74 is the patron restricted when the first notice is sent (1 for yes, 0 for no)
81 number of days after the item is overdue that the second notice is sent
90 is the patron restricted when the second notice is sent (1 for yes, 0 for no)
98 foreign key from the letter table to define which notice should be sent as the second notice
105 number of days after the item is overdue that the third notice is sent
113 foreign key from the letter table to define which notice should be sent as the third notice
121 is the patron restricted when the third notice is sent (1 for yes, 0 for no)
125 __PACKAGE__->add_columns(
127 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
129 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
131 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
133 { data_type => "integer", is_nullable => 1 },
135 { data_type => "varchar", is_nullable => 1, size => 20 },
137 { data_type => "varchar", default_value => 0, is_nullable => 1, size => 1 },
139 { data_type => "integer", is_nullable => 1 },
141 { data_type => "varchar", default_value => 0, is_nullable => 1, size => 1 },
143 { data_type => "varchar", is_nullable => 1, size => 20 },
145 { data_type => "integer", is_nullable => 1 },
147 { data_type => "varchar", is_nullable => 1, size => 20 },
149 { data_type => "integer", default_value => 0, is_nullable => 1 },
156 =item * L</overduerules_id>
162 __PACKAGE__->set_primary_key("overduerules_id");
164 =head1 UNIQUE CONSTRAINTS
166 =head2 C<overduerules_branch_cat>
170 =item * L</branchcode>
172 =item * L</categorycode>
178 __PACKAGE__->add_unique_constraint("overduerules_branch_cat", ["branchcode", "categorycode"]);
182 =head2 overduerules_transport_types
186 Related object: L<Koha::Schema::Result::OverduerulesTransportType>
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 },
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
201 sub koha_object_class {
204 sub koha_objects_class {
205 'Koha::OverdueRules';