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'
325 data_type: 'mediumtext'
346 =head2 altcontactfirstname
352 =head2 altcontactsurname
358 =head2 altcontactaddress1
364 =head2 altcontactaddress2
370 =head2 altcontactaddress3
376 =head2 altcontactstate
381 =head2 altcontactzipcode
387 =head2 altcontactcountry
392 =head2 altcontactphone
398 =head2 smsalertnumber
412 __PACKAGE__->add_columns(
414 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
416 { data_type => "varchar", is_nullable => 1, size => 16 },
418 { data_type => "mediumtext", is_nullable => 0 },
420 { data_type => "text", is_nullable => 1 },
422 { data_type => "mediumtext", is_nullable => 1 },
424 { data_type => "mediumtext", is_nullable => 1 },
426 { data_type => "text", is_nullable => 1 },
428 { data_type => "varchar", is_nullable => 1, size => 10 },
430 { data_type => "varchar", is_nullable => 1, size => 50 },
432 { data_type => "mediumtext", is_nullable => 0 },
434 { data_type => "text", is_nullable => 1 },
436 { data_type => "mediumtext", is_nullable => 0 },
438 { data_type => "text", is_nullable => 1 },
440 { data_type => "varchar", is_nullable => 1, size => 25 },
442 { data_type => "text", is_nullable => 1 },
444 { data_type => "mediumtext", is_nullable => 1 },
446 { data_type => "text", is_nullable => 1 },
448 { data_type => "varchar", is_nullable => 1, size => 50 },
450 { data_type => "mediumtext", is_nullable => 1 },
452 { data_type => "text", is_nullable => 1 },
454 { data_type => "text", is_nullable => 1 },
457 accessor => "b_streetnumber",
458 data_type => "varchar",
464 accessor => "b_streettype",
465 data_type => "varchar",
471 accessor => "b_address",
472 data_type => "varchar",
477 { accessor => "b_address2", data_type => "text", is_nullable => 1 },
479 { accessor => "b_city", data_type => "mediumtext", is_nullable => 1 },
481 { accessor => "b_state", data_type => "text", is_nullable => 1 },
484 accessor => "b_zipcode",
485 data_type => "varchar",
490 { accessor => "b_country", data_type => "text", is_nullable => 1 },
492 { accessor => "b_email", data_type => "text", is_nullable => 1 },
494 { accessor => "b_phone", data_type => "mediumtext", is_nullable => 1 },
496 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
499 data_type => "varchar",
507 data_type => "varchar",
514 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
516 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
518 { data_type => "tinyint", is_nullable => 1 },
520 { data_type => "tinyint", is_nullable => 1 },
522 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
524 { data_type => "varchar", is_nullable => 1, size => 255 },
526 { data_type => "mediumtext", is_nullable => 1 },
528 { data_type => "text", is_nullable => 1 },
530 { data_type => "text", is_nullable => 1 },
532 { data_type => "integer", is_nullable => 1 },
534 { data_type => "mediumtext", is_nullable => 1 },
536 { data_type => "varchar", is_nullable => 1, size => 100 },
538 { data_type => "varchar", is_nullable => 1, size => 50 },
540 { data_type => "varchar", is_nullable => 1, size => 255 },
542 { data_type => "varchar", is_nullable => 1, size => 1 },
544 { data_type => "varchar", is_nullable => 1, size => 60 },
546 { data_type => "integer", is_nullable => 1 },
548 { data_type => "varchar", is_nullable => 1, size => 75 },
550 { data_type => "mediumtext", is_nullable => 1 },
552 { data_type => "varchar", is_nullable => 1, size => 255 },
554 { data_type => "varchar", is_nullable => 1, size => 80 },
556 { data_type => "varchar", is_nullable => 1, size => 80 },
557 "altcontactfirstname",
558 { data_type => "varchar", is_nullable => 1, size => 255 },
560 { data_type => "varchar", is_nullable => 1, size => 255 },
561 "altcontactaddress1",
562 { data_type => "varchar", is_nullable => 1, size => 255 },
563 "altcontactaddress2",
564 { data_type => "varchar", is_nullable => 1, size => 255 },
565 "altcontactaddress3",
566 { data_type => "varchar", is_nullable => 1, size => 255 },
568 { data_type => "text", is_nullable => 1 },
570 { data_type => "varchar", is_nullable => 1, size => 50 },
572 { data_type => "text", is_nullable => 1 },
574 { data_type => "varchar", is_nullable => 1, size => 50 },
576 { data_type => "varchar", is_nullable => 1, size => 50 },
578 { data_type => "integer", default_value => 1, is_nullable => 0 },
585 =item * L</borrowernumber>
591 __PACKAGE__->set_primary_key("borrowernumber");
593 =head1 UNIQUE CONSTRAINTS
599 =item * L</cardnumber>
605 __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]);
617 __PACKAGE__->add_unique_constraint("userid", ["userid"]);
625 Related object: L<Koha::Schema::Result::Accountline>
629 __PACKAGE__->has_many(
631 "Koha::Schema::Result::Accountline",
632 { "foreign.borrowernumber" => "self.borrowernumber" },
633 { cascade_copy => 0, cascade_delete => 0 },
636 =head2 accountoffsets
640 Related object: L<Koha::Schema::Result::Accountoffset>
644 __PACKAGE__->has_many(
646 "Koha::Schema::Result::Accountoffset",
647 { "foreign.borrowernumber" => "self.borrowernumber" },
648 { cascade_copy => 0, cascade_delete => 0 },
655 Related object: L<Koha::Schema::Result::Aqbasketuser>
659 __PACKAGE__->has_many(
661 "Koha::Schema::Result::Aqbasketuser",
662 { "foreign.borrowernumber" => "self.borrowernumber" },
663 { cascade_copy => 0, cascade_delete => 0 },
666 =head2 aqbudgetborrowers
670 Related object: L<Koha::Schema::Result::Aqbudgetborrower>
674 __PACKAGE__->has_many(
676 "Koha::Schema::Result::Aqbudgetborrower",
677 { "foreign.borrowernumber" => "self.borrowernumber" },
678 { cascade_copy => 0, cascade_delete => 0 },
685 Related object: L<Koha::Schema::Result::AqorderUser>
689 __PACKAGE__->has_many(
691 "Koha::Schema::Result::AqorderUser",
692 { "foreign.borrowernumber" => "self.borrowernumber" },
693 { cascade_copy => 0, cascade_delete => 0 },
696 =head2 borrower_attributes
700 Related object: L<Koha::Schema::Result::BorrowerAttribute>
704 __PACKAGE__->has_many(
705 "borrower_attributes",
706 "Koha::Schema::Result::BorrowerAttribute",
707 { "foreign.borrowernumber" => "self.borrowernumber" },
708 { cascade_copy => 0, cascade_delete => 0 },
711 =head2 borrower_debarments
715 Related object: L<Koha::Schema::Result::BorrowerDebarment>
719 __PACKAGE__->has_many(
720 "borrower_debarments",
721 "Koha::Schema::Result::BorrowerDebarment",
722 { "foreign.borrowernumber" => "self.borrowernumber" },
723 { cascade_copy => 0, cascade_delete => 0 },
726 =head2 borrower_files
730 Related object: L<Koha::Schema::Result::BorrowerFile>
734 __PACKAGE__->has_many(
736 "Koha::Schema::Result::BorrowerFile",
737 { "foreign.borrowernumber" => "self.borrowernumber" },
738 { cascade_copy => 0, cascade_delete => 0 },
741 =head2 borrower_message_preferences
745 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
749 __PACKAGE__->has_many(
750 "borrower_message_preferences",
751 "Koha::Schema::Result::BorrowerMessagePreference",
752 { "foreign.borrowernumber" => "self.borrowernumber" },
753 { cascade_copy => 0, cascade_delete => 0 },
756 =head2 borrower_syncs
760 Related object: L<Koha::Schema::Result::BorrowerSync>
764 __PACKAGE__->has_many(
766 "Koha::Schema::Result::BorrowerSync",
767 { "foreign.borrowernumber" => "self.borrowernumber" },
768 { cascade_copy => 0, cascade_delete => 0 },
775 Related object: L<Koha::Schema::Result::Branch>
779 __PACKAGE__->belongs_to(
781 "Koha::Schema::Result::Branch",
782 { branchcode => "branchcode" },
783 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
790 Related object: L<Koha::Schema::Result::Category>
794 __PACKAGE__->belongs_to(
796 "Koha::Schema::Result::Category",
797 { categorycode => "categorycode" },
798 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
801 =head2 course_instructors
805 Related object: L<Koha::Schema::Result::CourseInstructor>
809 __PACKAGE__->has_many(
810 "course_instructors",
811 "Koha::Schema::Result::CourseInstructor",
812 { "foreign.borrowernumber" => "self.borrowernumber" },
813 { cascade_copy => 0, cascade_delete => 0 },
816 =head2 creator_batches
820 Related object: L<Koha::Schema::Result::CreatorBatch>
824 __PACKAGE__->has_many(
826 "Koha::Schema::Result::CreatorBatch",
827 { "foreign.borrower_number" => "self.borrowernumber" },
828 { cascade_copy => 0, cascade_delete => 0 },
835 Related object: L<Koha::Schema::Result::Discharge>
839 __PACKAGE__->has_many(
841 "Koha::Schema::Result::Discharge",
842 { "foreign.borrower" => "self.borrowernumber" },
843 { cascade_copy => 0, cascade_delete => 0 },
846 =head2 hold_fill_targets
850 Related object: L<Koha::Schema::Result::HoldFillTarget>
854 __PACKAGE__->has_many(
856 "Koha::Schema::Result::HoldFillTarget",
857 { "foreign.borrowernumber" => "self.borrowernumber" },
858 { cascade_copy => 0, cascade_delete => 0 },
865 Related object: L<Koha::Schema::Result::Issue>
869 __PACKAGE__->has_many(
871 "Koha::Schema::Result::Issue",
872 { "foreign.borrowernumber" => "self.borrowernumber" },
873 { cascade_copy => 0, cascade_delete => 0 },
876 =head2 message_queues
880 Related object: L<Koha::Schema::Result::MessageQueue>
884 __PACKAGE__->has_many(
886 "Koha::Schema::Result::MessageQueue",
887 { "foreign.borrowernumber" => "self.borrowernumber" },
888 { cascade_copy => 0, cascade_delete => 0 },
895 Related object: L<Koha::Schema::Result::OldIssue>
899 __PACKAGE__->has_many(
901 "Koha::Schema::Result::OldIssue",
902 { "foreign.borrowernumber" => "self.borrowernumber" },
903 { cascade_copy => 0, cascade_delete => 0 },
910 Related object: L<Koha::Schema::Result::OldReserve>
914 __PACKAGE__->has_many(
916 "Koha::Schema::Result::OldReserve",
917 { "foreign.borrowernumber" => "self.borrowernumber" },
918 { cascade_copy => 0, cascade_delete => 0 },
921 =head2 patron_list_patrons
925 Related object: L<Koha::Schema::Result::PatronListPatron>
929 __PACKAGE__->has_many(
930 "patron_list_patrons",
931 "Koha::Schema::Result::PatronListPatron",
932 { "foreign.borrowernumber" => "self.borrowernumber" },
933 { cascade_copy => 0, cascade_delete => 0 },
940 Related object: L<Koha::Schema::Result::PatronList>
944 __PACKAGE__->has_many(
946 "Koha::Schema::Result::PatronList",
947 { "foreign.owner" => "self.borrowernumber" },
948 { cascade_copy => 0, cascade_delete => 0 },
955 Related object: L<Koha::Schema::Result::Patronimage>
959 __PACKAGE__->might_have(
961 "Koha::Schema::Result::Patronimage",
962 { "foreign.borrowernumber" => "self.borrowernumber" },
963 { cascade_copy => 0, cascade_delete => 0 },
970 Related object: L<Koha::Schema::Result::Rating>
974 __PACKAGE__->has_many(
976 "Koha::Schema::Result::Rating",
977 { "foreign.borrowernumber" => "self.borrowernumber" },
978 { cascade_copy => 0, cascade_delete => 0 },
985 Related object: L<Koha::Schema::Result::Reserve>
989 __PACKAGE__->has_many(
991 "Koha::Schema::Result::Reserve",
992 { "foreign.borrowernumber" => "self.borrowernumber" },
993 { cascade_copy => 0, cascade_delete => 0 },
1000 Related object: L<Koha::Schema::Result::Review>
1004 __PACKAGE__->has_many(
1006 "Koha::Schema::Result::Review",
1007 { "foreign.borrowernumber" => "self.borrowernumber" },
1008 { cascade_copy => 0, cascade_delete => 0 },
1011 =head2 subscriptionroutinglists
1015 Related object: L<Koha::Schema::Result::Subscriptionroutinglist>
1019 __PACKAGE__->has_many(
1020 "subscriptionroutinglists",
1021 "Koha::Schema::Result::Subscriptionroutinglist",
1022 { "foreign.borrowernumber" => "self.borrowernumber" },
1023 { cascade_copy => 0, cascade_delete => 0 },
1030 Related object: L<Koha::Schema::Result::TagAll>
1034 __PACKAGE__->has_many(
1036 "Koha::Schema::Result::TagAll",
1037 { "foreign.borrowernumber" => "self.borrowernumber" },
1038 { cascade_copy => 0, cascade_delete => 0 },
1041 =head2 tags_approvals
1045 Related object: L<Koha::Schema::Result::TagsApproval>
1049 __PACKAGE__->has_many(
1051 "Koha::Schema::Result::TagsApproval",
1052 { "foreign.approved_by" => "self.borrowernumber" },
1053 { cascade_copy => 0, cascade_delete => 0 },
1056 =head2 user_permissions
1060 Related object: L<Koha::Schema::Result::UserPermission>
1064 __PACKAGE__->has_many(
1066 "Koha::Schema::Result::UserPermission",
1067 { "foreign.borrowernumber" => "self.borrowernumber" },
1068 { cascade_copy => 0, cascade_delete => 0 },
1071 =head2 virtualshelfcontents
1075 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
1079 __PACKAGE__->has_many(
1080 "virtualshelfcontents",
1081 "Koha::Schema::Result::Virtualshelfcontent",
1082 { "foreign.borrowernumber" => "self.borrowernumber" },
1083 { cascade_copy => 0, cascade_delete => 0 },
1086 =head2 virtualshelfshares
1090 Related object: L<Koha::Schema::Result::Virtualshelfshare>
1094 __PACKAGE__->has_many(
1095 "virtualshelfshares",
1096 "Koha::Schema::Result::Virtualshelfshare",
1097 { "foreign.borrowernumber" => "self.borrowernumber" },
1098 { cascade_copy => 0, cascade_delete => 0 },
1101 =head2 virtualshelves
1105 Related object: L<Koha::Schema::Result::Virtualshelve>
1109 __PACKAGE__->has_many(
1111 "Koha::Schema::Result::Virtualshelve",
1112 { "foreign.owner" => "self.borrowernumber" },
1113 { cascade_copy => 0, cascade_delete => 0 },
1120 Composing rels: L</aqbasketusers> -> basketno
1124 __PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno");
1130 Composing rels: L</aqbudgetborrowers> -> budget
1134 __PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget");
1140 Composing rels: L</course_instructors> -> course
1144 __PACKAGE__->many_to_many("courses", "course_instructors", "course");
1150 Composing rels: L</aqorder_users> -> ordernumber
1154 __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1157 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-04-27 16:08:40
1158 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z50zYBD3Hqlv5/EnoLnyZw
1161 # You can replace this text with custom content, and it will be preserved on regeneration