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 middle name
68 patron/borrower's title, for example: Mr. or Mrs.
75 any other names associated with the patron/borrower
79 data_type: 'mediumtext'
82 initials for your patron/borrower
89 the house number for your patron/borrower's primary address
96 the street type (Rd., Blvd, etc) for your patron/borrower's primary address
100 data_type: 'longtext'
103 the first address line for your patron/borrower's primary address
107 data_type: 'mediumtext'
110 the second address line for your patron/borrower's primary address
114 data_type: 'longtext'
117 the city or town for your patron/borrower's primary address
121 data_type: 'mediumtext'
124 the state or province for your patron/borrower's primary address
128 data_type: 'tinytext'
131 the zip or postal code for your patron/borrower's primary address
135 data_type: 'mediumtext'
138 the country for your patron/borrower's primary address
142 data_type: 'longtext'
145 the primary email address for your patron/borrower's primary address
149 data_type: 'mediumtext'
152 the primary phone number for your patron/borrower's primary address
156 data_type: 'tinytext'
159 the other phone number for your patron/borrower's primary address
163 data_type: 'longtext'
166 the fax number for your patron/borrower's primary address
170 data_type: 'mediumtext'
173 the secondary email addres for your patron/borrower's primary address
177 data_type: 'mediumtext'
180 the secondary phone number for your patron/borrower's primary address
182 =head2 B_streetnumber
184 accessor: 'b_streetnumber'
185 data_type: 'tinytext'
188 the house number for your patron/borrower's alternate address
192 accessor: 'b_streettype'
193 data_type: 'tinytext'
196 the street type (Rd., Blvd, etc) for your patron/borrower's alternate address
200 accessor: 'b_address'
201 data_type: 'mediumtext'
204 the first address line for your patron/borrower's alternate address
208 accessor: 'b_address2'
209 data_type: 'mediumtext'
212 the second address line for your patron/borrower's alternate address
217 data_type: 'longtext'
220 the city or town for your patron/borrower's alternate address
225 data_type: 'mediumtext'
228 the state for your patron/borrower's alternate address
232 accessor: 'b_zipcode'
233 data_type: 'tinytext'
236 the zip or postal code for your patron/borrower's alternate address
240 accessor: 'b_country'
241 data_type: 'mediumtext'
244 the country for your patron/borrower's alternate address
249 data_type: 'mediumtext'
252 the patron/borrower's alternate email address
257 data_type: 'longtext'
260 the patron/borrower's alternate phone number
265 datetime_undef_if_invalid: 1
268 the patron/borrower's date of birth (YYYY-MM-DD)
273 default_value: (empty string)
278 foreign key from the branches table, includes the code of the patron/borrower's home branch
283 default_value: (empty string)
288 foreign key from the categories table, includes the code of the patron category
293 datetime_undef_if_invalid: 1
296 date the patron was added to Koha (YYYY-MM-DD)
301 datetime_undef_if_invalid: 1
304 date the patron/borrower's card is set to expire (YYYY-MM-DD)
306 =head2 password_expiration_date
309 datetime_undef_if_invalid: 1
312 date the patron/borrower's password is set to expire (YYYY-MM-DD)
317 datetime_undef_if_invalid: 1
320 date the patron/borrower's card was last renewed
327 set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having an unconfirmed address
334 set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having lost their card
339 datetime_undef_if_invalid: 1
342 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)
344 =head2 debarredcomment
350 comment on the stop of the patron
354 data_type: 'longtext'
357 used for children and profesionals to include surname or last name of guarantor or organization name
359 =head2 contactfirstname
361 data_type: 'mediumtext'
364 used for children to include first name of guarantor
368 data_type: 'mediumtext'
371 used for children to include title (Mr., Mrs., etc) of guarantor
375 data_type: 'longtext'
378 a note on the patron/borrower's account that is only visible in the staff interface
386 used for children to include the relationship to their guarantor
394 patron/borrower's gender
402 patron/borrower's Bcrypt encrypted password
406 data_type: 'mediumtext'
414 default_value: 'password'
415 extra: {list => ["password","two-factor"]}
418 Authentication method
425 will include a number associated with the staff member's permissions
433 patron/borrower's opac and/or staff interface log in
437 data_type: 'longtext'
440 a note on the patron/borrower's account that is visible in the OPAC and staff interface
448 a note related to the patron/borrower's alternate address
456 a field that can be used for any information unique to the library
464 a field that can be used for any information unique to the library
466 =head2 altcontactfirstname
468 data_type: 'mediumtext'
471 first name of alternate contact for the patron/borrower
473 =head2 altcontactsurname
475 data_type: 'mediumtext'
478 surname or last name of the alternate contact for the patron/borrower
480 =head2 altcontactaddress1
482 data_type: 'mediumtext'
485 the first address line for the alternate contact for the patron/borrower
487 =head2 altcontactaddress2
489 data_type: 'mediumtext'
492 the second address line for the alternate contact for the patron/borrower
494 =head2 altcontactaddress3
496 data_type: 'mediumtext'
499 the city for the alternate contact for the patron/borrower
501 =head2 altcontactstate
503 data_type: 'mediumtext'
506 the state for the alternate contact for the patron/borrower
508 =head2 altcontactzipcode
510 data_type: 'mediumtext'
513 the zipcode for the alternate contact for the patron/borrower
515 =head2 altcontactcountry
517 data_type: 'mediumtext'
520 the country for the alternate contact for the patron/borrower
522 =head2 altcontactphone
524 data_type: 'mediumtext'
527 the phone number for the alternate contact for the patron/borrower
529 =head2 smsalertnumber
535 the mobile phone number where the patron/borrower would like to receive notices (if SMS turned on)
537 =head2 sms_provider_id
543 the provider of the mobile phone number defined in smsalertnumber
551 patron/borrower's privacy settings related to their checkout history
553 =head2 privacy_guarantor_fines
559 controls if relatives can see this patron's fines
561 =head2 privacy_guarantor_checkouts
567 controls if relatives can see this patron's checkouts
569 =head2 checkprevcheckout
572 default_value: 'inherit'
576 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'.
580 data_type: 'timestamp'
581 datetime_undef_if_invalid: 1
582 default_value: current_timestamp
585 time of last change could be useful for synchronization with external systems (among others)
589 data_type: 'datetime'
590 datetime_undef_if_invalid: 1
593 last time a patron has been seen (connected at the OPAC or staff interface)
598 default_value: 'default'
602 lang to use to send notices to this patron
604 =head2 login_attempts
610 number of failed login attemps
612 =head2 overdrive_auth_token
614 data_type: 'mediumtext'
617 persist OverDrive auth token
625 flag for data anonymization
627 =head2 autorenew_checkouts
633 flag for allowing auto-renewal
635 =head2 primary_contact_method
641 useful for reporting purposes
645 __PACKAGE__->add_columns(
647 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
649 { data_type => "varchar", is_nullable => 1, size => 32 },
651 { data_type => "longtext", is_nullable => 1 },
653 { data_type => "mediumtext", is_nullable => 1 },
655 { data_type => "longtext", is_nullable => 1 },
657 { data_type => "longtext", is_nullable => 1 },
659 { data_type => "longtext", is_nullable => 1 },
661 { data_type => "mediumtext", is_nullable => 1 },
663 { data_type => "tinytext", is_nullable => 1 },
665 { data_type => "tinytext", is_nullable => 1 },
667 { data_type => "longtext", is_nullable => 1 },
669 { data_type => "mediumtext", is_nullable => 1 },
671 { data_type => "longtext", is_nullable => 1 },
673 { data_type => "mediumtext", is_nullable => 1 },
675 { data_type => "tinytext", is_nullable => 1 },
677 { data_type => "mediumtext", is_nullable => 1 },
679 { data_type => "longtext", is_nullable => 1 },
681 { data_type => "mediumtext", is_nullable => 1 },
683 { data_type => "tinytext", is_nullable => 1 },
685 { data_type => "longtext", is_nullable => 1 },
687 { data_type => "mediumtext", is_nullable => 1 },
689 { data_type => "mediumtext", is_nullable => 1 },
691 { accessor => "b_streetnumber", data_type => "tinytext", is_nullable => 1 },
693 { accessor => "b_streettype", data_type => "tinytext", is_nullable => 1 },
695 { accessor => "b_address", data_type => "mediumtext", is_nullable => 1 },
697 { accessor => "b_address2", data_type => "mediumtext", is_nullable => 1 },
699 { accessor => "b_city", data_type => "longtext", is_nullable => 1 },
701 { accessor => "b_state", data_type => "mediumtext", is_nullable => 1 },
703 { accessor => "b_zipcode", data_type => "tinytext", is_nullable => 1 },
705 { accessor => "b_country", data_type => "mediumtext", is_nullable => 1 },
707 { accessor => "b_email", data_type => "mediumtext", is_nullable => 1 },
709 { accessor => "b_phone", data_type => "longtext", is_nullable => 1 },
711 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
714 data_type => "varchar",
722 data_type => "varchar",
729 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
731 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
732 "password_expiration_date",
733 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
735 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
737 { data_type => "tinyint", is_nullable => 1 },
739 { data_type => "tinyint", is_nullable => 1 },
741 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
743 { data_type => "varchar", is_nullable => 1, size => 255 },
745 { data_type => "longtext", is_nullable => 1 },
747 { data_type => "mediumtext", is_nullable => 1 },
749 { data_type => "mediumtext", is_nullable => 1 },
751 { data_type => "longtext", is_nullable => 1 },
753 { data_type => "varchar", is_nullable => 1, size => 100 },
755 { data_type => "varchar", is_nullable => 1, size => 1 },
757 { data_type => "varchar", is_nullable => 1, size => 60 },
759 { data_type => "mediumtext", is_nullable => 1 },
763 default_value => "password",
764 extra => { list => ["password", "two-factor"] },
768 { data_type => "integer", is_nullable => 1 },
770 { data_type => "varchar", is_nullable => 1, size => 75 },
772 { data_type => "longtext", is_nullable => 1 },
774 { data_type => "varchar", is_nullable => 1, size => 255 },
776 { data_type => "varchar", is_nullable => 1, size => 80 },
778 { data_type => "varchar", is_nullable => 1, size => 80 },
779 "altcontactfirstname",
780 { data_type => "mediumtext", is_nullable => 1 },
782 { data_type => "mediumtext", is_nullable => 1 },
783 "altcontactaddress1",
784 { data_type => "mediumtext", is_nullable => 1 },
785 "altcontactaddress2",
786 { data_type => "mediumtext", is_nullable => 1 },
787 "altcontactaddress3",
788 { data_type => "mediumtext", is_nullable => 1 },
790 { data_type => "mediumtext", is_nullable => 1 },
792 { data_type => "mediumtext", is_nullable => 1 },
794 { data_type => "mediumtext", is_nullable => 1 },
796 { data_type => "mediumtext", is_nullable => 1 },
798 { data_type => "varchar", is_nullable => 1, size => 50 },
800 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
802 { data_type => "integer", default_value => 1, is_nullable => 0 },
803 "privacy_guarantor_fines",
804 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
805 "privacy_guarantor_checkouts",
806 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
809 data_type => "varchar",
810 default_value => "inherit",
816 data_type => "timestamp",
817 datetime_undef_if_invalid => 1,
818 default_value => \"current_timestamp",
823 data_type => "datetime",
824 datetime_undef_if_invalid => 1,
829 data_type => "varchar",
830 default_value => "default",
835 { data_type => "integer", default_value => 0, is_nullable => 0 },
836 "overdrive_auth_token",
837 { data_type => "mediumtext", is_nullable => 1 },
839 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
840 "autorenew_checkouts",
841 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
842 "primary_contact_method",
843 { data_type => "varchar", is_nullable => 1, size => 45 },
850 =item * L</borrowernumber>
856 __PACKAGE__->set_primary_key("borrowernumber");
858 =head1 UNIQUE CONSTRAINTS
864 =item * L</cardnumber>
870 __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]);
882 __PACKAGE__->add_unique_constraint("userid", ["userid"]);
890 Related object: L<Koha::Schema::Result::Accountline>
894 __PACKAGE__->has_many(
896 "Koha::Schema::Result::Accountline",
897 { "foreign.borrowernumber" => "self.borrowernumber" },
898 { cascade_copy => 0, cascade_delete => 0 },
901 =head2 accountlines_managers
905 Related object: L<Koha::Schema::Result::Accountline>
909 __PACKAGE__->has_many(
910 "accountlines_managers",
911 "Koha::Schema::Result::Accountline",
912 { "foreign.manager_id" => "self.borrowernumber" },
913 { cascade_copy => 0, cascade_delete => 0 },
916 =head2 additional_contents
920 Related object: L<Koha::Schema::Result::AdditionalContent>
924 __PACKAGE__->has_many(
925 "additional_contents",
926 "Koha::Schema::Result::AdditionalContent",
927 { "foreign.borrowernumber" => "self.borrowernumber" },
928 { cascade_copy => 0, cascade_delete => 0 },
931 =head2 advanced_editor_macros
935 Related object: L<Koha::Schema::Result::AdvancedEditorMacro>
939 __PACKAGE__->has_many(
940 "advanced_editor_macros",
941 "Koha::Schema::Result::AdvancedEditorMacro",
942 { "foreign.borrowernumber" => "self.borrowernumber" },
943 { cascade_copy => 0, cascade_delete => 0 },
950 Related object: L<Koha::Schema::Result::Alert>
954 __PACKAGE__->has_many(
956 "Koha::Schema::Result::Alert",
957 { "foreign.borrowernumber" => "self.borrowernumber" },
958 { cascade_copy => 0, cascade_delete => 0 },
965 Related object: L<Koha::Schema::Result::ApiKey>
969 __PACKAGE__->has_many(
971 "Koha::Schema::Result::ApiKey",
972 { "foreign.patron_id" => "self.borrowernumber" },
973 { cascade_copy => 0, cascade_delete => 0 },
980 Related object: L<Koha::Schema::Result::Aqbasketuser>
984 __PACKAGE__->has_many(
986 "Koha::Schema::Result::Aqbasketuser",
987 { "foreign.borrowernumber" => "self.borrowernumber" },
988 { cascade_copy => 0, cascade_delete => 0 },
991 =head2 aqbudgetborrowers
995 Related object: L<Koha::Schema::Result::Aqbudgetborrower>
999 __PACKAGE__->has_many(
1000 "aqbudgetborrowers",
1001 "Koha::Schema::Result::Aqbudgetborrower",
1002 { "foreign.borrowernumber" => "self.borrowernumber" },
1003 { cascade_copy => 0, cascade_delete => 0 },
1006 =head2 aqorder_users
1010 Related object: L<Koha::Schema::Result::AqorderUser>
1014 __PACKAGE__->has_many(
1016 "Koha::Schema::Result::AqorderUser",
1017 { "foreign.borrowernumber" => "self.borrowernumber" },
1018 { cascade_copy => 0, cascade_delete => 0 },
1025 Related object: L<Koha::Schema::Result::Aqorder>
1029 __PACKAGE__->has_many(
1031 "Koha::Schema::Result::Aqorder",
1032 { "foreign.created_by" => "self.borrowernumber" },
1033 { cascade_copy => 0, cascade_delete => 0 },
1036 =head2 article_requests
1040 Related object: L<Koha::Schema::Result::ArticleRequest>
1044 __PACKAGE__->has_many(
1046 "Koha::Schema::Result::ArticleRequest",
1047 { "foreign.borrowernumber" => "self.borrowernumber" },
1048 { cascade_copy => 0, cascade_delete => 0 },
1051 =head2 borrower_attributes
1055 Related object: L<Koha::Schema::Result::BorrowerAttribute>
1059 __PACKAGE__->has_many(
1060 "borrower_attributes",
1061 "Koha::Schema::Result::BorrowerAttribute",
1062 { "foreign.borrowernumber" => "self.borrowernumber" },
1063 { cascade_copy => 0, cascade_delete => 0 },
1066 =head2 borrower_debarments
1070 Related object: L<Koha::Schema::Result::BorrowerDebarment>
1074 __PACKAGE__->has_many(
1075 "borrower_debarments",
1076 "Koha::Schema::Result::BorrowerDebarment",
1077 { "foreign.borrowernumber" => "self.borrowernumber" },
1078 { cascade_copy => 0, cascade_delete => 0 },
1081 =head2 borrower_files
1085 Related object: L<Koha::Schema::Result::BorrowerFile>
1089 __PACKAGE__->has_many(
1091 "Koha::Schema::Result::BorrowerFile",
1092 { "foreign.borrowernumber" => "self.borrowernumber" },
1093 { cascade_copy => 0, cascade_delete => 0 },
1096 =head2 borrower_message_preferences
1100 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
1104 __PACKAGE__->has_many(
1105 "borrower_message_preferences",
1106 "Koha::Schema::Result::BorrowerMessagePreference",
1107 { "foreign.borrowernumber" => "self.borrowernumber" },
1108 { cascade_copy => 0, cascade_delete => 0 },
1111 =head2 borrower_relationships_guarantees
1115 Related object: L<Koha::Schema::Result::BorrowerRelationship>
1119 __PACKAGE__->has_many(
1120 "borrower_relationships_guarantees",
1121 "Koha::Schema::Result::BorrowerRelationship",
1122 { "foreign.guarantee_id" => "self.borrowernumber" },
1123 { cascade_copy => 0, cascade_delete => 0 },
1126 =head2 borrower_relationships_guarantors
1130 Related object: L<Koha::Schema::Result::BorrowerRelationship>
1134 __PACKAGE__->has_many(
1135 "borrower_relationships_guarantors",
1136 "Koha::Schema::Result::BorrowerRelationship",
1137 { "foreign.guarantor_id" => "self.borrowernumber" },
1138 { cascade_copy => 0, cascade_delete => 0 },
1145 Related object: L<Koha::Schema::Result::Branch>
1149 __PACKAGE__->belongs_to(
1151 "Koha::Schema::Result::Branch",
1152 { branchcode => "branchcode" },
1153 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
1156 =head2 cash_register_actions
1160 Related object: L<Koha::Schema::Result::CashRegisterAction>
1164 __PACKAGE__->has_many(
1165 "cash_register_actions",
1166 "Koha::Schema::Result::CashRegisterAction",
1167 { "foreign.manager_id" => "self.borrowernumber" },
1168 { cascade_copy => 0, cascade_delete => 0 },
1175 Related object: L<Koha::Schema::Result::Category>
1179 __PACKAGE__->belongs_to(
1181 "Koha::Schema::Result::Category",
1182 { categorycode => "categorycode" },
1183 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
1186 =head2 checkout_renewals
1190 Related object: L<Koha::Schema::Result::CheckoutRenewal>
1194 __PACKAGE__->has_many(
1195 "checkout_renewals",
1196 "Koha::Schema::Result::CheckoutRenewal",
1197 { "foreign.renewer_id" => "self.borrowernumber" },
1198 { cascade_copy => 0, cascade_delete => 0 },
1201 =head2 club_enrollments
1205 Related object: L<Koha::Schema::Result::ClubEnrollment>
1209 __PACKAGE__->has_many(
1211 "Koha::Schema::Result::ClubEnrollment",
1212 { "foreign.borrowernumber" => "self.borrowernumber" },
1213 { cascade_copy => 0, cascade_delete => 0 },
1216 =head2 club_holds_to_patron_holds
1220 Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold>
1224 __PACKAGE__->has_many(
1225 "club_holds_to_patron_holds",
1226 "Koha::Schema::Result::ClubHoldsToPatronHold",
1227 { "foreign.patron_id" => "self.borrowernumber" },
1228 { cascade_copy => 0, cascade_delete => 0 },
1231 =head2 course_instructors
1235 Related object: L<Koha::Schema::Result::CourseInstructor>
1239 __PACKAGE__->has_many(
1240 "course_instructors",
1241 "Koha::Schema::Result::CourseInstructor",
1242 { "foreign.borrowernumber" => "self.borrowernumber" },
1243 { cascade_copy => 0, cascade_delete => 0 },
1246 =head2 creator_batches
1250 Related object: L<Koha::Schema::Result::CreatorBatch>
1254 __PACKAGE__->has_many(
1256 "Koha::Schema::Result::CreatorBatch",
1257 { "foreign.borrower_number" => "self.borrowernumber" },
1258 { cascade_copy => 0, cascade_delete => 0 },
1265 Related object: L<Koha::Schema::Result::Discharge>
1269 __PACKAGE__->has_many(
1271 "Koha::Schema::Result::Discharge",
1272 { "foreign.borrower" => "self.borrowernumber" },
1273 { cascade_copy => 0, cascade_delete => 0 },
1276 =head2 hold_fill_targets
1280 Related object: L<Koha::Schema::Result::HoldFillTarget>
1284 __PACKAGE__->has_many(
1285 "hold_fill_targets",
1286 "Koha::Schema::Result::HoldFillTarget",
1287 { "foreign.borrowernumber" => "self.borrowernumber" },
1288 { cascade_copy => 0, cascade_delete => 0 },
1291 =head2 housebound_profile
1295 Related object: L<Koha::Schema::Result::HouseboundProfile>
1299 __PACKAGE__->might_have(
1300 "housebound_profile",
1301 "Koha::Schema::Result::HouseboundProfile",
1302 { "foreign.borrowernumber" => "self.borrowernumber" },
1303 { cascade_copy => 0, cascade_delete => 0 },
1306 =head2 housebound_role
1310 Related object: L<Koha::Schema::Result::HouseboundRole>
1314 __PACKAGE__->might_have(
1316 "Koha::Schema::Result::HouseboundRole",
1317 { "foreign.borrowernumber_id" => "self.borrowernumber" },
1318 { cascade_copy => 0, cascade_delete => 0 },
1321 =head2 housebound_visit_chooser_brwnumbers
1325 Related object: L<Koha::Schema::Result::HouseboundVisit>
1329 __PACKAGE__->has_many(
1330 "housebound_visit_chooser_brwnumbers",
1331 "Koha::Schema::Result::HouseboundVisit",
1332 { "foreign.chooser_brwnumber" => "self.borrowernumber" },
1333 { cascade_copy => 0, cascade_delete => 0 },
1336 =head2 housebound_visit_deliverer_brwnumbers
1340 Related object: L<Koha::Schema::Result::HouseboundVisit>
1344 __PACKAGE__->has_many(
1345 "housebound_visit_deliverer_brwnumbers",
1346 "Koha::Schema::Result::HouseboundVisit",
1347 { "foreign.deliverer_brwnumber" => "self.borrowernumber" },
1348 { cascade_copy => 0, cascade_delete => 0 },
1355 Related object: L<Koha::Schema::Result::Illcomment>
1359 __PACKAGE__->has_many(
1361 "Koha::Schema::Result::Illcomment",
1362 { "foreign.borrowernumber" => "self.borrowernumber" },
1363 { cascade_copy => 0, cascade_delete => 0 },
1370 Related object: L<Koha::Schema::Result::Illrequest>
1374 __PACKAGE__->has_many(
1376 "Koha::Schema::Result::Illrequest",
1377 { "foreign.borrowernumber" => "self.borrowernumber" },
1378 { cascade_copy => 0, cascade_delete => 0 },
1385 Related object: L<Koha::Schema::Result::Issue>
1389 __PACKAGE__->has_many(
1391 "Koha::Schema::Result::Issue",
1392 { "foreign.borrowernumber" => "self.borrowernumber" },
1393 { cascade_copy => 0, cascade_delete => 0 },
1396 =head2 issues_issuers
1400 Related object: L<Koha::Schema::Result::Issue>
1404 __PACKAGE__->has_many(
1406 "Koha::Schema::Result::Issue",
1407 { "foreign.issuer_id" => "self.borrowernumber" },
1408 { cascade_copy => 0, cascade_delete => 0 },
1411 =head2 items_last_borrowers
1415 Related object: L<Koha::Schema::Result::ItemsLastBorrower>
1419 __PACKAGE__->has_many(
1420 "items_last_borrowers",
1421 "Koha::Schema::Result::ItemsLastBorrower",
1422 { "foreign.borrowernumber" => "self.borrowernumber" },
1423 { cascade_copy => 0, cascade_delete => 0 },
1430 Related object: L<Koha::Schema::Result::Linktracker>
1434 __PACKAGE__->has_many(
1436 "Koha::Schema::Result::Linktracker",
1437 { "foreign.borrowernumber" => "self.borrowernumber" },
1438 { cascade_copy => 0, cascade_delete => 0 },
1441 =head2 message_queues
1445 Related object: L<Koha::Schema::Result::MessageQueue>
1449 __PACKAGE__->has_many(
1451 "Koha::Schema::Result::MessageQueue",
1452 { "foreign.borrowernumber" => "self.borrowernumber" },
1453 { cascade_copy => 0, cascade_delete => 0 },
1460 Related object: L<Koha::Schema::Result::Message>
1464 __PACKAGE__->has_many(
1466 "Koha::Schema::Result::Message",
1467 { "foreign.manager_id" => "self.borrowernumber" },
1468 { cascade_copy => 0, cascade_delete => 0 },
1471 =head2 messages_borrowernumbers
1475 Related object: L<Koha::Schema::Result::Message>
1479 __PACKAGE__->has_many(
1480 "messages_borrowernumbers",
1481 "Koha::Schema::Result::Message",
1482 { "foreign.borrowernumber" => "self.borrowernumber" },
1483 { cascade_copy => 0, cascade_delete => 0 },
1490 Related object: L<Koha::Schema::Result::OldIssue>
1494 __PACKAGE__->has_many(
1496 "Koha::Schema::Result::OldIssue",
1497 { "foreign.borrowernumber" => "self.borrowernumber" },
1498 { cascade_copy => 0, cascade_delete => 0 },
1501 =head2 old_issues_issuers
1505 Related object: L<Koha::Schema::Result::OldIssue>
1509 __PACKAGE__->has_many(
1510 "old_issues_issuers",
1511 "Koha::Schema::Result::OldIssue",
1512 { "foreign.issuer_id" => "self.borrowernumber" },
1513 { cascade_copy => 0, cascade_delete => 0 },
1520 Related object: L<Koha::Schema::Result::OldReserve>
1524 __PACKAGE__->has_many(
1526 "Koha::Schema::Result::OldReserve",
1527 { "foreign.borrowernumber" => "self.borrowernumber" },
1528 { cascade_copy => 0, cascade_delete => 0 },
1531 =head2 patron_consents
1535 Related object: L<Koha::Schema::Result::PatronConsent>
1539 __PACKAGE__->has_many(
1541 "Koha::Schema::Result::PatronConsent",
1542 { "foreign.borrowernumber" => "self.borrowernumber" },
1543 { cascade_copy => 0, cascade_delete => 0 },
1546 =head2 patron_list_patrons
1550 Related object: L<Koha::Schema::Result::PatronListPatron>
1554 __PACKAGE__->has_many(
1555 "patron_list_patrons",
1556 "Koha::Schema::Result::PatronListPatron",
1557 { "foreign.borrowernumber" => "self.borrowernumber" },
1558 { cascade_copy => 0, cascade_delete => 0 },
1565 Related object: L<Koha::Schema::Result::PatronList>
1569 __PACKAGE__->has_many(
1571 "Koha::Schema::Result::PatronList",
1572 { "foreign.owner" => "self.borrowernumber" },
1573 { cascade_copy => 0, cascade_delete => 0 },
1580 Related object: L<Koha::Schema::Result::Patronimage>
1584 __PACKAGE__->might_have(
1586 "Koha::Schema::Result::Patronimage",
1587 { "foreign.borrowernumber" => "self.borrowernumber" },
1588 { cascade_copy => 0, cascade_delete => 0 },
1591 =head2 problem_reports
1595 Related object: L<Koha::Schema::Result::ProblemReport>
1599 __PACKAGE__->has_many(
1601 "Koha::Schema::Result::ProblemReport",
1602 { "foreign.borrowernumber" => "self.borrowernumber" },
1603 { cascade_copy => 0, cascade_delete => 0 },
1610 Related object: L<Koha::Schema::Result::Rating>
1614 __PACKAGE__->has_many(
1616 "Koha::Schema::Result::Rating",
1617 { "foreign.borrowernumber" => "self.borrowernumber" },
1618 { cascade_copy => 0, cascade_delete => 0 },
1625 Related object: L<Koha::Schema::Result::Recall>
1629 __PACKAGE__->has_many(
1631 "Koha::Schema::Result::Recall",
1632 { "foreign.patron_id" => "self.borrowernumber" },
1633 { cascade_copy => 0, cascade_delete => 0 },
1640 Related object: L<Koha::Schema::Result::Reserve>
1644 __PACKAGE__->has_many(
1646 "Koha::Schema::Result::Reserve",
1647 { "foreign.borrowernumber" => "self.borrowernumber" },
1648 { cascade_copy => 0, cascade_delete => 0 },
1651 =head2 return_claims_borrowernumbers
1655 Related object: L<Koha::Schema::Result::ReturnClaim>
1659 __PACKAGE__->has_many(
1660 "return_claims_borrowernumbers",
1661 "Koha::Schema::Result::ReturnClaim",
1662 { "foreign.borrowernumber" => "self.borrowernumber" },
1663 { cascade_copy => 0, cascade_delete => 0 },
1666 =head2 return_claims_created_by
1670 Related object: L<Koha::Schema::Result::ReturnClaim>
1674 __PACKAGE__->has_many(
1675 "return_claims_created_by",
1676 "Koha::Schema::Result::ReturnClaim",
1677 { "foreign.created_by" => "self.borrowernumber" },
1678 { cascade_copy => 0, cascade_delete => 0 },
1681 =head2 return_claims_resolved_by
1685 Related object: L<Koha::Schema::Result::ReturnClaim>
1689 __PACKAGE__->has_many(
1690 "return_claims_resolved_by",
1691 "Koha::Schema::Result::ReturnClaim",
1692 { "foreign.resolved_by" => "self.borrowernumber" },
1693 { cascade_copy => 0, cascade_delete => 0 },
1696 =head2 return_claims_updated_by
1700 Related object: L<Koha::Schema::Result::ReturnClaim>
1704 __PACKAGE__->has_many(
1705 "return_claims_updated_by",
1706 "Koha::Schema::Result::ReturnClaim",
1707 { "foreign.updated_by" => "self.borrowernumber" },
1708 { cascade_copy => 0, cascade_delete => 0 },
1715 Related object: L<Koha::Schema::Result::Review>
1719 __PACKAGE__->has_many(
1721 "Koha::Schema::Result::Review",
1722 { "foreign.borrowernumber" => "self.borrowernumber" },
1723 { cascade_copy => 0, cascade_delete => 0 },
1730 Related object: L<Koha::Schema::Result::SmsProvider>
1734 __PACKAGE__->belongs_to(
1736 "Koha::Schema::Result::SmsProvider",
1737 { id => "sms_provider_id" },
1740 join_type => "LEFT",
1741 on_delete => "SET NULL",
1742 on_update => "CASCADE",
1746 =head2 subscriptionroutinglists
1750 Related object: L<Koha::Schema::Result::Subscriptionroutinglist>
1754 __PACKAGE__->has_many(
1755 "subscriptionroutinglists",
1756 "Koha::Schema::Result::Subscriptionroutinglist",
1757 { "foreign.borrowernumber" => "self.borrowernumber" },
1758 { cascade_copy => 0, cascade_delete => 0 },
1761 =head2 suggestions_acceptedbies
1765 Related object: L<Koha::Schema::Result::Suggestion>
1769 __PACKAGE__->has_many(
1770 "suggestions_acceptedbies",
1771 "Koha::Schema::Result::Suggestion",
1772 { "foreign.acceptedby" => "self.borrowernumber" },
1773 { cascade_copy => 0, cascade_delete => 0 },
1776 =head2 suggestions_lastmodificationbies
1780 Related object: L<Koha::Schema::Result::Suggestion>
1784 __PACKAGE__->has_many(
1785 "suggestions_lastmodificationbies",
1786 "Koha::Schema::Result::Suggestion",
1787 { "foreign.lastmodificationby" => "self.borrowernumber" },
1788 { cascade_copy => 0, cascade_delete => 0 },
1791 =head2 suggestions_managedbies
1795 Related object: L<Koha::Schema::Result::Suggestion>
1799 __PACKAGE__->has_many(
1800 "suggestions_managedbies",
1801 "Koha::Schema::Result::Suggestion",
1802 { "foreign.managedby" => "self.borrowernumber" },
1803 { cascade_copy => 0, cascade_delete => 0 },
1806 =head2 suggestions_rejectedbies
1810 Related object: L<Koha::Schema::Result::Suggestion>
1814 __PACKAGE__->has_many(
1815 "suggestions_rejectedbies",
1816 "Koha::Schema::Result::Suggestion",
1817 { "foreign.rejectedby" => "self.borrowernumber" },
1818 { cascade_copy => 0, cascade_delete => 0 },
1821 =head2 suggestions_suggestedbies
1825 Related object: L<Koha::Schema::Result::Suggestion>
1829 __PACKAGE__->has_many(
1830 "suggestions_suggestedbies",
1831 "Koha::Schema::Result::Suggestion",
1832 { "foreign.suggestedby" => "self.borrowernumber" },
1833 { cascade_copy => 0, cascade_delete => 0 },
1840 Related object: L<Koha::Schema::Result::TagAll>
1844 __PACKAGE__->has_many(
1846 "Koha::Schema::Result::TagAll",
1847 { "foreign.borrowernumber" => "self.borrowernumber" },
1848 { cascade_copy => 0, cascade_delete => 0 },
1851 =head2 tags_approvals
1855 Related object: L<Koha::Schema::Result::TagsApproval>
1859 __PACKAGE__->has_many(
1861 "Koha::Schema::Result::TagsApproval",
1862 { "foreign.approved_by" => "self.borrowernumber" },
1863 { cascade_copy => 0, cascade_delete => 0 },
1866 =head2 tmp_holdsqueues
1870 Related object: L<Koha::Schema::Result::TmpHoldsqueue>
1874 __PACKAGE__->has_many(
1876 "Koha::Schema::Result::TmpHoldsqueue",
1877 { "foreign.borrowernumber" => "self.borrowernumber" },
1878 { cascade_copy => 0, cascade_delete => 0 },
1881 =head2 user_permissions
1885 Related object: L<Koha::Schema::Result::UserPermission>
1889 __PACKAGE__->has_many(
1891 "Koha::Schema::Result::UserPermission",
1892 { "foreign.borrowernumber" => "self.borrowernumber" },
1893 { cascade_copy => 0, cascade_delete => 0 },
1896 =head2 virtualshelfcontents
1900 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
1904 __PACKAGE__->has_many(
1905 "virtualshelfcontents",
1906 "Koha::Schema::Result::Virtualshelfcontent",
1907 { "foreign.borrowernumber" => "self.borrowernumber" },
1908 { cascade_copy => 0, cascade_delete => 0 },
1911 =head2 virtualshelfshares
1915 Related object: L<Koha::Schema::Result::Virtualshelfshare>
1919 __PACKAGE__->has_many(
1920 "virtualshelfshares",
1921 "Koha::Schema::Result::Virtualshelfshare",
1922 { "foreign.borrowernumber" => "self.borrowernumber" },
1923 { cascade_copy => 0, cascade_delete => 0 },
1926 =head2 virtualshelves
1930 Related object: L<Koha::Schema::Result::Virtualshelve>
1934 __PACKAGE__->has_many(
1936 "Koha::Schema::Result::Virtualshelve",
1937 { "foreign.owner" => "self.borrowernumber" },
1938 { cascade_copy => 0, cascade_delete => 0 },
1945 Composing rels: L</aqbasketusers> -> basketno
1949 __PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno");
1955 Composing rels: L</aqbudgetborrowers> -> budget
1959 __PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget");
1965 Composing rels: L</course_instructors> -> course
1969 __PACKAGE__->many_to_many("courses", "course_instructors", "course");
1975 Composing rels: L</aqorder_users> -> ordernumber
1979 __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1985 Composing rels: L</user_permissions> -> permission
1989 __PACKAGE__->many_to_many("permissions", "user_permissions", "permission");
1992 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-07-05 12:41:19
1993 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:e5ZH2Ise5JLYRXrq22L9rw
1995 __PACKAGE__->has_many(
1996 "extended_attributes",
1997 "Koha::Schema::Result::BorrowerAttribute",
1998 { "foreign.borrowernumber" => "self.borrowernumber" },
1999 { cascade_copy => 0, cascade_delete => 0 },
2002 __PACKAGE__->add_columns(
2003 '+anonymized' => { is_boolean => 1 },
2004 '+lost' => { is_boolean => 1 },
2005 '+gonenoaddress' => { is_boolean => 1 },
2006 '+privacy_guarantor_fines' => { is_boolean => 1 },
2007 '+autorenew_checkouts' => { is_boolean => 1 }
2010 sub koha_objects_class {
2013 sub koha_object_class {