2 package Koha::Schema::Result::Category;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Category
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<categories>
22 __PACKAGE__->table("categories");
29 default_value: (empty string)
33 unique primary key used to idenfity the patron category
40 description of the patron category
42 =head2 enrolmentperiod
47 number of months the patron is enrolled for (will be NULL if enrolmentperioddate is set)
49 =head2 enrolmentperioddate
52 datetime_undef_if_invalid: 1
55 date the patron is enrolled until (will be NULL if enrolmentperiod is set)
57 =head2 password_expiry_days
62 number of days after which the patron must reset their password
69 age limit for the patron
71 =head2 dateofbirthrequired
76 the minimum age required for the patron category
97 enrollment fee for the patron
99 =head2 overduenoticerequired
104 are overdue notices sent to this patron category (1 for yes, 0 for no)
108 data_type: 'smallint'
127 are lost items shown to this category (1 for yes, 0 for no)
136 type of Koha patron (Adult, Child, Professional, Organizational, Statistical, Staff)
138 =head2 BlockExpiredPatronOpacActions
140 accessor: 'block_expired_patron_opac_actions'
145 wheither or not a patron of this category can renew books or place holds once their card has expired. 0 means they can, 1 means they cannot, -1 means use syspref BlockExpiredPatronOpacActions
147 =head2 default_privacy
150 default_value: 'default'
151 extra: {list => ["default","never","forever"]}
154 Default privacy setting for this patron category
156 =head2 checkprevcheckout
159 default_value: 'inherit'
163 produce a warning for this patron category if this item has previously been checked out to this patron if 'yes', not if 'no', defer to syspref setting if 'inherit'.
165 =head2 can_be_guarantee
171 if patrons of this category can be guarantees
173 =head2 reset_password
178 if patrons of this category can do the password reset flow,
180 =head2 change_password
185 if patrons of this category can change their passwords in the OAPC
187 =head2 min_password_length
189 data_type: 'smallint'
192 set minimum password length for patrons in this category
194 =head2 require_strong_password
199 set required password strength for patrons in this category
201 =head2 exclude_from_local_holds_priority
206 Exclude patrons of this category from local holds priority
210 __PACKAGE__->add_columns(
212 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
214 { data_type => "longtext", is_nullable => 1 },
216 { data_type => "smallint", is_nullable => 1 },
217 "enrolmentperioddate",
218 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
219 "password_expiry_days",
220 { data_type => "smallint", is_nullable => 1 },
222 { data_type => "smallint", is_nullable => 1 },
223 "dateofbirthrequired",
224 { data_type => "tinyint", is_nullable => 1 },
226 { data_type => "varchar", is_nullable => 1, size => 30 },
228 { data_type => "tinyint", is_nullable => 1 },
230 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
231 "overduenoticerequired",
232 { data_type => "tinyint", is_nullable => 1 },
234 { data_type => "smallint", is_nullable => 1 },
236 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
238 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
240 { data_type => "varchar", default_value => "A", is_nullable => 0, size => 1 },
241 "BlockExpiredPatronOpacActions",
243 accessor => "block_expired_patron_opac_actions",
244 data_type => "tinyint",
251 default_value => "default",
252 extra => { list => ["default", "never", "forever"] },
257 data_type => "varchar",
258 default_value => "inherit",
263 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
265 { data_type => "tinyint", is_nullable => 1 },
267 { data_type => "tinyint", is_nullable => 1 },
268 "min_password_length",
269 { data_type => "smallint", is_nullable => 1 },
270 "require_strong_password",
271 { data_type => "tinyint", is_nullable => 1 },
272 "exclude_from_local_holds_priority",
273 { data_type => "tinyint", is_nullable => 1 },
280 =item * L</categorycode>
286 __PACKAGE__->set_primary_key("categorycode");
290 =head2 borrower_attribute_types
294 Related object: L<Koha::Schema::Result::BorrowerAttributeType>
298 __PACKAGE__->has_many(
299 "borrower_attribute_types",
300 "Koha::Schema::Result::BorrowerAttributeType",
301 { "foreign.category_code" => "self.categorycode" },
302 { cascade_copy => 0, cascade_delete => 0 },
305 =head2 borrower_message_preferences
309 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
313 __PACKAGE__->has_many(
314 "borrower_message_preferences",
315 "Koha::Schema::Result::BorrowerMessagePreference",
316 { "foreign.categorycode" => "self.categorycode" },
317 { cascade_copy => 0, cascade_delete => 0 },
324 Related object: L<Koha::Schema::Result::Borrower>
328 __PACKAGE__->has_many(
330 "Koha::Schema::Result::Borrower",
331 { "foreign.categorycode" => "self.categorycode" },
332 { cascade_copy => 0, cascade_delete => 0 },
335 =head2 categories_branches
339 Related object: L<Koha::Schema::Result::CategoriesBranch>
343 __PACKAGE__->has_many(
344 "categories_branches",
345 "Koha::Schema::Result::CategoriesBranch",
346 { "foreign.categorycode" => "self.categorycode" },
347 { cascade_copy => 0, cascade_delete => 0 },
350 =head2 circulation_rules
354 Related object: L<Koha::Schema::Result::CirculationRule>
358 __PACKAGE__->has_many(
360 "Koha::Schema::Result::CirculationRule",
361 { "foreign.categorycode" => "self.categorycode" },
362 { cascade_copy => 0, cascade_delete => 0 },
365 =head2 identity_provider_domains
369 Related object: L<Koha::Schema::Result::IdentityProviderDomain>
373 __PACKAGE__->has_many(
374 "identity_provider_domains",
375 "Koha::Schema::Result::IdentityProviderDomain",
376 { "foreign.default_category_id" => "self.categorycode" },
377 { cascade_copy => 0, cascade_delete => 0 },
381 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-08 17:35:26
382 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B89OgAY/KnJbQaHpu5Xdfg
384 sub koha_object_class {
385 'Koha::Patron::Category';
387 sub koha_objects_class {
388 'Koha::Patron::Categories';
391 __PACKAGE__->add_columns(
392 '+can_be_guarantee' => { is_boolean => 1 },
393 '+exclude_from_local_holds_priority' => { is_boolean => 1 },
394 '+require_strong_password' => { is_boolean => 1 },