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 patron/borrower pronouns
96 the house number for your patron/borrower's primary address
100 data_type: 'tinytext'
103 the street type (Rd., Blvd, etc) for your patron/borrower's primary address
107 data_type: 'longtext'
110 the first address line for your patron/borrower's primary address
114 data_type: 'mediumtext'
117 the second address line for your patron/borrower's primary address
121 data_type: 'longtext'
124 the city or town for your patron/borrower's primary address
128 data_type: 'mediumtext'
131 the state or province for your patron/borrower's primary address
135 data_type: 'tinytext'
138 the zip or postal code for your patron/borrower's primary address
142 data_type: 'mediumtext'
145 the country for your patron/borrower's primary address
149 data_type: 'longtext'
152 the primary email address for your patron/borrower's primary address
156 data_type: 'mediumtext'
159 the primary phone number for your patron/borrower's primary address
163 data_type: 'tinytext'
166 the other phone number for your patron/borrower's primary address
170 data_type: 'longtext'
173 the fax number for your patron/borrower's primary address
177 data_type: 'mediumtext'
180 the secondary email addres for your patron/borrower's primary address
184 data_type: 'mediumtext'
187 the secondary phone number for your patron/borrower's primary address
189 =head2 B_streetnumber
191 accessor: 'b_streetnumber'
192 data_type: 'tinytext'
195 the house number for your patron/borrower's alternate address
199 accessor: 'b_streettype'
200 data_type: 'tinytext'
203 the street type (Rd., Blvd, etc) for your patron/borrower's alternate address
207 accessor: 'b_address'
208 data_type: 'mediumtext'
211 the first address line for your patron/borrower's alternate address
215 accessor: 'b_address2'
216 data_type: 'mediumtext'
219 the second address line for your patron/borrower's alternate address
224 data_type: 'longtext'
227 the city or town for your patron/borrower's alternate address
232 data_type: 'mediumtext'
235 the state for your patron/borrower's alternate address
239 accessor: 'b_zipcode'
240 data_type: 'tinytext'
243 the zip or postal code for your patron/borrower's alternate address
247 accessor: 'b_country'
248 data_type: 'mediumtext'
251 the country for your patron/borrower's alternate address
256 data_type: 'mediumtext'
259 the patron/borrower's alternate email address
264 data_type: 'longtext'
267 the patron/borrower's alternate phone number
272 datetime_undef_if_invalid: 1
275 the patron/borrower's date of birth (YYYY-MM-DD)
280 default_value: (empty string)
285 foreign key from the branches table, includes the code of the patron/borrower's home branch
290 default_value: (empty string)
295 foreign key from the categories table, includes the code of the patron category
300 datetime_undef_if_invalid: 1
303 date the patron was added to Koha (YYYY-MM-DD)
308 datetime_undef_if_invalid: 1
311 date the patron/borrower's card is set to expire (YYYY-MM-DD)
313 =head2 password_expiration_date
316 datetime_undef_if_invalid: 1
319 date the patron/borrower's password is set to expire (YYYY-MM-DD)
324 datetime_undef_if_invalid: 1
327 date the patron/borrower's card was last renewed
334 set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having an unconfirmed address
341 set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having lost their card
346 datetime_undef_if_invalid: 1
349 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)
351 =head2 debarredcomment
357 comment on the stop of the patron
361 data_type: 'longtext'
364 used for children and profesionals to include surname or last name of guarantor or organization name
366 =head2 contactfirstname
368 data_type: 'mediumtext'
371 used for children to include first name of guarantor
375 data_type: 'mediumtext'
378 used for children to include title (Mr., Mrs., etc) of guarantor
382 data_type: 'longtext'
385 a note on the patron/borrower's account that is only visible in the staff interface
393 used for children to include the relationship to their guarantor
401 patron/borrower's gender
409 patron/borrower's Bcrypt encrypted password
413 data_type: 'mediumtext'
421 default_value: 'password'
422 extra: {list => ["password","two-factor"]}
425 Authentication method
432 will include a number associated with the staff member's permissions
440 patron/borrower's opac and/or staff interface log in
444 data_type: 'longtext'
447 a note on the patron/borrower's account that is visible in the OPAC and staff interface
455 a note related to the patron/borrower's alternate address
463 a field that can be used for any information unique to the library
471 a field that can be used for any information unique to the library
473 =head2 altcontactfirstname
475 data_type: 'mediumtext'
478 first name of alternate contact for the patron/borrower
480 =head2 altcontactsurname
482 data_type: 'mediumtext'
485 surname or last name of the alternate contact for the patron/borrower
487 =head2 altcontactaddress1
489 data_type: 'mediumtext'
492 the first address line for the alternate contact for the patron/borrower
494 =head2 altcontactaddress2
496 data_type: 'mediumtext'
499 the second address line for the alternate contact for the patron/borrower
501 =head2 altcontactaddress3
503 data_type: 'mediumtext'
506 the city for the alternate contact for the patron/borrower
508 =head2 altcontactstate
510 data_type: 'mediumtext'
513 the state for the alternate contact for the patron/borrower
515 =head2 altcontactzipcode
517 data_type: 'mediumtext'
520 the zipcode for the alternate contact for the patron/borrower
522 =head2 altcontactcountry
524 data_type: 'mediumtext'
527 the country for the alternate contact for the patron/borrower
529 =head2 altcontactphone
531 data_type: 'mediumtext'
534 the phone number for the alternate contact for the patron/borrower
536 =head2 smsalertnumber
542 the mobile phone number where the patron/borrower would like to receive notices (if SMS turned on)
544 =head2 sms_provider_id
550 the provider of the mobile phone number defined in smsalertnumber
558 patron/borrower's privacy settings related to their checkout history
560 =head2 privacy_guarantor_fines
566 controls if relatives can see this patron's fines
568 =head2 privacy_guarantor_checkouts
574 controls if relatives can see this patron's checkouts
576 =head2 checkprevcheckout
579 default_value: 'inherit'
583 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'.
587 data_type: 'timestamp'
588 datetime_undef_if_invalid: 1
589 default_value: current_timestamp
592 time of last change could be useful for synchronization with external systems (among others)
596 data_type: 'datetime'
597 datetime_undef_if_invalid: 1
600 last time a patron has been seen (connected at the OPAC or staff interface)
605 default_value: 'default'
609 lang to use to send notices to this patron
611 =head2 login_attempts
617 number of failed login attemps
619 =head2 overdrive_auth_token
621 data_type: 'mediumtext'
624 persist OverDrive auth token
632 flag for data anonymization
634 =head2 autorenew_checkouts
640 flag for allowing auto-renewal
642 =head2 primary_contact_method
648 useful for reporting purposes
652 __PACKAGE__->add_columns(
654 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
656 { data_type => "varchar", is_nullable => 1, size => 32 },
658 { data_type => "longtext", is_nullable => 1 },
660 { data_type => "mediumtext", is_nullable => 1 },
662 { data_type => "longtext", is_nullable => 1 },
664 { data_type => "longtext", is_nullable => 1 },
666 { data_type => "longtext", is_nullable => 1 },
668 { data_type => "mediumtext", is_nullable => 1 },
670 { data_type => "longtext", is_nullable => 1 },
672 { data_type => "tinytext", is_nullable => 1 },
674 { data_type => "tinytext", is_nullable => 1 },
676 { data_type => "longtext", is_nullable => 1 },
678 { data_type => "mediumtext", is_nullable => 1 },
680 { data_type => "longtext", is_nullable => 1 },
682 { data_type => "mediumtext", is_nullable => 1 },
684 { data_type => "tinytext", is_nullable => 1 },
686 { data_type => "mediumtext", is_nullable => 1 },
688 { data_type => "longtext", is_nullable => 1 },
690 { data_type => "mediumtext", is_nullable => 1 },
692 { data_type => "tinytext", is_nullable => 1 },
694 { data_type => "longtext", is_nullable => 1 },
696 { data_type => "mediumtext", is_nullable => 1 },
698 { data_type => "mediumtext", is_nullable => 1 },
700 { accessor => "b_streetnumber", data_type => "tinytext", is_nullable => 1 },
702 { accessor => "b_streettype", data_type => "tinytext", is_nullable => 1 },
704 { accessor => "b_address", data_type => "mediumtext", is_nullable => 1 },
706 { accessor => "b_address2", data_type => "mediumtext", is_nullable => 1 },
708 { accessor => "b_city", data_type => "longtext", is_nullable => 1 },
710 { accessor => "b_state", data_type => "mediumtext", is_nullable => 1 },
712 { accessor => "b_zipcode", data_type => "tinytext", is_nullable => 1 },
714 { accessor => "b_country", data_type => "mediumtext", is_nullable => 1 },
716 { accessor => "b_email", data_type => "mediumtext", is_nullable => 1 },
718 { accessor => "b_phone", data_type => "longtext", is_nullable => 1 },
720 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
723 data_type => "varchar",
731 data_type => "varchar",
738 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
740 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
741 "password_expiration_date",
742 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
744 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
746 { data_type => "tinyint", is_nullable => 1 },
748 { data_type => "tinyint", is_nullable => 1 },
750 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
752 { data_type => "varchar", is_nullable => 1, size => 255 },
754 { data_type => "longtext", is_nullable => 1 },
756 { data_type => "mediumtext", is_nullable => 1 },
758 { data_type => "mediumtext", is_nullable => 1 },
760 { data_type => "longtext", is_nullable => 1 },
762 { data_type => "varchar", is_nullable => 1, size => 100 },
764 { data_type => "varchar", is_nullable => 1, size => 1 },
766 { data_type => "varchar", is_nullable => 1, size => 60 },
768 { data_type => "mediumtext", is_nullable => 1 },
772 default_value => "password",
773 extra => { list => ["password", "two-factor"] },
777 { data_type => "bigint", is_nullable => 1 },
779 { data_type => "varchar", is_nullable => 1, size => 75 },
781 { data_type => "longtext", is_nullable => 1 },
783 { data_type => "varchar", is_nullable => 1, size => 255 },
785 { data_type => "varchar", is_nullable => 1, size => 80 },
787 { data_type => "varchar", is_nullable => 1, size => 80 },
788 "altcontactfirstname",
789 { data_type => "mediumtext", is_nullable => 1 },
791 { data_type => "mediumtext", is_nullable => 1 },
792 "altcontactaddress1",
793 { data_type => "mediumtext", is_nullable => 1 },
794 "altcontactaddress2",
795 { data_type => "mediumtext", is_nullable => 1 },
796 "altcontactaddress3",
797 { data_type => "mediumtext", is_nullable => 1 },
799 { data_type => "mediumtext", is_nullable => 1 },
801 { data_type => "mediumtext", is_nullable => 1 },
803 { data_type => "mediumtext", is_nullable => 1 },
805 { data_type => "mediumtext", is_nullable => 1 },
807 { data_type => "varchar", is_nullable => 1, size => 50 },
809 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
811 { data_type => "integer", default_value => 1, is_nullable => 0 },
812 "privacy_guarantor_fines",
813 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
814 "privacy_guarantor_checkouts",
815 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
818 data_type => "varchar",
819 default_value => "inherit",
825 data_type => "timestamp",
826 datetime_undef_if_invalid => 1,
827 default_value => \"current_timestamp",
832 data_type => "datetime",
833 datetime_undef_if_invalid => 1,
838 data_type => "varchar",
839 default_value => "default",
844 { data_type => "integer", default_value => 0, is_nullable => 0 },
845 "overdrive_auth_token",
846 { data_type => "mediumtext", is_nullable => 1 },
848 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
849 "autorenew_checkouts",
850 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
851 "primary_contact_method",
852 { data_type => "varchar", is_nullable => 1, size => 45 },
859 =item * L</borrowernumber>
865 __PACKAGE__->set_primary_key("borrowernumber");
867 =head1 UNIQUE CONSTRAINTS
873 =item * L</cardnumber>
879 __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]);
891 __PACKAGE__->add_unique_constraint("userid", ["userid"]);
899 Related object: L<Koha::Schema::Result::Accountline>
903 __PACKAGE__->has_many(
905 "Koha::Schema::Result::Accountline",
906 { "foreign.borrowernumber" => "self.borrowernumber" },
907 { cascade_copy => 0, cascade_delete => 0 },
910 =head2 accountlines_managers
914 Related object: L<Koha::Schema::Result::Accountline>
918 __PACKAGE__->has_many(
919 "accountlines_managers",
920 "Koha::Schema::Result::Accountline",
921 { "foreign.manager_id" => "self.borrowernumber" },
922 { cascade_copy => 0, cascade_delete => 0 },
925 =head2 additional_contents
929 Related object: L<Koha::Schema::Result::AdditionalContent>
933 __PACKAGE__->has_many(
934 "additional_contents",
935 "Koha::Schema::Result::AdditionalContent",
936 { "foreign.borrowernumber" => "self.borrowernumber" },
937 { cascade_copy => 0, cascade_delete => 0 },
940 =head2 advanced_editor_macros
944 Related object: L<Koha::Schema::Result::AdvancedEditorMacro>
948 __PACKAGE__->has_many(
949 "advanced_editor_macros",
950 "Koha::Schema::Result::AdvancedEditorMacro",
951 { "foreign.borrowernumber" => "self.borrowernumber" },
952 { cascade_copy => 0, cascade_delete => 0 },
959 Related object: L<Koha::Schema::Result::Alert>
963 __PACKAGE__->has_many(
965 "Koha::Schema::Result::Alert",
966 { "foreign.borrowernumber" => "self.borrowernumber" },
967 { cascade_copy => 0, cascade_delete => 0 },
974 Related object: L<Koha::Schema::Result::ApiKey>
978 __PACKAGE__->has_many(
980 "Koha::Schema::Result::ApiKey",
981 { "foreign.patron_id" => "self.borrowernumber" },
982 { cascade_copy => 0, cascade_delete => 0 },
989 Related object: L<Koha::Schema::Result::Aqbasketuser>
993 __PACKAGE__->has_many(
995 "Koha::Schema::Result::Aqbasketuser",
996 { "foreign.borrowernumber" => "self.borrowernumber" },
997 { cascade_copy => 0, cascade_delete => 0 },
1000 =head2 aqbudgetborrowers
1004 Related object: L<Koha::Schema::Result::Aqbudgetborrower>
1008 __PACKAGE__->has_many(
1009 "aqbudgetborrowers",
1010 "Koha::Schema::Result::Aqbudgetborrower",
1011 { "foreign.borrowernumber" => "self.borrowernumber" },
1012 { cascade_copy => 0, cascade_delete => 0 },
1015 =head2 aqorder_users
1019 Related object: L<Koha::Schema::Result::AqorderUser>
1023 __PACKAGE__->has_many(
1025 "Koha::Schema::Result::AqorderUser",
1026 { "foreign.borrowernumber" => "self.borrowernumber" },
1027 { cascade_copy => 0, cascade_delete => 0 },
1034 Related object: L<Koha::Schema::Result::Aqorder>
1038 __PACKAGE__->has_many(
1040 "Koha::Schema::Result::Aqorder",
1041 { "foreign.created_by" => "self.borrowernumber" },
1042 { cascade_copy => 0, cascade_delete => 0 },
1045 =head2 article_requests
1049 Related object: L<Koha::Schema::Result::ArticleRequest>
1053 __PACKAGE__->has_many(
1055 "Koha::Schema::Result::ArticleRequest",
1056 { "foreign.borrowernumber" => "self.borrowernumber" },
1057 { cascade_copy => 0, cascade_delete => 0 },
1060 =head2 borrower_attributes
1064 Related object: L<Koha::Schema::Result::BorrowerAttribute>
1068 __PACKAGE__->has_many(
1069 "borrower_attributes",
1070 "Koha::Schema::Result::BorrowerAttribute",
1071 { "foreign.borrowernumber" => "self.borrowernumber" },
1072 { cascade_copy => 0, cascade_delete => 0 },
1075 =head2 borrower_debarments
1079 Related object: L<Koha::Schema::Result::BorrowerDebarment>
1083 __PACKAGE__->has_many(
1084 "borrower_debarments",
1085 "Koha::Schema::Result::BorrowerDebarment",
1086 { "foreign.borrowernumber" => "self.borrowernumber" },
1087 { cascade_copy => 0, cascade_delete => 0 },
1090 =head2 borrower_files
1094 Related object: L<Koha::Schema::Result::BorrowerFile>
1098 __PACKAGE__->has_many(
1100 "Koha::Schema::Result::BorrowerFile",
1101 { "foreign.borrowernumber" => "self.borrowernumber" },
1102 { cascade_copy => 0, cascade_delete => 0 },
1105 =head2 borrower_message_preferences
1109 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
1113 __PACKAGE__->has_many(
1114 "borrower_message_preferences",
1115 "Koha::Schema::Result::BorrowerMessagePreference",
1116 { "foreign.borrowernumber" => "self.borrowernumber" },
1117 { cascade_copy => 0, cascade_delete => 0 },
1120 =head2 borrower_relationships_guarantees
1124 Related object: L<Koha::Schema::Result::BorrowerRelationship>
1128 __PACKAGE__->has_many(
1129 "borrower_relationships_guarantees",
1130 "Koha::Schema::Result::BorrowerRelationship",
1131 { "foreign.guarantee_id" => "self.borrowernumber" },
1132 { cascade_copy => 0, cascade_delete => 0 },
1135 =head2 borrower_relationships_guarantors
1139 Related object: L<Koha::Schema::Result::BorrowerRelationship>
1143 __PACKAGE__->has_many(
1144 "borrower_relationships_guarantors",
1145 "Koha::Schema::Result::BorrowerRelationship",
1146 { "foreign.guarantor_id" => "self.borrowernumber" },
1147 { cascade_copy => 0, cascade_delete => 0 },
1154 Related object: L<Koha::Schema::Result::Branch>
1158 __PACKAGE__->belongs_to(
1160 "Koha::Schema::Result::Branch",
1161 { branchcode => "branchcode" },
1162 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
1165 =head2 cash_register_actions
1169 Related object: L<Koha::Schema::Result::CashRegisterAction>
1173 __PACKAGE__->has_many(
1174 "cash_register_actions",
1175 "Koha::Schema::Result::CashRegisterAction",
1176 { "foreign.manager_id" => "self.borrowernumber" },
1177 { cascade_copy => 0, cascade_delete => 0 },
1184 Related object: L<Koha::Schema::Result::Category>
1188 __PACKAGE__->belongs_to(
1190 "Koha::Schema::Result::Category",
1191 { categorycode => "categorycode" },
1192 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
1195 =head2 checkout_renewals
1199 Related object: L<Koha::Schema::Result::CheckoutRenewal>
1203 __PACKAGE__->has_many(
1204 "checkout_renewals",
1205 "Koha::Schema::Result::CheckoutRenewal",
1206 { "foreign.renewer_id" => "self.borrowernumber" },
1207 { cascade_copy => 0, cascade_delete => 0 },
1210 =head2 club_enrollments
1214 Related object: L<Koha::Schema::Result::ClubEnrollment>
1218 __PACKAGE__->has_many(
1220 "Koha::Schema::Result::ClubEnrollment",
1221 { "foreign.borrowernumber" => "self.borrowernumber" },
1222 { cascade_copy => 0, cascade_delete => 0 },
1225 =head2 club_holds_to_patron_holds
1229 Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold>
1233 __PACKAGE__->has_many(
1234 "club_holds_to_patron_holds",
1235 "Koha::Schema::Result::ClubHoldsToPatronHold",
1236 { "foreign.patron_id" => "self.borrowernumber" },
1237 { cascade_copy => 0, cascade_delete => 0 },
1240 =head2 course_instructors
1244 Related object: L<Koha::Schema::Result::CourseInstructor>
1248 __PACKAGE__->has_many(
1249 "course_instructors",
1250 "Koha::Schema::Result::CourseInstructor",
1251 { "foreign.borrowernumber" => "self.borrowernumber" },
1252 { cascade_copy => 0, cascade_delete => 0 },
1255 =head2 creator_batches
1259 Related object: L<Koha::Schema::Result::CreatorBatch>
1263 __PACKAGE__->has_many(
1265 "Koha::Schema::Result::CreatorBatch",
1266 { "foreign.borrower_number" => "self.borrowernumber" },
1267 { cascade_copy => 0, cascade_delete => 0 },
1270 =head2 curbside_pickups_borrowernumbers
1274 Related object: L<Koha::Schema::Result::CurbsidePickup>
1278 __PACKAGE__->has_many(
1279 "curbside_pickups_borrowernumbers",
1280 "Koha::Schema::Result::CurbsidePickup",
1281 { "foreign.borrowernumber" => "self.borrowernumber" },
1282 { cascade_copy => 0, cascade_delete => 0 },
1285 =head2 curbside_pickups_staged_by
1289 Related object: L<Koha::Schema::Result::CurbsidePickup>
1293 __PACKAGE__->has_many(
1294 "curbside_pickups_staged_by",
1295 "Koha::Schema::Result::CurbsidePickup",
1296 { "foreign.staged_by" => "self.borrowernumber" },
1297 { cascade_copy => 0, cascade_delete => 0 },
1304 Related object: L<Koha::Schema::Result::Discharge>
1308 __PACKAGE__->has_many(
1310 "Koha::Schema::Result::Discharge",
1311 { "foreign.borrower" => "self.borrowernumber" },
1312 { cascade_copy => 0, cascade_delete => 0 },
1315 =head2 erm_user_roles
1319 Related object: L<Koha::Schema::Result::ErmUserRole>
1323 __PACKAGE__->has_many(
1325 "Koha::Schema::Result::ErmUserRole",
1326 { "foreign.user_id" => "self.borrowernumber" },
1327 { cascade_copy => 0, cascade_delete => 0 },
1330 =head2 hold_fill_targets
1334 Related object: L<Koha::Schema::Result::HoldFillTarget>
1338 __PACKAGE__->has_many(
1339 "hold_fill_targets",
1340 "Koha::Schema::Result::HoldFillTarget",
1341 { "foreign.borrowernumber" => "self.borrowernumber" },
1342 { cascade_copy => 0, cascade_delete => 0 },
1345 =head2 housebound_profile
1349 Related object: L<Koha::Schema::Result::HouseboundProfile>
1353 __PACKAGE__->might_have(
1354 "housebound_profile",
1355 "Koha::Schema::Result::HouseboundProfile",
1356 { "foreign.borrowernumber" => "self.borrowernumber" },
1357 { cascade_copy => 0, cascade_delete => 0 },
1360 =head2 housebound_role
1364 Related object: L<Koha::Schema::Result::HouseboundRole>
1368 __PACKAGE__->might_have(
1370 "Koha::Schema::Result::HouseboundRole",
1371 { "foreign.borrowernumber_id" => "self.borrowernumber" },
1372 { cascade_copy => 0, cascade_delete => 0 },
1375 =head2 housebound_visit_chooser_brwnumbers
1379 Related object: L<Koha::Schema::Result::HouseboundVisit>
1383 __PACKAGE__->has_many(
1384 "housebound_visit_chooser_brwnumbers",
1385 "Koha::Schema::Result::HouseboundVisit",
1386 { "foreign.chooser_brwnumber" => "self.borrowernumber" },
1387 { cascade_copy => 0, cascade_delete => 0 },
1390 =head2 housebound_visit_deliverer_brwnumbers
1394 Related object: L<Koha::Schema::Result::HouseboundVisit>
1398 __PACKAGE__->has_many(
1399 "housebound_visit_deliverer_brwnumbers",
1400 "Koha::Schema::Result::HouseboundVisit",
1401 { "foreign.deliverer_brwnumber" => "self.borrowernumber" },
1402 { cascade_copy => 0, cascade_delete => 0 },
1409 Related object: L<Koha::Schema::Result::Illcomment>
1413 __PACKAGE__->has_many(
1415 "Koha::Schema::Result::Illcomment",
1416 { "foreign.borrowernumber" => "self.borrowernumber" },
1417 { cascade_copy => 0, cascade_delete => 0 },
1424 Related object: L<Koha::Schema::Result::Illrequest>
1428 __PACKAGE__->has_many(
1430 "Koha::Schema::Result::Illrequest",
1431 { "foreign.borrowernumber" => "self.borrowernumber" },
1432 { cascade_copy => 0, cascade_delete => 0 },
1439 Related object: L<Koha::Schema::Result::Issue>
1443 __PACKAGE__->has_many(
1445 "Koha::Schema::Result::Issue",
1446 { "foreign.borrowernumber" => "self.borrowernumber" },
1447 { cascade_copy => 0, cascade_delete => 0 },
1450 =head2 issues_issuers
1454 Related object: L<Koha::Schema::Result::Issue>
1458 __PACKAGE__->has_many(
1460 "Koha::Schema::Result::Issue",
1461 { "foreign.issuer_id" => "self.borrowernumber" },
1462 { cascade_copy => 0, cascade_delete => 0 },
1465 =head2 item_editor_templates
1469 Related object: L<Koha::Schema::Result::ItemEditorTemplate>
1473 __PACKAGE__->has_many(
1474 "item_editor_templates",
1475 "Koha::Schema::Result::ItemEditorTemplate",
1476 { "foreign.patron_id" => "self.borrowernumber" },
1477 { cascade_copy => 0, cascade_delete => 0 },
1480 =head2 items_last_borrowers
1484 Related object: L<Koha::Schema::Result::ItemsLastBorrower>
1488 __PACKAGE__->has_many(
1489 "items_last_borrowers",
1490 "Koha::Schema::Result::ItemsLastBorrower",
1491 { "foreign.borrowernumber" => "self.borrowernumber" },
1492 { cascade_copy => 0, cascade_delete => 0 },
1499 Related object: L<Koha::Schema::Result::Linktracker>
1503 __PACKAGE__->has_many(
1505 "Koha::Schema::Result::Linktracker",
1506 { "foreign.borrowernumber" => "self.borrowernumber" },
1507 { cascade_copy => 0, cascade_delete => 0 },
1510 =head2 message_queues
1514 Related object: L<Koha::Schema::Result::MessageQueue>
1518 __PACKAGE__->has_many(
1520 "Koha::Schema::Result::MessageQueue",
1521 { "foreign.borrowernumber" => "self.borrowernumber" },
1522 { cascade_copy => 0, cascade_delete => 0 },
1529 Related object: L<Koha::Schema::Result::Message>
1533 __PACKAGE__->has_many(
1535 "Koha::Schema::Result::Message",
1536 { "foreign.manager_id" => "self.borrowernumber" },
1537 { cascade_copy => 0, cascade_delete => 0 },
1540 =head2 messages_borrowernumbers
1544 Related object: L<Koha::Schema::Result::Message>
1548 __PACKAGE__->has_many(
1549 "messages_borrowernumbers",
1550 "Koha::Schema::Result::Message",
1551 { "foreign.borrowernumber" => "self.borrowernumber" },
1552 { cascade_copy => 0, cascade_delete => 0 },
1559 Related object: L<Koha::Schema::Result::OldIssue>
1563 __PACKAGE__->has_many(
1565 "Koha::Schema::Result::OldIssue",
1566 { "foreign.borrowernumber" => "self.borrowernumber" },
1567 { cascade_copy => 0, cascade_delete => 0 },
1570 =head2 old_issues_issuers
1574 Related object: L<Koha::Schema::Result::OldIssue>
1578 __PACKAGE__->has_many(
1579 "old_issues_issuers",
1580 "Koha::Schema::Result::OldIssue",
1581 { "foreign.issuer_id" => "self.borrowernumber" },
1582 { cascade_copy => 0, cascade_delete => 0 },
1589 Related object: L<Koha::Schema::Result::OldReserve>
1593 __PACKAGE__->has_many(
1595 "Koha::Schema::Result::OldReserve",
1596 { "foreign.borrowernumber" => "self.borrowernumber" },
1597 { cascade_copy => 0, cascade_delete => 0 },
1600 =head2 patron_consents
1604 Related object: L<Koha::Schema::Result::PatronConsent>
1608 __PACKAGE__->has_many(
1610 "Koha::Schema::Result::PatronConsent",
1611 { "foreign.borrowernumber" => "self.borrowernumber" },
1612 { cascade_copy => 0, cascade_delete => 0 },
1615 =head2 patron_list_patrons
1619 Related object: L<Koha::Schema::Result::PatronListPatron>
1623 __PACKAGE__->has_many(
1624 "patron_list_patrons",
1625 "Koha::Schema::Result::PatronListPatron",
1626 { "foreign.borrowernumber" => "self.borrowernumber" },
1627 { cascade_copy => 0, cascade_delete => 0 },
1634 Related object: L<Koha::Schema::Result::PatronList>
1638 __PACKAGE__->has_many(
1640 "Koha::Schema::Result::PatronList",
1641 { "foreign.owner" => "self.borrowernumber" },
1642 { cascade_copy => 0, cascade_delete => 0 },
1649 Related object: L<Koha::Schema::Result::Patronimage>
1653 __PACKAGE__->might_have(
1655 "Koha::Schema::Result::Patronimage",
1656 { "foreign.borrowernumber" => "self.borrowernumber" },
1657 { cascade_copy => 0, cascade_delete => 0 },
1660 =head2 problem_reports
1664 Related object: L<Koha::Schema::Result::ProblemReport>
1668 __PACKAGE__->has_many(
1670 "Koha::Schema::Result::ProblemReport",
1671 { "foreign.borrowernumber" => "self.borrowernumber" },
1672 { cascade_copy => 0, cascade_delete => 0 },
1679 Related object: L<Koha::Schema::Result::Rating>
1683 __PACKAGE__->has_many(
1685 "Koha::Schema::Result::Rating",
1686 { "foreign.borrowernumber" => "self.borrowernumber" },
1687 { cascade_copy => 0, cascade_delete => 0 },
1694 Related object: L<Koha::Schema::Result::Recall>
1698 __PACKAGE__->has_many(
1700 "Koha::Schema::Result::Recall",
1701 { "foreign.patron_id" => "self.borrowernumber" },
1702 { cascade_copy => 0, cascade_delete => 0 },
1709 Related object: L<Koha::Schema::Result::Reserve>
1713 __PACKAGE__->has_many(
1715 "Koha::Schema::Result::Reserve",
1716 { "foreign.borrowernumber" => "self.borrowernumber" },
1717 { cascade_copy => 0, cascade_delete => 0 },
1720 =head2 return_claims_borrowernumbers
1724 Related object: L<Koha::Schema::Result::ReturnClaim>
1728 __PACKAGE__->has_many(
1729 "return_claims_borrowernumbers",
1730 "Koha::Schema::Result::ReturnClaim",
1731 { "foreign.borrowernumber" => "self.borrowernumber" },
1732 { cascade_copy => 0, cascade_delete => 0 },
1735 =head2 return_claims_created_by
1739 Related object: L<Koha::Schema::Result::ReturnClaim>
1743 __PACKAGE__->has_many(
1744 "return_claims_created_by",
1745 "Koha::Schema::Result::ReturnClaim",
1746 { "foreign.created_by" => "self.borrowernumber" },
1747 { cascade_copy => 0, cascade_delete => 0 },
1750 =head2 return_claims_resolved_by
1754 Related object: L<Koha::Schema::Result::ReturnClaim>
1758 __PACKAGE__->has_many(
1759 "return_claims_resolved_by",
1760 "Koha::Schema::Result::ReturnClaim",
1761 { "foreign.resolved_by" => "self.borrowernumber" },
1762 { cascade_copy => 0, cascade_delete => 0 },
1765 =head2 return_claims_updated_by
1769 Related object: L<Koha::Schema::Result::ReturnClaim>
1773 __PACKAGE__->has_many(
1774 "return_claims_updated_by",
1775 "Koha::Schema::Result::ReturnClaim",
1776 { "foreign.updated_by" => "self.borrowernumber" },
1777 { cascade_copy => 0, cascade_delete => 0 },
1784 Related object: L<Koha::Schema::Result::Review>
1788 __PACKAGE__->has_many(
1790 "Koha::Schema::Result::Review",
1791 { "foreign.borrowernumber" => "self.borrowernumber" },
1792 { cascade_copy => 0, cascade_delete => 0 },
1799 Related object: L<Koha::Schema::Result::SmsProvider>
1803 __PACKAGE__->belongs_to(
1805 "Koha::Schema::Result::SmsProvider",
1806 { id => "sms_provider_id" },
1809 join_type => "LEFT",
1810 on_delete => "SET NULL",
1811 on_update => "CASCADE",
1815 =head2 subscriptionroutinglists
1819 Related object: L<Koha::Schema::Result::Subscriptionroutinglist>
1823 __PACKAGE__->has_many(
1824 "subscriptionroutinglists",
1825 "Koha::Schema::Result::Subscriptionroutinglist",
1826 { "foreign.borrowernumber" => "self.borrowernumber" },
1827 { cascade_copy => 0, cascade_delete => 0 },
1830 =head2 suggestions_acceptedbies
1834 Related object: L<Koha::Schema::Result::Suggestion>
1838 __PACKAGE__->has_many(
1839 "suggestions_acceptedbies",
1840 "Koha::Schema::Result::Suggestion",
1841 { "foreign.acceptedby" => "self.borrowernumber" },
1842 { cascade_copy => 0, cascade_delete => 0 },
1845 =head2 suggestions_lastmodificationbies
1849 Related object: L<Koha::Schema::Result::Suggestion>
1853 __PACKAGE__->has_many(
1854 "suggestions_lastmodificationbies",
1855 "Koha::Schema::Result::Suggestion",
1856 { "foreign.lastmodificationby" => "self.borrowernumber" },
1857 { cascade_copy => 0, cascade_delete => 0 },
1860 =head2 suggestions_managedbies
1864 Related object: L<Koha::Schema::Result::Suggestion>
1868 __PACKAGE__->has_many(
1869 "suggestions_managedbies",
1870 "Koha::Schema::Result::Suggestion",
1871 { "foreign.managedby" => "self.borrowernumber" },
1872 { cascade_copy => 0, cascade_delete => 0 },
1875 =head2 suggestions_rejectedbies
1879 Related object: L<Koha::Schema::Result::Suggestion>
1883 __PACKAGE__->has_many(
1884 "suggestions_rejectedbies",
1885 "Koha::Schema::Result::Suggestion",
1886 { "foreign.rejectedby" => "self.borrowernumber" },
1887 { cascade_copy => 0, cascade_delete => 0 },
1890 =head2 suggestions_suggestedbies
1894 Related object: L<Koha::Schema::Result::Suggestion>
1898 __PACKAGE__->has_many(
1899 "suggestions_suggestedbies",
1900 "Koha::Schema::Result::Suggestion",
1901 { "foreign.suggestedby" => "self.borrowernumber" },
1902 { cascade_copy => 0, cascade_delete => 0 },
1909 Related object: L<Koha::Schema::Result::TagAll>
1913 __PACKAGE__->has_many(
1915 "Koha::Schema::Result::TagAll",
1916 { "foreign.borrowernumber" => "self.borrowernumber" },
1917 { cascade_copy => 0, cascade_delete => 0 },
1920 =head2 tags_approvals
1924 Related object: L<Koha::Schema::Result::TagsApproval>
1928 __PACKAGE__->has_many(
1930 "Koha::Schema::Result::TagsApproval",
1931 { "foreign.approved_by" => "self.borrowernumber" },
1932 { cascade_copy => 0, cascade_delete => 0 },
1935 =head2 tmp_holdsqueues
1939 Related object: L<Koha::Schema::Result::TmpHoldsqueue>
1943 __PACKAGE__->has_many(
1945 "Koha::Schema::Result::TmpHoldsqueue",
1946 { "foreign.borrowernumber" => "self.borrowernumber" },
1947 { cascade_copy => 0, cascade_delete => 0 },
1950 =head2 user_permissions
1954 Related object: L<Koha::Schema::Result::UserPermission>
1958 __PACKAGE__->has_many(
1960 "Koha::Schema::Result::UserPermission",
1961 { "foreign.borrowernumber" => "self.borrowernumber" },
1962 { cascade_copy => 0, cascade_delete => 0 },
1965 =head2 virtualshelfcontents
1969 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
1973 __PACKAGE__->has_many(
1974 "virtualshelfcontents",
1975 "Koha::Schema::Result::Virtualshelfcontent",
1976 { "foreign.borrowernumber" => "self.borrowernumber" },
1977 { cascade_copy => 0, cascade_delete => 0 },
1980 =head2 virtualshelfshares
1984 Related object: L<Koha::Schema::Result::Virtualshelfshare>
1988 __PACKAGE__->has_many(
1989 "virtualshelfshares",
1990 "Koha::Schema::Result::Virtualshelfshare",
1991 { "foreign.borrowernumber" => "self.borrowernumber" },
1992 { cascade_copy => 0, cascade_delete => 0 },
1995 =head2 virtualshelves
1999 Related object: L<Koha::Schema::Result::Virtualshelve>
2003 __PACKAGE__->has_many(
2005 "Koha::Schema::Result::Virtualshelve",
2006 { "foreign.owner" => "self.borrowernumber" },
2007 { cascade_copy => 0, cascade_delete => 0 },
2014 Composing rels: L</aqbasketusers> -> basketno
2018 __PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno");
2024 Composing rels: L</aqbudgetborrowers> -> budget
2028 __PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget");
2034 Composing rels: L</course_instructors> -> course
2038 __PACKAGE__->many_to_many("courses", "course_instructors", "course");
2044 Composing rels: L</aqorder_users> -> ordernumber
2048 __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
2054 Composing rels: L</user_permissions> -> permission
2058 __PACKAGE__->many_to_many("permissions", "user_permissions", "permission");
2061 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-05-12 07:24:19
2062 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q+ykAzV16DQlg/wdmihsmQ
2064 __PACKAGE__->has_many(
2066 "Koha::Schema::Result::BorrowerDebarment",
2067 { "foreign.borrowernumber" => "self.borrowernumber" },
2068 { cascade_copy => 0, cascade_delete => 0 },
2071 __PACKAGE__->has_many(
2072 "extended_attributes",
2073 "Koha::Schema::Result::BorrowerAttribute",
2074 { "foreign.borrowernumber" => "self.borrowernumber" },
2075 { cascade_copy => 0, cascade_delete => 0 },
2078 __PACKAGE__->add_columns(
2079 '+anonymized' => { is_boolean => 1 },
2080 '+lost' => { is_boolean => 1 },
2081 '+gonenoaddress' => { is_boolean => 1 },
2082 '+privacy_guarantor_fines' => { is_boolean => 1 },
2083 '+autorenew_checkouts' => { is_boolean => 1 }
2086 sub koha_objects_class {
2089 sub koha_object_class {