2 package Koha::Schema::Result::Borrower;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Borrower
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<borrowers>
22 __PACKAGE__->table("borrowers");
32 primary key, Koha assigned ID number for patrons/borrowers
40 unique key, library assigned ID number for patrons/borrowers
47 patron/borrower's last name (surname)
51 data_type: 'mediumtext'
54 patron/borrower's first name
61 patron/borrower's title, for example: Mr. or Mrs.
68 any other names associated with the patron/borrower
72 data_type: 'mediumtext'
75 initials for your patron/borrower
82 the house number for your patron/borrower's primary address
89 the street type (Rd., Blvd, etc) for your patron/borrower's primary address
96 the first address line for your patron/borrower's primary address
100 data_type: 'mediumtext'
103 the second address line for your patron/borrower's primary address
107 data_type: 'longtext'
110 the city or town for your patron/borrower's primary address
114 data_type: 'mediumtext'
117 the state or province for your patron/borrower's primary address
121 data_type: 'tinytext'
124 the zip or postal code for your patron/borrower's primary address
128 data_type: 'mediumtext'
131 the country for your patron/borrower's primary address
135 data_type: 'longtext'
138 the primary email address for your patron/borrower's primary address
142 data_type: 'mediumtext'
145 the primary phone number for your patron/borrower's primary address
149 data_type: 'tinytext'
152 the other phone number for your patron/borrower's primary address
156 data_type: 'longtext'
159 the fax number for your patron/borrower's primary address
163 data_type: 'mediumtext'
166 the secondary email addres for your patron/borrower's primary address
170 data_type: 'mediumtext'
173 the secondary phone number for your patron/borrower's primary address
175 =head2 B_streetnumber
177 accessor: 'b_streetnumber'
178 data_type: 'tinytext'
181 the house number for your patron/borrower's alternate address
185 accessor: 'b_streettype'
186 data_type: 'tinytext'
189 the street type (Rd., Blvd, etc) for your patron/borrower's alternate address
193 accessor: 'b_address'
194 data_type: 'mediumtext'
197 the first address line for your patron/borrower's alternate address
201 accessor: 'b_address2'
202 data_type: 'mediumtext'
205 the second address line for your patron/borrower's alternate address
210 data_type: 'longtext'
213 the city or town for your patron/borrower's alternate address
218 data_type: 'mediumtext'
221 the state for your patron/borrower's alternate address
225 accessor: 'b_zipcode'
226 data_type: 'tinytext'
229 the zip or postal code for your patron/borrower's alternate address
233 accessor: 'b_country'
234 data_type: 'mediumtext'
237 the country for your patron/borrower's alternate address
242 data_type: 'mediumtext'
245 the patron/borrower's alternate email address
250 data_type: 'longtext'
253 the patron/borrower's alternate phone number
258 datetime_undef_if_invalid: 1
261 the patron/borrower's date of birth (YYYY-MM-DD)
266 default_value: (empty string)
271 foreign key from the branches table, includes the code of the patron/borrower's home branch
276 default_value: (empty string)
281 foreign key from the categories table, includes the code of the patron category
286 datetime_undef_if_invalid: 1
289 date the patron was added to Koha (YYYY-MM-DD)
294 datetime_undef_if_invalid: 1
297 date the patron/borrower's card is set to expire (YYYY-MM-DD)
302 datetime_undef_if_invalid: 1
305 date the patron/borrower's card was last renewed
312 set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having an unconfirmed address
319 set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having lost their card
324 datetime_undef_if_invalid: 1
327 until this date the patron can only check-in (no loans, no holds, etc.), is a fine based on days instead of money (YYYY-MM-DD)
329 =head2 debarredcomment
335 comment on the stop of the patron
339 data_type: 'longtext'
342 used for children and profesionals to include surname or last name of guarantor or organization name
344 =head2 contactfirstname
346 data_type: 'mediumtext'
349 used for children to include first name of guarantor
353 data_type: 'mediumtext'
356 used for children to include title (Mr., Mrs., etc) of guarantor
360 data_type: 'longtext'
363 a note on the patron/borrower's account that is only visible in the staff interface
371 used for children to include the relationship to their guarantor
379 patron/borrower's gender
387 patron/borrower's Bcrypt encrypted password
394 will include a number associated with the staff member's permissions
402 patron/borrower's opac and/or staff interface log in
406 data_type: 'longtext'
409 a note on the patron/borrower's account that is visible in the OPAC and staff interface
417 a note related to the patron/borrower's alternate address
425 a field that can be used for any information unique to the library
433 a field that can be used for any information unique to the library
435 =head2 altcontactfirstname
437 data_type: 'mediumtext'
440 first name of alternate contact for the patron/borrower
442 =head2 altcontactsurname
444 data_type: 'mediumtext'
447 surname or last name of the alternate contact for the patron/borrower
449 =head2 altcontactaddress1
451 data_type: 'mediumtext'
454 the first address line for the alternate contact for the patron/borrower
456 =head2 altcontactaddress2
458 data_type: 'mediumtext'
461 the second address line for the alternate contact for the patron/borrower
463 =head2 altcontactaddress3
465 data_type: 'mediumtext'
468 the city for the alternate contact for the patron/borrower
470 =head2 altcontactstate
472 data_type: 'mediumtext'
475 the state for the alternate contact for the patron/borrower
477 =head2 altcontactzipcode
479 data_type: 'mediumtext'
482 the zipcode for the alternate contact for the patron/borrower
484 =head2 altcontactcountry
486 data_type: 'mediumtext'
489 the country for the alternate contact for the patron/borrower
491 =head2 altcontactphone
493 data_type: 'mediumtext'
496 the phone number for the alternate contact for the patron/borrower
498 =head2 smsalertnumber
504 the mobile phone number where the patron/borrower would like to receive notices (if SMS turned on)
506 =head2 sms_provider_id
512 the provider of the mobile phone number defined in smsalertnumber
520 patron/borrower's privacy settings related to their checkout history
522 =head2 privacy_guarantor_fines
528 controls if relatives can see this patron's fines
530 =head2 privacy_guarantor_checkouts
536 controls if relatives can see this patron's checkouts
538 =head2 checkprevcheckout
541 default_value: 'inherit'
545 produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'.
549 data_type: 'timestamp'
550 datetime_undef_if_invalid: 1
551 default_value: current_timestamp
554 time of last change could be useful for synchronization with external systems (among others)
558 data_type: 'datetime'
559 datetime_undef_if_invalid: 1
562 last time a patron has been seen (connected at the OPAC or staff interface)
567 default_value: 'default'
571 lang to use to send notices to this patron
573 =head2 login_attempts
579 number of failed login attemps
581 =head2 overdrive_auth_token
583 data_type: 'mediumtext'
586 persist OverDrive auth token
594 flag for data anonymization
596 =head2 autorenew_checkouts
602 flag for allowing auto-renewal
604 =head2 primary_contact_method
610 useful for reporting purposes
614 __PACKAGE__->add_columns(
616 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
618 { data_type => "varchar", is_nullable => 1, size => 32 },
620 { data_type => "longtext", is_nullable => 1 },
622 { data_type => "mediumtext", is_nullable => 1 },
624 { data_type => "longtext", is_nullable => 1 },
626 { data_type => "longtext", is_nullable => 1 },
628 { data_type => "mediumtext", is_nullable => 1 },
630 { data_type => "tinytext", is_nullable => 1 },
632 { data_type => "tinytext", is_nullable => 1 },
634 { data_type => "longtext", is_nullable => 1 },
636 { data_type => "mediumtext", is_nullable => 1 },
638 { data_type => "longtext", is_nullable => 1 },
640 { data_type => "mediumtext", is_nullable => 1 },
642 { data_type => "tinytext", is_nullable => 1 },
644 { data_type => "mediumtext", is_nullable => 1 },
646 { data_type => "longtext", is_nullable => 1 },
648 { data_type => "mediumtext", is_nullable => 1 },
650 { data_type => "tinytext", is_nullable => 1 },
652 { data_type => "longtext", is_nullable => 1 },
654 { data_type => "mediumtext", is_nullable => 1 },
656 { data_type => "mediumtext", is_nullable => 1 },
658 { accessor => "b_streetnumber", data_type => "tinytext", is_nullable => 1 },
660 { accessor => "b_streettype", data_type => "tinytext", is_nullable => 1 },
662 { accessor => "b_address", data_type => "mediumtext", is_nullable => 1 },
664 { accessor => "b_address2", data_type => "mediumtext", is_nullable => 1 },
666 { accessor => "b_city", data_type => "longtext", is_nullable => 1 },
668 { accessor => "b_state", data_type => "mediumtext", is_nullable => 1 },
670 { accessor => "b_zipcode", data_type => "tinytext", is_nullable => 1 },
672 { accessor => "b_country", data_type => "mediumtext", is_nullable => 1 },
674 { accessor => "b_email", data_type => "mediumtext", is_nullable => 1 },
676 { accessor => "b_phone", data_type => "longtext", is_nullable => 1 },
678 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
681 data_type => "varchar",
689 data_type => "varchar",
696 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
698 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
700 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
702 { data_type => "tinyint", is_nullable => 1 },
704 { data_type => "tinyint", is_nullable => 1 },
706 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
708 { data_type => "varchar", is_nullable => 1, size => 255 },
710 { data_type => "longtext", is_nullable => 1 },
712 { data_type => "mediumtext", is_nullable => 1 },
714 { data_type => "mediumtext", is_nullable => 1 },
716 { data_type => "longtext", is_nullable => 1 },
718 { data_type => "varchar", is_nullable => 1, size => 100 },
720 { data_type => "varchar", is_nullable => 1, size => 1 },
722 { data_type => "varchar", is_nullable => 1, size => 60 },
724 { data_type => "integer", is_nullable => 1 },
726 { data_type => "varchar", is_nullable => 1, size => 75 },
728 { data_type => "longtext", is_nullable => 1 },
730 { data_type => "varchar", is_nullable => 1, size => 255 },
732 { data_type => "varchar", is_nullable => 1, size => 80 },
734 { data_type => "varchar", is_nullable => 1, size => 80 },
735 "altcontactfirstname",
736 { data_type => "mediumtext", is_nullable => 1 },
738 { data_type => "mediumtext", is_nullable => 1 },
739 "altcontactaddress1",
740 { data_type => "mediumtext", is_nullable => 1 },
741 "altcontactaddress2",
742 { data_type => "mediumtext", is_nullable => 1 },
743 "altcontactaddress3",
744 { data_type => "mediumtext", is_nullable => 1 },
746 { data_type => "mediumtext", is_nullable => 1 },
748 { data_type => "mediumtext", is_nullable => 1 },
750 { data_type => "mediumtext", is_nullable => 1 },
752 { data_type => "mediumtext", is_nullable => 1 },
754 { data_type => "varchar", is_nullable => 1, size => 50 },
756 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
758 { data_type => "integer", default_value => 1, is_nullable => 0 },
759 "privacy_guarantor_fines",
760 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
761 "privacy_guarantor_checkouts",
762 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
765 data_type => "varchar",
766 default_value => "inherit",
772 data_type => "timestamp",
773 datetime_undef_if_invalid => 1,
774 default_value => \"current_timestamp",
779 data_type => "datetime",
780 datetime_undef_if_invalid => 1,
785 data_type => "varchar",
786 default_value => "default",
791 { data_type => "integer", default_value => 0, is_nullable => 0 },
792 "overdrive_auth_token",
793 { data_type => "mediumtext", is_nullable => 1 },
795 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
796 "autorenew_checkouts",
797 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
798 "primary_contact_method",
799 { data_type => "varchar", is_nullable => 1, size => 45 },
806 =item * L</borrowernumber>
812 __PACKAGE__->set_primary_key("borrowernumber");
814 =head1 UNIQUE CONSTRAINTS
820 =item * L</cardnumber>
826 __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]);
838 __PACKAGE__->add_unique_constraint("userid", ["userid"]);
846 Related object: L<Koha::Schema::Result::Accountline>
850 __PACKAGE__->has_many(
852 "Koha::Schema::Result::Accountline",
853 { "foreign.borrowernumber" => "self.borrowernumber" },
854 { cascade_copy => 0, cascade_delete => 0 },
857 =head2 accountlines_managers
861 Related object: L<Koha::Schema::Result::Accountline>
865 __PACKAGE__->has_many(
866 "accountlines_managers",
867 "Koha::Schema::Result::Accountline",
868 { "foreign.manager_id" => "self.borrowernumber" },
869 { cascade_copy => 0, cascade_delete => 0 },
872 =head2 additional_contents
876 Related object: L<Koha::Schema::Result::AdditionalContent>
880 __PACKAGE__->has_many(
881 "additional_contents",
882 "Koha::Schema::Result::AdditionalContent",
883 { "foreign.borrowernumber" => "self.borrowernumber" },
884 { cascade_copy => 0, cascade_delete => 0 },
887 =head2 advanced_editor_macros
891 Related object: L<Koha::Schema::Result::AdvancedEditorMacro>
895 __PACKAGE__->has_many(
896 "advanced_editor_macros",
897 "Koha::Schema::Result::AdvancedEditorMacro",
898 { "foreign.borrowernumber" => "self.borrowernumber" },
899 { cascade_copy => 0, cascade_delete => 0 },
906 Related object: L<Koha::Schema::Result::Alert>
910 __PACKAGE__->has_many(
912 "Koha::Schema::Result::Alert",
913 { "foreign.borrowernumber" => "self.borrowernumber" },
914 { cascade_copy => 0, cascade_delete => 0 },
921 Related object: L<Koha::Schema::Result::ApiKey>
925 __PACKAGE__->has_many(
927 "Koha::Schema::Result::ApiKey",
928 { "foreign.patron_id" => "self.borrowernumber" },
929 { cascade_copy => 0, cascade_delete => 0 },
936 Related object: L<Koha::Schema::Result::Aqbasketuser>
940 __PACKAGE__->has_many(
942 "Koha::Schema::Result::Aqbasketuser",
943 { "foreign.borrowernumber" => "self.borrowernumber" },
944 { cascade_copy => 0, cascade_delete => 0 },
947 =head2 aqbudgetborrowers
951 Related object: L<Koha::Schema::Result::Aqbudgetborrower>
955 __PACKAGE__->has_many(
957 "Koha::Schema::Result::Aqbudgetborrower",
958 { "foreign.borrowernumber" => "self.borrowernumber" },
959 { cascade_copy => 0, cascade_delete => 0 },
966 Related object: L<Koha::Schema::Result::AqorderUser>
970 __PACKAGE__->has_many(
972 "Koha::Schema::Result::AqorderUser",
973 { "foreign.borrowernumber" => "self.borrowernumber" },
974 { cascade_copy => 0, cascade_delete => 0 },
981 Related object: L<Koha::Schema::Result::Aqorder>
985 __PACKAGE__->has_many(
987 "Koha::Schema::Result::Aqorder",
988 { "foreign.created_by" => "self.borrowernumber" },
989 { cascade_copy => 0, cascade_delete => 0 },
992 =head2 article_requests
996 Related object: L<Koha::Schema::Result::ArticleRequest>
1000 __PACKAGE__->has_many(
1002 "Koha::Schema::Result::ArticleRequest",
1003 { "foreign.borrowernumber" => "self.borrowernumber" },
1004 { cascade_copy => 0, cascade_delete => 0 },
1007 =head2 borrower_attributes
1011 Related object: L<Koha::Schema::Result::BorrowerAttribute>
1015 __PACKAGE__->has_many(
1016 "borrower_attributes",
1017 "Koha::Schema::Result::BorrowerAttribute",
1018 { "foreign.borrowernumber" => "self.borrowernumber" },
1019 { cascade_copy => 0, cascade_delete => 0 },
1022 =head2 borrower_debarments
1026 Related object: L<Koha::Schema::Result::BorrowerDebarment>
1030 __PACKAGE__->has_many(
1031 "borrower_debarments",
1032 "Koha::Schema::Result::BorrowerDebarment",
1033 { "foreign.borrowernumber" => "self.borrowernumber" },
1034 { cascade_copy => 0, cascade_delete => 0 },
1037 =head2 borrower_files
1041 Related object: L<Koha::Schema::Result::BorrowerFile>
1045 __PACKAGE__->has_many(
1047 "Koha::Schema::Result::BorrowerFile",
1048 { "foreign.borrowernumber" => "self.borrowernumber" },
1049 { cascade_copy => 0, cascade_delete => 0 },
1052 =head2 borrower_message_preferences
1056 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
1060 __PACKAGE__->has_many(
1061 "borrower_message_preferences",
1062 "Koha::Schema::Result::BorrowerMessagePreference",
1063 { "foreign.borrowernumber" => "self.borrowernumber" },
1064 { cascade_copy => 0, cascade_delete => 0 },
1067 =head2 borrower_relationships_guarantees
1071 Related object: L<Koha::Schema::Result::BorrowerRelationship>
1075 __PACKAGE__->has_many(
1076 "borrower_relationships_guarantees",
1077 "Koha::Schema::Result::BorrowerRelationship",
1078 { "foreign.guarantee_id" => "self.borrowernumber" },
1079 { cascade_copy => 0, cascade_delete => 0 },
1082 =head2 borrower_relationships_guarantors
1086 Related object: L<Koha::Schema::Result::BorrowerRelationship>
1090 __PACKAGE__->has_many(
1091 "borrower_relationships_guarantors",
1092 "Koha::Schema::Result::BorrowerRelationship",
1093 { "foreign.guarantor_id" => "self.borrowernumber" },
1094 { cascade_copy => 0, cascade_delete => 0 },
1101 Related object: L<Koha::Schema::Result::Branch>
1105 __PACKAGE__->belongs_to(
1107 "Koha::Schema::Result::Branch",
1108 { branchcode => "branchcode" },
1109 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
1112 =head2 cash_register_actions
1116 Related object: L<Koha::Schema::Result::CashRegisterAction>
1120 __PACKAGE__->has_many(
1121 "cash_register_actions",
1122 "Koha::Schema::Result::CashRegisterAction",
1123 { "foreign.manager_id" => "self.borrowernumber" },
1124 { cascade_copy => 0, cascade_delete => 0 },
1131 Related object: L<Koha::Schema::Result::Category>
1135 __PACKAGE__->belongs_to(
1137 "Koha::Schema::Result::Category",
1138 { categorycode => "categorycode" },
1139 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
1142 =head2 club_enrollments
1146 Related object: L<Koha::Schema::Result::ClubEnrollment>
1150 __PACKAGE__->has_many(
1152 "Koha::Schema::Result::ClubEnrollment",
1153 { "foreign.borrowernumber" => "self.borrowernumber" },
1154 { cascade_copy => 0, cascade_delete => 0 },
1157 =head2 club_holds_to_patron_holds
1161 Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold>
1165 __PACKAGE__->has_many(
1166 "club_holds_to_patron_holds",
1167 "Koha::Schema::Result::ClubHoldsToPatronHold",
1168 { "foreign.patron_id" => "self.borrowernumber" },
1169 { cascade_copy => 0, cascade_delete => 0 },
1172 =head2 course_instructors
1176 Related object: L<Koha::Schema::Result::CourseInstructor>
1180 __PACKAGE__->has_many(
1181 "course_instructors",
1182 "Koha::Schema::Result::CourseInstructor",
1183 { "foreign.borrowernumber" => "self.borrowernumber" },
1184 { cascade_copy => 0, cascade_delete => 0 },
1187 =head2 creator_batches
1191 Related object: L<Koha::Schema::Result::CreatorBatch>
1195 __PACKAGE__->has_many(
1197 "Koha::Schema::Result::CreatorBatch",
1198 { "foreign.borrower_number" => "self.borrowernumber" },
1199 { cascade_copy => 0, cascade_delete => 0 },
1206 Related object: L<Koha::Schema::Result::Discharge>
1210 __PACKAGE__->has_many(
1212 "Koha::Schema::Result::Discharge",
1213 { "foreign.borrower" => "self.borrowernumber" },
1214 { cascade_copy => 0, cascade_delete => 0 },
1217 =head2 hold_fill_targets
1221 Related object: L<Koha::Schema::Result::HoldFillTarget>
1225 __PACKAGE__->has_many(
1226 "hold_fill_targets",
1227 "Koha::Schema::Result::HoldFillTarget",
1228 { "foreign.borrowernumber" => "self.borrowernumber" },
1229 { cascade_copy => 0, cascade_delete => 0 },
1232 =head2 housebound_profile
1236 Related object: L<Koha::Schema::Result::HouseboundProfile>
1240 __PACKAGE__->might_have(
1241 "housebound_profile",
1242 "Koha::Schema::Result::HouseboundProfile",
1243 { "foreign.borrowernumber" => "self.borrowernumber" },
1244 { cascade_copy => 0, cascade_delete => 0 },
1247 =head2 housebound_role
1251 Related object: L<Koha::Schema::Result::HouseboundRole>
1255 __PACKAGE__->might_have(
1257 "Koha::Schema::Result::HouseboundRole",
1258 { "foreign.borrowernumber_id" => "self.borrowernumber" },
1259 { cascade_copy => 0, cascade_delete => 0 },
1262 =head2 housebound_visit_chooser_brwnumbers
1266 Related object: L<Koha::Schema::Result::HouseboundVisit>
1270 __PACKAGE__->has_many(
1271 "housebound_visit_chooser_brwnumbers",
1272 "Koha::Schema::Result::HouseboundVisit",
1273 { "foreign.chooser_brwnumber" => "self.borrowernumber" },
1274 { cascade_copy => 0, cascade_delete => 0 },
1277 =head2 housebound_visit_deliverer_brwnumbers
1281 Related object: L<Koha::Schema::Result::HouseboundVisit>
1285 __PACKAGE__->has_many(
1286 "housebound_visit_deliverer_brwnumbers",
1287 "Koha::Schema::Result::HouseboundVisit",
1288 { "foreign.deliverer_brwnumber" => "self.borrowernumber" },
1289 { cascade_copy => 0, cascade_delete => 0 },
1296 Related object: L<Koha::Schema::Result::Illcomment>
1300 __PACKAGE__->has_many(
1302 "Koha::Schema::Result::Illcomment",
1303 { "foreign.borrowernumber" => "self.borrowernumber" },
1304 { cascade_copy => 0, cascade_delete => 0 },
1311 Related object: L<Koha::Schema::Result::Illrequest>
1315 __PACKAGE__->has_many(
1317 "Koha::Schema::Result::Illrequest",
1318 { "foreign.borrowernumber" => "self.borrowernumber" },
1319 { cascade_copy => 0, cascade_delete => 0 },
1326 Related object: L<Koha::Schema::Result::Issue>
1330 __PACKAGE__->has_many(
1332 "Koha::Schema::Result::Issue",
1333 { "foreign.borrowernumber" => "self.borrowernumber" },
1334 { cascade_copy => 0, cascade_delete => 0 },
1337 =head2 issues_issuers
1341 Related object: L<Koha::Schema::Result::Issue>
1345 __PACKAGE__->has_many(
1347 "Koha::Schema::Result::Issue",
1348 { "foreign.issuer_id" => "self.borrowernumber" },
1349 { cascade_copy => 0, cascade_delete => 0 },
1352 =head2 items_last_borrowers
1356 Related object: L<Koha::Schema::Result::ItemsLastBorrower>
1360 __PACKAGE__->has_many(
1361 "items_last_borrowers",
1362 "Koha::Schema::Result::ItemsLastBorrower",
1363 { "foreign.borrowernumber" => "self.borrowernumber" },
1364 { cascade_copy => 0, cascade_delete => 0 },
1371 Related object: L<Koha::Schema::Result::Linktracker>
1375 __PACKAGE__->has_many(
1377 "Koha::Schema::Result::Linktracker",
1378 { "foreign.borrowernumber" => "self.borrowernumber" },
1379 { cascade_copy => 0, cascade_delete => 0 },
1382 =head2 message_queues
1386 Related object: L<Koha::Schema::Result::MessageQueue>
1390 __PACKAGE__->has_many(
1392 "Koha::Schema::Result::MessageQueue",
1393 { "foreign.borrowernumber" => "self.borrowernumber" },
1394 { cascade_copy => 0, cascade_delete => 0 },
1401 Related object: L<Koha::Schema::Result::Message>
1405 __PACKAGE__->has_many(
1407 "Koha::Schema::Result::Message",
1408 { "foreign.manager_id" => "self.borrowernumber" },
1409 { cascade_copy => 0, cascade_delete => 0 },
1412 =head2 messages_borrowernumbers
1416 Related object: L<Koha::Schema::Result::Message>
1420 __PACKAGE__->has_many(
1421 "messages_borrowernumbers",
1422 "Koha::Schema::Result::Message",
1423 { "foreign.borrowernumber" => "self.borrowernumber" },
1424 { cascade_copy => 0, cascade_delete => 0 },
1431 Related object: L<Koha::Schema::Result::OldIssue>
1435 __PACKAGE__->has_many(
1437 "Koha::Schema::Result::OldIssue",
1438 { "foreign.borrowernumber" => "self.borrowernumber" },
1439 { cascade_copy => 0, cascade_delete => 0 },
1442 =head2 old_issues_issuers
1446 Related object: L<Koha::Schema::Result::OldIssue>
1450 __PACKAGE__->has_many(
1451 "old_issues_issuers",
1452 "Koha::Schema::Result::OldIssue",
1453 { "foreign.issuer_id" => "self.borrowernumber" },
1454 { cascade_copy => 0, cascade_delete => 0 },
1461 Related object: L<Koha::Schema::Result::OldReserve>
1465 __PACKAGE__->has_many(
1467 "Koha::Schema::Result::OldReserve",
1468 { "foreign.borrowernumber" => "self.borrowernumber" },
1469 { cascade_copy => 0, cascade_delete => 0 },
1472 =head2 patron_consents
1476 Related object: L<Koha::Schema::Result::PatronConsent>
1480 __PACKAGE__->has_many(
1482 "Koha::Schema::Result::PatronConsent",
1483 { "foreign.borrowernumber" => "self.borrowernumber" },
1484 { cascade_copy => 0, cascade_delete => 0 },
1487 =head2 patron_list_patrons
1491 Related object: L<Koha::Schema::Result::PatronListPatron>
1495 __PACKAGE__->has_many(
1496 "patron_list_patrons",
1497 "Koha::Schema::Result::PatronListPatron",
1498 { "foreign.borrowernumber" => "self.borrowernumber" },
1499 { cascade_copy => 0, cascade_delete => 0 },
1506 Related object: L<Koha::Schema::Result::PatronList>
1510 __PACKAGE__->has_many(
1512 "Koha::Schema::Result::PatronList",
1513 { "foreign.owner" => "self.borrowernumber" },
1514 { cascade_copy => 0, cascade_delete => 0 },
1521 Related object: L<Koha::Schema::Result::Patronimage>
1525 __PACKAGE__->might_have(
1527 "Koha::Schema::Result::Patronimage",
1528 { "foreign.borrowernumber" => "self.borrowernumber" },
1529 { cascade_copy => 0, cascade_delete => 0 },
1532 =head2 problem_reports
1536 Related object: L<Koha::Schema::Result::ProblemReport>
1540 __PACKAGE__->has_many(
1542 "Koha::Schema::Result::ProblemReport",
1543 { "foreign.borrowernumber" => "self.borrowernumber" },
1544 { cascade_copy => 0, cascade_delete => 0 },
1551 Related object: L<Koha::Schema::Result::Rating>
1555 __PACKAGE__->has_many(
1557 "Koha::Schema::Result::Rating",
1558 { "foreign.borrowernumber" => "self.borrowernumber" },
1559 { cascade_copy => 0, cascade_delete => 0 },
1566 Related object: L<Koha::Schema::Result::Recall>
1570 __PACKAGE__->has_many(
1572 "Koha::Schema::Result::Recall",
1573 { "foreign.borrowernumber" => "self.borrowernumber" },
1574 { cascade_copy => 0, cascade_delete => 0 },
1581 Related object: L<Koha::Schema::Result::Reserve>
1585 __PACKAGE__->has_many(
1587 "Koha::Schema::Result::Reserve",
1588 { "foreign.borrowernumber" => "self.borrowernumber" },
1589 { cascade_copy => 0, cascade_delete => 0 },
1592 =head2 return_claims_borrowernumbers
1596 Related object: L<Koha::Schema::Result::ReturnClaim>
1600 __PACKAGE__->has_many(
1601 "return_claims_borrowernumbers",
1602 "Koha::Schema::Result::ReturnClaim",
1603 { "foreign.borrowernumber" => "self.borrowernumber" },
1604 { cascade_copy => 0, cascade_delete => 0 },
1607 =head2 return_claims_created_by
1611 Related object: L<Koha::Schema::Result::ReturnClaim>
1615 __PACKAGE__->has_many(
1616 "return_claims_created_by",
1617 "Koha::Schema::Result::ReturnClaim",
1618 { "foreign.created_by" => "self.borrowernumber" },
1619 { cascade_copy => 0, cascade_delete => 0 },
1622 =head2 return_claims_resolved_by
1626 Related object: L<Koha::Schema::Result::ReturnClaim>
1630 __PACKAGE__->has_many(
1631 "return_claims_resolved_by",
1632 "Koha::Schema::Result::ReturnClaim",
1633 { "foreign.resolved_by" => "self.borrowernumber" },
1634 { cascade_copy => 0, cascade_delete => 0 },
1637 =head2 return_claims_updated_by
1641 Related object: L<Koha::Schema::Result::ReturnClaim>
1645 __PACKAGE__->has_many(
1646 "return_claims_updated_by",
1647 "Koha::Schema::Result::ReturnClaim",
1648 { "foreign.updated_by" => "self.borrowernumber" },
1649 { cascade_copy => 0, cascade_delete => 0 },
1656 Related object: L<Koha::Schema::Result::Review>
1660 __PACKAGE__->has_many(
1662 "Koha::Schema::Result::Review",
1663 { "foreign.borrowernumber" => "self.borrowernumber" },
1664 { cascade_copy => 0, cascade_delete => 0 },
1671 Related object: L<Koha::Schema::Result::SmsProvider>
1675 __PACKAGE__->belongs_to(
1677 "Koha::Schema::Result::SmsProvider",
1678 { id => "sms_provider_id" },
1681 join_type => "LEFT",
1682 on_delete => "SET NULL",
1683 on_update => "CASCADE",
1687 =head2 subscriptionroutinglists
1691 Related object: L<Koha::Schema::Result::Subscriptionroutinglist>
1695 __PACKAGE__->has_many(
1696 "subscriptionroutinglists",
1697 "Koha::Schema::Result::Subscriptionroutinglist",
1698 { "foreign.borrowernumber" => "self.borrowernumber" },
1699 { cascade_copy => 0, cascade_delete => 0 },
1702 =head2 suggestions_acceptedbies
1706 Related object: L<Koha::Schema::Result::Suggestion>
1710 __PACKAGE__->has_many(
1711 "suggestions_acceptedbies",
1712 "Koha::Schema::Result::Suggestion",
1713 { "foreign.acceptedby" => "self.borrowernumber" },
1714 { cascade_copy => 0, cascade_delete => 0 },
1717 =head2 suggestions_lastmodificationbies
1721 Related object: L<Koha::Schema::Result::Suggestion>
1725 __PACKAGE__->has_many(
1726 "suggestions_lastmodificationbies",
1727 "Koha::Schema::Result::Suggestion",
1728 { "foreign.lastmodificationby" => "self.borrowernumber" },
1729 { cascade_copy => 0, cascade_delete => 0 },
1732 =head2 suggestions_managedbies
1736 Related object: L<Koha::Schema::Result::Suggestion>
1740 __PACKAGE__->has_many(
1741 "suggestions_managedbies",
1742 "Koha::Schema::Result::Suggestion",
1743 { "foreign.managedby" => "self.borrowernumber" },
1744 { cascade_copy => 0, cascade_delete => 0 },
1747 =head2 suggestions_rejectedbies
1751 Related object: L<Koha::Schema::Result::Suggestion>
1755 __PACKAGE__->has_many(
1756 "suggestions_rejectedbies",
1757 "Koha::Schema::Result::Suggestion",
1758 { "foreign.rejectedby" => "self.borrowernumber" },
1759 { cascade_copy => 0, cascade_delete => 0 },
1762 =head2 suggestions_suggestedbies
1766 Related object: L<Koha::Schema::Result::Suggestion>
1770 __PACKAGE__->has_many(
1771 "suggestions_suggestedbies",
1772 "Koha::Schema::Result::Suggestion",
1773 { "foreign.suggestedby" => "self.borrowernumber" },
1774 { cascade_copy => 0, cascade_delete => 0 },
1781 Related object: L<Koha::Schema::Result::TagAll>
1785 __PACKAGE__->has_many(
1787 "Koha::Schema::Result::TagAll",
1788 { "foreign.borrowernumber" => "self.borrowernumber" },
1789 { cascade_copy => 0, cascade_delete => 0 },
1792 =head2 tags_approvals
1796 Related object: L<Koha::Schema::Result::TagsApproval>
1800 __PACKAGE__->has_many(
1802 "Koha::Schema::Result::TagsApproval",
1803 { "foreign.approved_by" => "self.borrowernumber" },
1804 { cascade_copy => 0, cascade_delete => 0 },
1807 =head2 tmp_holdsqueues
1811 Related object: L<Koha::Schema::Result::TmpHoldsqueue>
1815 __PACKAGE__->has_many(
1817 "Koha::Schema::Result::TmpHoldsqueue",
1818 { "foreign.borrowernumber" => "self.borrowernumber" },
1819 { cascade_copy => 0, cascade_delete => 0 },
1822 =head2 user_permissions
1826 Related object: L<Koha::Schema::Result::UserPermission>
1830 __PACKAGE__->has_many(
1832 "Koha::Schema::Result::UserPermission",
1833 { "foreign.borrowernumber" => "self.borrowernumber" },
1834 { cascade_copy => 0, cascade_delete => 0 },
1837 =head2 virtualshelfcontents
1841 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
1845 __PACKAGE__->has_many(
1846 "virtualshelfcontents",
1847 "Koha::Schema::Result::Virtualshelfcontent",
1848 { "foreign.borrowernumber" => "self.borrowernumber" },
1849 { cascade_copy => 0, cascade_delete => 0 },
1852 =head2 virtualshelfshares
1856 Related object: L<Koha::Schema::Result::Virtualshelfshare>
1860 __PACKAGE__->has_many(
1861 "virtualshelfshares",
1862 "Koha::Schema::Result::Virtualshelfshare",
1863 { "foreign.borrowernumber" => "self.borrowernumber" },
1864 { cascade_copy => 0, cascade_delete => 0 },
1867 =head2 virtualshelves
1871 Related object: L<Koha::Schema::Result::Virtualshelve>
1875 __PACKAGE__->has_many(
1877 "Koha::Schema::Result::Virtualshelve",
1878 { "foreign.owner" => "self.borrowernumber" },
1879 { cascade_copy => 0, cascade_delete => 0 },
1886 Composing rels: L</aqbasketusers> -> basketno
1890 __PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno");
1896 Composing rels: L</aqbudgetborrowers> -> budget
1900 __PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget");
1906 Composing rels: L</course_instructors> -> course
1910 __PACKAGE__->many_to_many("courses", "course_instructors", "course");
1916 Composing rels: L</aqorder_users> -> ordernumber
1920 __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1926 Composing rels: L</user_permissions> -> permission
1930 __PACKAGE__->many_to_many("permissions", "user_permissions", "permission");
1933 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-15 06:51:43
1934 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ozDOfb67H7/GHLI0o4DdyA
1936 __PACKAGE__->has_many(
1937 "extended_attributes",
1938 "Koha::Schema::Result::BorrowerAttribute",
1939 { "foreign.borrowernumber" => "self.borrowernumber" },
1940 { cascade_copy => 0, cascade_delete => 0 },
1943 __PACKAGE__->add_columns(
1944 '+anonymized' => { is_boolean => 1 },
1945 '+lost' => { is_boolean => 1 },
1946 '+gonenoaddress' => { is_boolean => 1 },
1947 '+privacy_guarantor_fines' => { is_boolean => 1 },
1948 '+autorenew_checkouts' => { is_boolean => 1 }
1951 sub koha_objects_class {
1954 sub koha_object_class {