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");
40 data_type: 'mediumtext'
50 data_type: 'mediumtext'
55 data_type: 'mediumtext'
77 data_type: 'mediumtext'
87 data_type: 'mediumtext'
108 data_type: 'mediumtext'
124 data_type: 'mediumtext'
137 =head2 B_streetnumber
139 accessor: 'b_streetnumber'
146 accessor: 'b_streettype'
153 accessor: 'b_address'
160 accessor: 'b_address2'
167 data_type: 'mediumtext'
178 accessor: 'b_zipcode'
185 accessor: 'b_country'
198 data_type: 'mediumtext'
204 datetime_undef_if_invalid: 1
210 default_value: (empty string)
218 default_value: (empty string)
226 datetime_undef_if_invalid: 1
232 datetime_undef_if_invalid: 1
248 datetime_undef_if_invalid: 1
251 =head2 debarredcomment
259 data_type: 'mediumtext'
262 =head2 contactfirstname
279 data_type: 'mediumtext'
313 data_type: 'mediumtext'
334 =head2 altcontactfirstname
340 =head2 altcontactsurname
346 =head2 altcontactaddress1
352 =head2 altcontactaddress2
358 =head2 altcontactaddress3
364 =head2 altcontactstate
369 =head2 altcontactzipcode
375 =head2 altcontactcountry
380 =head2 altcontactphone
386 =head2 smsalertnumber
398 =head2 privacy_guarantor_checkouts
406 __PACKAGE__
->add_columns(
408 { data_type
=> "integer", is_auto_increment
=> 1, is_nullable
=> 0 },
410 { data_type
=> "varchar", is_nullable
=> 1, size
=> 16 },
412 { data_type
=> "mediumtext", is_nullable
=> 0 },
414 { data_type
=> "text", is_nullable
=> 1 },
416 { data_type
=> "mediumtext", is_nullable
=> 1 },
418 { data_type
=> "mediumtext", is_nullable
=> 1 },
420 { data_type
=> "text", is_nullable
=> 1 },
422 { data_type
=> "varchar", is_nullable
=> 1, size
=> 10 },
424 { data_type
=> "varchar", is_nullable
=> 1, size
=> 50 },
426 { data_type
=> "mediumtext", is_nullable
=> 0 },
428 { data_type
=> "text", is_nullable
=> 1 },
430 { data_type
=> "mediumtext", is_nullable
=> 0 },
432 { data_type
=> "text", is_nullable
=> 1 },
434 { data_type
=> "varchar", is_nullable
=> 1, size
=> 25 },
436 { data_type
=> "text", is_nullable
=> 1 },
438 { data_type
=> "mediumtext", is_nullable
=> 1 },
440 { data_type
=> "text", is_nullable
=> 1 },
442 { data_type
=> "varchar", is_nullable
=> 1, size
=> 50 },
444 { data_type
=> "mediumtext", is_nullable
=> 1 },
446 { data_type
=> "text", is_nullable
=> 1 },
448 { data_type
=> "text", is_nullable
=> 1 },
451 accessor
=> "b_streetnumber",
452 data_type
=> "varchar",
458 accessor
=> "b_streettype",
459 data_type
=> "varchar",
465 accessor
=> "b_address",
466 data_type
=> "varchar",
471 { accessor
=> "b_address2", data_type
=> "text", is_nullable
=> 1 },
473 { accessor
=> "b_city", data_type
=> "mediumtext", is_nullable
=> 1 },
475 { accessor
=> "b_state", data_type
=> "text", is_nullable
=> 1 },
478 accessor
=> "b_zipcode",
479 data_type
=> "varchar",
484 { accessor
=> "b_country", data_type
=> "text", is_nullable
=> 1 },
486 { accessor
=> "b_email", data_type
=> "text", is_nullable
=> 1 },
488 { accessor
=> "b_phone", data_type
=> "mediumtext", is_nullable
=> 1 },
490 { data_type
=> "date", datetime_undef_if_invalid
=> 1, is_nullable
=> 1 },
493 data_type
=> "varchar",
501 data_type
=> "varchar",
508 { data_type
=> "date", datetime_undef_if_invalid
=> 1, is_nullable
=> 1 },
510 { data_type
=> "date", datetime_undef_if_invalid
=> 1, is_nullable
=> 1 },
512 { data_type
=> "tinyint", is_nullable
=> 1 },
514 { data_type
=> "tinyint", is_nullable
=> 1 },
516 { data_type
=> "date", datetime_undef_if_invalid
=> 1, is_nullable
=> 1 },
518 { data_type
=> "varchar", is_nullable
=> 1, size
=> 255 },
520 { data_type
=> "mediumtext", is_nullable
=> 1 },
522 { data_type
=> "text", is_nullable
=> 1 },
524 { data_type
=> "text", is_nullable
=> 1 },
526 { data_type
=> "integer", is_nullable
=> 1 },
528 { data_type
=> "mediumtext", is_nullable
=> 1 },
530 { data_type
=> "varchar", is_nullable
=> 1, size
=> 100 },
532 { data_type
=> "varchar", is_nullable
=> 1, size
=> 1 },
534 { data_type
=> "varchar", is_nullable
=> 1, size
=> 60 },
536 { data_type
=> "integer", is_nullable
=> 1 },
538 { data_type
=> "varchar", is_nullable
=> 1, size
=> 75 },
540 { data_type
=> "mediumtext", is_nullable
=> 1 },
542 { data_type
=> "varchar", is_nullable
=> 1, size
=> 255 },
544 { data_type
=> "varchar", is_nullable
=> 1, size
=> 80 },
546 { data_type
=> "varchar", is_nullable
=> 1, size
=> 80 },
547 "altcontactfirstname",
548 { data_type
=> "varchar", is_nullable
=> 1, size
=> 255 },
550 { data_type
=> "varchar", is_nullable
=> 1, size
=> 255 },
551 "altcontactaddress1",
552 { data_type
=> "varchar", is_nullable
=> 1, size
=> 255 },
553 "altcontactaddress2",
554 { data_type
=> "varchar", is_nullable
=> 1, size
=> 255 },
555 "altcontactaddress3",
556 { data_type
=> "varchar", is_nullable
=> 1, size
=> 255 },
558 { data_type
=> "text", is_nullable
=> 1 },
560 { data_type
=> "varchar", is_nullable
=> 1, size
=> 50 },
562 { data_type
=> "text", is_nullable
=> 1 },
564 { data_type
=> "varchar", is_nullable
=> 1, size
=> 50 },
566 { data_type
=> "varchar", is_nullable
=> 1, size
=> 50 },
568 { data_type
=> "integer", default_value
=> 1, is_nullable
=> 0 },
569 "privacy_guarantor_checkouts",
570 { data_type
=> "tinyint", default_value
=> 0, is_nullable
=> 0 },
577 =item * L</borrowernumber>
583 __PACKAGE__
->set_primary_key("borrowernumber");
585 =head1 UNIQUE CONSTRAINTS
591 =item * L</cardnumber>
597 __PACKAGE__
->add_unique_constraint("cardnumber", ["cardnumber"]);
609 __PACKAGE__
->add_unique_constraint("userid", ["userid"]);
617 Related object: L<Koha::Schema::Result::Accountline>
621 __PACKAGE__
->has_many(
623 "Koha::Schema::Result::Accountline",
624 { "foreign.borrowernumber" => "self.borrowernumber" },
625 { cascade_copy
=> 0, cascade_delete
=> 0 },
628 =head2 accountoffsets
632 Related object: L<Koha::Schema::Result::Accountoffset>
636 __PACKAGE__
->has_many(
638 "Koha::Schema::Result::Accountoffset",
639 { "foreign.borrowernumber" => "self.borrowernumber" },
640 { cascade_copy
=> 0, cascade_delete
=> 0 },
647 Related object: L<Koha::Schema::Result::Aqbasketuser>
651 __PACKAGE__
->has_many(
653 "Koha::Schema::Result::Aqbasketuser",
654 { "foreign.borrowernumber" => "self.borrowernumber" },
655 { cascade_copy
=> 0, cascade_delete
=> 0 },
658 =head2 aqbudgetborrowers
662 Related object: L<Koha::Schema::Result::Aqbudgetborrower>
666 __PACKAGE__
->has_many(
668 "Koha::Schema::Result::Aqbudgetborrower",
669 { "foreign.borrowernumber" => "self.borrowernumber" },
670 { cascade_copy
=> 0, cascade_delete
=> 0 },
677 Related object: L<Koha::Schema::Result::AqorderUser>
681 __PACKAGE__
->has_many(
683 "Koha::Schema::Result::AqorderUser",
684 { "foreign.borrowernumber" => "self.borrowernumber" },
685 { cascade_copy
=> 0, cascade_delete
=> 0 },
688 =head2 borrower_attributes
692 Related object: L<Koha::Schema::Result::BorrowerAttribute>
696 __PACKAGE__
->has_many(
697 "borrower_attributes",
698 "Koha::Schema::Result::BorrowerAttribute",
699 { "foreign.borrowernumber" => "self.borrowernumber" },
700 { cascade_copy
=> 0, cascade_delete
=> 0 },
703 =head2 borrower_debarments
707 Related object: L<Koha::Schema::Result::BorrowerDebarment>
711 __PACKAGE__
->has_many(
712 "borrower_debarments",
713 "Koha::Schema::Result::BorrowerDebarment",
714 { "foreign.borrowernumber" => "self.borrowernumber" },
715 { cascade_copy
=> 0, cascade_delete
=> 0 },
718 =head2 borrower_files
722 Related object: L<Koha::Schema::Result::BorrowerFile>
726 __PACKAGE__
->has_many(
728 "Koha::Schema::Result::BorrowerFile",
729 { "foreign.borrowernumber" => "self.borrowernumber" },
730 { cascade_copy
=> 0, cascade_delete
=> 0 },
733 =head2 borrower_message_preferences
737 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
741 __PACKAGE__
->has_many(
742 "borrower_message_preferences",
743 "Koha::Schema::Result::BorrowerMessagePreference",
744 { "foreign.borrowernumber" => "self.borrowernumber" },
745 { cascade_copy
=> 0, cascade_delete
=> 0 },
748 =head2 borrower_syncs
752 Related object: L<Koha::Schema::Result::BorrowerSync>
756 __PACKAGE__
->has_many(
758 "Koha::Schema::Result::BorrowerSync",
759 { "foreign.borrowernumber" => "self.borrowernumber" },
760 { cascade_copy
=> 0, cascade_delete
=> 0 },
767 Related object: L<Koha::Schema::Result::Branch>
771 __PACKAGE__
->belongs_to(
773 "Koha::Schema::Result::Branch",
774 { branchcode
=> "branchcode" },
775 { is_deferrable
=> 1, on_delete
=> "RESTRICT", on_update
=> "RESTRICT" },
782 Related object: L<Koha::Schema::Result::Category>
786 __PACKAGE__
->belongs_to(
788 "Koha::Schema::Result::Category",
789 { categorycode
=> "categorycode" },
790 { is_deferrable
=> 1, on_delete
=> "RESTRICT", on_update
=> "RESTRICT" },
793 =head2 course_instructors
797 Related object: L<Koha::Schema::Result::CourseInstructor>
801 __PACKAGE__
->has_many(
802 "course_instructors",
803 "Koha::Schema::Result::CourseInstructor",
804 { "foreign.borrowernumber" => "self.borrowernumber" },
805 { cascade_copy
=> 0, cascade_delete
=> 0 },
808 =head2 creator_batches
812 Related object: L<Koha::Schema::Result::CreatorBatch>
816 __PACKAGE__
->has_many(
818 "Koha::Schema::Result::CreatorBatch",
819 { "foreign.borrower_number" => "self.borrowernumber" },
820 { cascade_copy
=> 0, cascade_delete
=> 0 },
827 Related object: L<Koha::Schema::Result::Discharge>
831 __PACKAGE__
->has_many(
833 "Koha::Schema::Result::Discharge",
834 { "foreign.borrower" => "self.borrowernumber" },
835 { cascade_copy
=> 0, cascade_delete
=> 0 },
838 =head2 hold_fill_targets
842 Related object: L<Koha::Schema::Result::HoldFillTarget>
846 __PACKAGE__
->has_many(
848 "Koha::Schema::Result::HoldFillTarget",
849 { "foreign.borrowernumber" => "self.borrowernumber" },
850 { cascade_copy
=> 0, cascade_delete
=> 0 },
857 Related object: L<Koha::Schema::Result::Issue>
861 __PACKAGE__
->has_many(
863 "Koha::Schema::Result::Issue",
864 { "foreign.borrowernumber" => "self.borrowernumber" },
865 { cascade_copy
=> 0, cascade_delete
=> 0 },
868 =head2 items_last_borrowers
872 Related object: L<Koha::Schema::Result::ItemsLastBorrower>
876 __PACKAGE__
->has_many(
877 "items_last_borrowers",
878 "Koha::Schema::Result::ItemsLastBorrower",
879 { "foreign.borrowernumber" => "self.borrowernumber" },
880 { cascade_copy
=> 0, cascade_delete
=> 0 },
883 =head2 message_queues
887 Related object: L<Koha::Schema::Result::MessageQueue>
891 __PACKAGE__
->has_many(
893 "Koha::Schema::Result::MessageQueue",
894 { "foreign.borrowernumber" => "self.borrowernumber" },
895 { cascade_copy
=> 0, cascade_delete
=> 0 },
902 Related object: L<Koha::Schema::Result::OldIssue>
906 __PACKAGE__
->has_many(
908 "Koha::Schema::Result::OldIssue",
909 { "foreign.borrowernumber" => "self.borrowernumber" },
910 { cascade_copy
=> 0, cascade_delete
=> 0 },
917 Related object: L<Koha::Schema::Result::OldReserve>
921 __PACKAGE__
->has_many(
923 "Koha::Schema::Result::OldReserve",
924 { "foreign.borrowernumber" => "self.borrowernumber" },
925 { cascade_copy
=> 0, cascade_delete
=> 0 },
932 Related object: L<Koha::Schema::Result::OpacNews>
936 __PACKAGE__
->has_many(
938 "Koha::Schema::Result::OpacNews",
939 { "foreign.borrowernumber" => "self.borrowernumber" },
940 { cascade_copy
=> 0, cascade_delete
=> 0 },
943 =head2 patron_list_patrons
947 Related object: L<Koha::Schema::Result::PatronListPatron>
951 __PACKAGE__
->has_many(
952 "patron_list_patrons",
953 "Koha::Schema::Result::PatronListPatron",
954 { "foreign.borrowernumber" => "self.borrowernumber" },
955 { cascade_copy
=> 0, cascade_delete
=> 0 },
962 Related object: L<Koha::Schema::Result::PatronList>
966 __PACKAGE__
->has_many(
968 "Koha::Schema::Result::PatronList",
969 { "foreign.owner" => "self.borrowernumber" },
970 { cascade_copy
=> 0, cascade_delete
=> 0 },
977 Related object: L<Koha::Schema::Result::Patronimage>
981 __PACKAGE__
->might_have(
983 "Koha::Schema::Result::Patronimage",
984 { "foreign.borrowernumber" => "self.borrowernumber" },
985 { cascade_copy
=> 0, cascade_delete
=> 0 },
992 Related object: L<Koha::Schema::Result::Rating>
996 __PACKAGE__
->has_many(
998 "Koha::Schema::Result::Rating",
999 { "foreign.borrowernumber" => "self.borrowernumber" },
1000 { cascade_copy
=> 0, cascade_delete
=> 0 },
1007 Related object: L<Koha::Schema::Result::Reserve>
1011 __PACKAGE__
->has_many(
1013 "Koha::Schema::Result::Reserve",
1014 { "foreign.borrowernumber" => "self.borrowernumber" },
1015 { cascade_copy
=> 0, cascade_delete
=> 0 },
1022 Related object: L<Koha::Schema::Result::Review>
1026 __PACKAGE__
->has_many(
1028 "Koha::Schema::Result::Review",
1029 { "foreign.borrowernumber" => "self.borrowernumber" },
1030 { cascade_copy
=> 0, cascade_delete
=> 0 },
1033 =head2 subscriptionroutinglists
1037 Related object: L<Koha::Schema::Result::Subscriptionroutinglist>
1041 __PACKAGE__
->has_many(
1042 "subscriptionroutinglists",
1043 "Koha::Schema::Result::Subscriptionroutinglist",
1044 { "foreign.borrowernumber" => "self.borrowernumber" },
1045 { cascade_copy
=> 0, cascade_delete
=> 0 },
1052 Related object: L<Koha::Schema::Result::TagAll>
1056 __PACKAGE__
->has_many(
1058 "Koha::Schema::Result::TagAll",
1059 { "foreign.borrowernumber" => "self.borrowernumber" },
1060 { cascade_copy
=> 0, cascade_delete
=> 0 },
1063 =head2 tags_approvals
1067 Related object: L<Koha::Schema::Result::TagsApproval>
1071 __PACKAGE__
->has_many(
1073 "Koha::Schema::Result::TagsApproval",
1074 { "foreign.approved_by" => "self.borrowernumber" },
1075 { cascade_copy
=> 0, cascade_delete
=> 0 },
1078 =head2 user_permissions
1082 Related object: L<Koha::Schema::Result::UserPermission>
1086 __PACKAGE__
->has_many(
1088 "Koha::Schema::Result::UserPermission",
1089 { "foreign.borrowernumber" => "self.borrowernumber" },
1090 { cascade_copy
=> 0, cascade_delete
=> 0 },
1093 =head2 virtualshelfcontents
1097 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
1101 __PACKAGE__
->has_many(
1102 "virtualshelfcontents",
1103 "Koha::Schema::Result::Virtualshelfcontent",
1104 { "foreign.borrowernumber" => "self.borrowernumber" },
1105 { cascade_copy
=> 0, cascade_delete
=> 0 },
1108 =head2 virtualshelfshares
1112 Related object: L<Koha::Schema::Result::Virtualshelfshare>
1116 __PACKAGE__
->has_many(
1117 "virtualshelfshares",
1118 "Koha::Schema::Result::Virtualshelfshare",
1119 { "foreign.borrowernumber" => "self.borrowernumber" },
1120 { cascade_copy
=> 0, cascade_delete
=> 0 },
1123 =head2 virtualshelves
1127 Related object: L<Koha::Schema::Result::Virtualshelve>
1131 __PACKAGE__
->has_many(
1133 "Koha::Schema::Result::Virtualshelve",
1134 { "foreign.owner" => "self.borrowernumber" },
1135 { cascade_copy
=> 0, cascade_delete
=> 0 },
1142 Composing rels: L</aqbasketusers> -> basketno
1146 __PACKAGE__
->many_to_many("basketnoes", "aqbasketusers", "basketno");
1152 Composing rels: L</aqbudgetborrowers> -> budget
1156 __PACKAGE__
->many_to_many("budgets", "aqbudgetborrowers", "budget");
1162 Composing rels: L</course_instructors> -> course
1166 __PACKAGE__
->many_to_many("courses", "course_instructors", "course");
1172 Composing rels: L</aqorder_users> -> ordernumber
1176 __PACKAGE__
->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1179 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-06 11:59:52
1180 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0nIBbkzhb+Yfp6qpSLo51A
1182 __PACKAGE__
->belongs_to(
1184 "Koha::Schema::Result::Borrower",
1185 { borrowernumber
=> "guarantorid" },