View | Details | Raw Unified | Return to bug 32607
Collapse All | Expand All

(-)a/Koha/Schema/Result/Borrower.pm (-537 / +538 lines)
Lines 1-4 Link Here
1
use utf8;
1
use utf8;
2
2
package Koha::Schema::Result::Borrower;
3
package Koha::Schema::Result::Borrower;
3
4
4
# Created by DBIx::Class::Schema::Loader
5
# Created by DBIx::Class::Schema::Loader
Lines 650-855 useful for reporting purposes Link Here
650
=cut
651
=cut
651
652
652
__PACKAGE__->add_columns(
653
__PACKAGE__->add_columns(
653
  "borrowernumber",
654
    "borrowernumber",
654
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
655
    { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
655
  "cardnumber",
656
    "cardnumber",
656
  { data_type => "varchar", is_nullable => 1, size => 32 },
657
    { data_type => "varchar", is_nullable => 1, size => 32 },
657
  "surname",
658
    "surname",
658
  { data_type => "longtext", is_nullable => 1 },
659
    { data_type => "longtext", is_nullable => 1 },
659
  "firstname",
660
    "firstname",
660
  { data_type => "mediumtext", is_nullable => 1 },
661
    { data_type => "mediumtext", is_nullable => 1 },
661
  "middle_name",
662
    "middle_name",
662
  { data_type => "longtext", is_nullable => 1 },
663
    { data_type => "longtext", is_nullable => 1 },
663
  "title",
664
    "title",
664
  { data_type => "longtext", is_nullable => 1 },
665
    { data_type => "longtext", is_nullable => 1 },
665
  "othernames",
666
    "othernames",
666
  { data_type => "longtext", is_nullable => 1 },
667
    { data_type => "longtext", is_nullable => 1 },
667
  "initials",
668
    "initials",
668
  { data_type => "mediumtext", is_nullable => 1 },
669
    { data_type => "mediumtext", is_nullable => 1 },
669
  "pronouns",
670
    "pronouns",
670
  { data_type => "longtext", is_nullable => 1 },
671
    { data_type => "longtext", is_nullable => 1 },
671
  "streetnumber",
672
    "streetnumber",
672
  { data_type => "tinytext", is_nullable => 1 },
673
    { data_type => "tinytext", is_nullable => 1 },
673
  "streettype",
674
    "streettype",
674
  { data_type => "tinytext", is_nullable => 1 },
675
    { data_type => "tinytext", is_nullable => 1 },
675
  "address",
676
    "address",
676
  { data_type => "longtext", is_nullable => 1 },
677
    { data_type => "longtext", is_nullable => 1 },
677
  "address2",
678
    "address2",
678
  { data_type => "mediumtext", is_nullable => 1 },
679
    { data_type => "mediumtext", is_nullable => 1 },
679
  "city",
680
    "city",
680
  { data_type => "longtext", is_nullable => 1 },
681
    { data_type => "longtext", is_nullable => 1 },
681
  "state",
682
    "state",
682
  { data_type => "mediumtext", is_nullable => 1 },
683
    { data_type => "mediumtext", is_nullable => 1 },
683
  "zipcode",
684
    "zipcode",
684
  { data_type => "tinytext", is_nullable => 1 },
685
    { data_type => "tinytext", is_nullable => 1 },
685
  "country",
686
    "country",
686
  { data_type => "mediumtext", is_nullable => 1 },
687
    { data_type => "mediumtext", is_nullable => 1 },
687
  "email",
688
    "email",
688
  { data_type => "longtext", is_nullable => 1 },
689
    { data_type => "longtext", is_nullable => 1 },
689
  "phone",
690
    "phone",
690
  { data_type => "mediumtext", is_nullable => 1 },
691
    { data_type => "mediumtext", is_nullable => 1 },
691
  "mobile",
692
    "mobile",
692
  { data_type => "tinytext", is_nullable => 1 },
693
    { data_type => "tinytext", is_nullable => 1 },
693
  "fax",
694
    "fax",
694
  { data_type => "longtext", is_nullable => 1 },
695
    { data_type => "longtext", is_nullable => 1 },
695
  "emailpro",
696
    "emailpro",
696
  { data_type => "mediumtext", is_nullable => 1 },
697
    { data_type => "mediumtext", is_nullable => 1 },
697
  "phonepro",
698
    "phonepro",
698
  { data_type => "mediumtext", is_nullable => 1 },
699
    { data_type => "mediumtext", is_nullable => 1 },
699
  "B_streetnumber",
700
    "B_streetnumber",
700
  { accessor => "b_streetnumber", data_type => "tinytext", is_nullable => 1 },
701
    { accessor => "b_streetnumber", data_type => "tinytext", is_nullable => 1 },
701
  "B_streettype",
702
    "B_streettype",
702
  { accessor => "b_streettype", data_type => "tinytext", is_nullable => 1 },
703
    { accessor => "b_streettype", data_type => "tinytext", is_nullable => 1 },
703
  "B_address",
704
    "B_address",
704
  { accessor => "b_address", data_type => "mediumtext", is_nullable => 1 },
705
    { accessor => "b_address", data_type => "mediumtext", is_nullable => 1 },
705
  "B_address2",
706
    "B_address2",
706
  { accessor => "b_address2", data_type => "mediumtext", is_nullable => 1 },
707
    { accessor => "b_address2", data_type => "mediumtext", is_nullable => 1 },
707
  "B_city",
708
    "B_city",
708
  { accessor => "b_city", data_type => "longtext", is_nullable => 1 },
709
    { accessor => "b_city", data_type => "longtext", is_nullable => 1 },
709
  "B_state",
710
    "B_state",
710
  { accessor => "b_state", data_type => "mediumtext", is_nullable => 1 },
711
    { accessor => "b_state", data_type => "mediumtext", is_nullable => 1 },
711
  "B_zipcode",
712
    "B_zipcode",
712
  { accessor => "b_zipcode", data_type => "tinytext", is_nullable => 1 },
713
    { accessor => "b_zipcode", data_type => "tinytext", is_nullable => 1 },
713
  "B_country",
714
    "B_country",
714
  { accessor => "b_country", data_type => "mediumtext", is_nullable => 1 },
715
    { accessor => "b_country", data_type => "mediumtext", is_nullable => 1 },
715
  "B_email",
716
    "B_email",
716
  { accessor => "b_email", data_type => "mediumtext", is_nullable => 1 },
717
    { accessor => "b_email", data_type => "mediumtext", is_nullable => 1 },
717
  "B_phone",
718
    "B_phone",
718
  { accessor => "b_phone", data_type => "longtext", is_nullable => 1 },
719
    { accessor => "b_phone", data_type => "longtext", is_nullable => 1 },
719
  "dateofbirth",
720
    "dateofbirth",
720
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
721
    { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
721
  "branchcode",
722
    "branchcode",
722
  {
723
    {
723
    data_type => "varchar",
724
        data_type      => "varchar",
724
    default_value => "",
725
        default_value  => "",
725
    is_foreign_key => 1,
726
        is_foreign_key => 1,
726
    is_nullable => 0,
727
        is_nullable    => 0,
727
    size => 10,
728
        size           => 10,
728
  },
729
    },
729
  "categorycode",
730
    "categorycode",
730
  {
731
    {
731
    data_type => "varchar",
732
        data_type      => "varchar",
732
    default_value => "",
733
        default_value  => "",
733
    is_foreign_key => 1,
734
        is_foreign_key => 1,
734
    is_nullable => 0,
735
        is_nullable    => 0,
735
    size => 10,
736
        size           => 10,
736
  },
737
    },
737
  "dateenrolled",
738
    "dateenrolled",
738
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
739
    { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
739
  "dateexpiry",
740
    "dateexpiry",
740
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
741
    { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
741
  "password_expiration_date",
742
    "password_expiration_date",
742
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
743
    { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
743
  "date_renewed",
744
    "date_renewed",
744
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
745
    { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
745
  "gonenoaddress",
746
    "gonenoaddress",
746
  { data_type => "tinyint", is_nullable => 1 },
747
    { data_type => "tinyint", is_nullable => 1 },
747
  "lost",
748
    "lost",
748
  { data_type => "tinyint", is_nullable => 1 },
749
    { data_type => "tinyint", is_nullable => 1 },
749
  "debarred",
750
    "debarred",
750
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
751
    { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
751
  "debarredcomment",
752
    "debarredcomment",
752
  { data_type => "varchar", is_nullable => 1, size => 255 },
753
    { data_type => "varchar", is_nullable => 1, size => 255 },
753
  "contactname",
754
    "contactname",
754
  { data_type => "longtext", is_nullable => 1 },
755
    { data_type => "longtext", is_nullable => 1 },
755
  "contactfirstname",
756
    "contactfirstname",
756
  { data_type => "mediumtext", is_nullable => 1 },
757
    { data_type => "mediumtext", is_nullable => 1 },
757
  "contacttitle",
758
    "contacttitle",
758
  { data_type => "mediumtext", is_nullable => 1 },
759
    { data_type => "mediumtext", is_nullable => 1 },
759
  "borrowernotes",
760
    "borrowernotes",
760
  { data_type => "longtext", is_nullable => 1 },
761
    { data_type => "longtext", is_nullable => 1 },
761
  "relationship",
762
    "relationship",
762
  { data_type => "varchar", is_nullable => 1, size => 100 },
763
    { data_type => "varchar", is_nullable => 1, size => 100 },
763
  "sex",
764
    "sex",
764
  { data_type => "varchar", is_nullable => 1, size => 1 },
765
    { data_type => "varchar", is_nullable => 1, size => 1 },
765
  "password",
766
    "password",
766
  { data_type => "varchar", is_nullable => 1, size => 60 },
767
    { data_type => "varchar", is_nullable => 1, size => 60 },
767
  "secret",
768
    "secret",
768
  { data_type => "mediumtext", is_nullable => 1 },
769
    { data_type => "mediumtext", is_nullable => 1 },
769
  "auth_method",
770
    "auth_method",
770
  {
771
    {
771
    data_type => "enum",
772
        data_type     => "enum",
772
    default_value => "password",
773
        default_value => "password",
773
    extra => { list => ["password", "two-factor"] },
774
        extra         => { list => [ "password", "two-factor" ] },
774
    is_nullable => 0,
775
        is_nullable   => 0,
775
  },
776
    },
776
  "flags",
777
    "flags",
777
  { data_type => "bigint", is_nullable => 1 },
778
    { data_type => "bigint", is_nullable => 1 },
778
  "userid",
779
    "userid",
779
  { data_type => "varchar", is_nullable => 1, size => 75 },
780
    { data_type => "varchar", is_nullable => 1, size => 75 },
780
  "opacnote",
781
    "opacnote",
781
  { data_type => "longtext", is_nullable => 1 },
782
    { data_type => "longtext", is_nullable => 1 },
782
  "contactnote",
783
    "contactnote",
783
  { data_type => "varchar", is_nullable => 1, size => 255 },
784
    { data_type => "varchar", is_nullable => 1, size => 255 },
784
  "sort1",
785
    "sort1",
785
  { data_type => "varchar", is_nullable => 1, size => 80 },
786
    { data_type => "varchar", is_nullable => 1, size => 80 },
786
  "sort2",
787
    "sort2",
787
  { data_type => "varchar", is_nullable => 1, size => 80 },
788
    { data_type => "varchar", is_nullable => 1, size => 80 },
788
  "altcontactfirstname",
789
    "altcontactfirstname",
789
  { data_type => "mediumtext", is_nullable => 1 },
790
    { data_type => "mediumtext", is_nullable => 1 },
790
  "altcontactsurname",
791
    "altcontactsurname",
791
  { data_type => "mediumtext", is_nullable => 1 },
792
    { data_type => "mediumtext", is_nullable => 1 },
792
  "altcontactaddress1",
793
    "altcontactaddress1",
793
  { data_type => "mediumtext", is_nullable => 1 },
794
    { data_type => "mediumtext", is_nullable => 1 },
794
  "altcontactaddress2",
795
    "altcontactaddress2",
795
  { data_type => "mediumtext", is_nullable => 1 },
796
    { data_type => "mediumtext", is_nullable => 1 },
796
  "altcontactaddress3",
797
    "altcontactaddress3",
797
  { data_type => "mediumtext", is_nullable => 1 },
798
    { data_type => "mediumtext", is_nullable => 1 },
798
  "altcontactstate",
799
    "altcontactstate",
799
  { data_type => "mediumtext", is_nullable => 1 },
800
    { data_type => "mediumtext", is_nullable => 1 },
800
  "altcontactzipcode",
801
    "altcontactzipcode",
801
  { data_type => "mediumtext", is_nullable => 1 },
802
    { data_type => "mediumtext", is_nullable => 1 },
802
  "altcontactcountry",
803
    "altcontactcountry",
803
  { data_type => "mediumtext", is_nullable => 1 },
804
    { data_type => "mediumtext", is_nullable => 1 },
804
  "altcontactphone",
805
    "altcontactphone",
805
  { data_type => "mediumtext", is_nullable => 1 },
806
    { data_type => "mediumtext", is_nullable => 1 },
806
  "smsalertnumber",
807
    "smsalertnumber",
807
  { data_type => "varchar", is_nullable => 1, size => 50 },
808
    { data_type => "varchar", is_nullable => 1, size => 50 },
808
  "sms_provider_id",
809
    "sms_provider_id",
809
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
810
    { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
810
  "privacy",
811
    "privacy",
811
  { data_type => "integer", default_value => 1, is_nullable => 0 },
812
    { data_type => "integer", default_value => 1, is_nullable => 0 },
812
  "privacy_guarantor_fines",
813
    "privacy_guarantor_fines",
813
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
814
    { data_type => "tinyint", default_value => 0, is_nullable => 0 },
814
  "privacy_guarantor_checkouts",
815
    "privacy_guarantor_checkouts",
815
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
816
    { data_type => "tinyint", default_value => 0, is_nullable => 0 },
816
  "checkprevcheckout",
817
    "checkprevcheckout",
817
  {
818
    {
818
    data_type => "varchar",
819
        data_type     => "varchar",
819
    default_value => "inherit",
820
        default_value => "inherit",
820
    is_nullable => 0,
821
        is_nullable   => 0,
821
    size => 7,
822
        size          => 7,
822
  },
823
    },
823
  "updated_on",
824
    "updated_on",
824
  {
825
    {
825
    data_type => "timestamp",
826
        data_type                 => "timestamp",
826
    datetime_undef_if_invalid => 1,
827
        datetime_undef_if_invalid => 1,
827
    default_value => \"current_timestamp",
828
        default_value             => \"current_timestamp",
828
    is_nullable => 0,
829
        is_nullable               => 0,
829
  },
830
    },
830
  "lastseen",
831
    "lastseen",
831
  {
832
    {
832
    data_type => "datetime",
833
        data_type                 => "datetime",
833
    datetime_undef_if_invalid => 1,
834
        datetime_undef_if_invalid => 1,
834
    is_nullable => 1,
835
        is_nullable               => 1,
835
  },
836
    },
836
  "lang",
837
    "lang",
837
  {
838
    {
838
    data_type => "varchar",
839
        data_type     => "varchar",
839
    default_value => "default",
840
        default_value => "default",
840
    is_nullable => 0,
841
        is_nullable   => 0,
841
    size => 25,
842
        size          => 25,
842
  },
843
    },
843
  "login_attempts",
844
    "login_attempts",
844
  { data_type => "integer", default_value => 0, is_nullable => 0 },
845
    { data_type => "integer", default_value => 0, is_nullable => 0 },
845
  "overdrive_auth_token",
846
    "overdrive_auth_token",
846
  { data_type => "mediumtext", is_nullable => 1 },
847
    { data_type => "mediumtext", is_nullable => 1 },
847
  "anonymized",
848
    "anonymized",
848
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
849
    { data_type => "tinyint", default_value => 0, is_nullable => 0 },
849
  "autorenew_checkouts",
850
    "autorenew_checkouts",
850
  { data_type => "tinyint", default_value => 1, is_nullable => 0 },
851
    { data_type => "tinyint", default_value => 1, is_nullable => 0 },
851
  "primary_contact_method",
852
    "primary_contact_method",
852
  { data_type => "varchar", is_nullable => 1, size => 45 },
853
    { data_type => "varchar", is_nullable => 1, size => 45 },
853
);
854
);
854
855
855
=head1 PRIMARY KEY
856
=head1 PRIMARY KEY
Lines 876-882 __PACKAGE__->set_primary_key("borrowernumber"); Link Here
876
877
877
=cut
878
=cut
878
879
879
__PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]);
880
__PACKAGE__->add_unique_constraint( "cardnumber", ["cardnumber"] );
880
881
881
=head2 C<userid>
882
=head2 C<userid>
882
883
Lines 888-894 __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]); Link Here
888
889
889
=cut
890
=cut
890
891
891
__PACKAGE__->add_unique_constraint("userid", ["userid"]);
892
__PACKAGE__->add_unique_constraint( "userid", ["userid"] );
892
893
893
=head1 RELATIONS
894
=head1 RELATIONS
894
895
Lines 901-910 Related object: L<Koha::Schema::Result::Accountline> Link Here
901
=cut
902
=cut
902
903
903
__PACKAGE__->has_many(
904
__PACKAGE__->has_many(
904
  "accountlines",
905
    "accountlines",
905
  "Koha::Schema::Result::Accountline",
906
    "Koha::Schema::Result::Accountline",
906
  { "foreign.borrowernumber" => "self.borrowernumber" },
907
    { "foreign.borrowernumber" => "self.borrowernumber" },
907
  { cascade_copy => 0, cascade_delete => 0 },
908
    { cascade_copy             => 0, cascade_delete => 0 },
908
);
909
);
909
910
910
=head2 accountlines_managers
911
=head2 accountlines_managers
Lines 916-925 Related object: L<Koha::Schema::Result::Accountline> Link Here
916
=cut
917
=cut
917
918
918
__PACKAGE__->has_many(
919
__PACKAGE__->has_many(
919
  "accountlines_managers",
920
    "accountlines_managers",
920
  "Koha::Schema::Result::Accountline",
921
    "Koha::Schema::Result::Accountline",
921
  { "foreign.manager_id" => "self.borrowernumber" },
922
    { "foreign.manager_id" => "self.borrowernumber" },
922
  { cascade_copy => 0, cascade_delete => 0 },
923
    { cascade_copy         => 0, cascade_delete => 0 },
923
);
924
);
924
925
925
=head2 additional_contents
926
=head2 additional_contents
Lines 931-940 Related object: L<Koha::Schema::Result::AdditionalContent> Link Here
931
=cut
932
=cut
932
933
933
__PACKAGE__->has_many(
934
__PACKAGE__->has_many(
934
  "additional_contents",
935
    "additional_contents",
935
  "Koha::Schema::Result::AdditionalContent",
936
    "Koha::Schema::Result::AdditionalContent",
936
  { "foreign.borrowernumber" => "self.borrowernumber" },
937
    { "foreign.borrowernumber" => "self.borrowernumber" },
937
  { cascade_copy => 0, cascade_delete => 0 },
938
    { cascade_copy             => 0, cascade_delete => 0 },
938
);
939
);
939
940
940
=head2 advanced_editor_macros
941
=head2 advanced_editor_macros
Lines 946-955 Related object: L<Koha::Schema::Result::AdvancedEditorMacro> Link Here
946
=cut
947
=cut
947
948
948
__PACKAGE__->has_many(
949
__PACKAGE__->has_many(
949
  "advanced_editor_macros",
950
    "advanced_editor_macros",
950
  "Koha::Schema::Result::AdvancedEditorMacro",
951
    "Koha::Schema::Result::AdvancedEditorMacro",
951
  { "foreign.borrowernumber" => "self.borrowernumber" },
952
    { "foreign.borrowernumber" => "self.borrowernumber" },
952
  { cascade_copy => 0, cascade_delete => 0 },
953
    { cascade_copy             => 0, cascade_delete => 0 },
953
);
954
);
954
955
955
=head2 alerts
956
=head2 alerts
Lines 961-970 Related object: L<Koha::Schema::Result::Alert> Link Here
961
=cut
962
=cut
962
963
963
__PACKAGE__->has_many(
964
__PACKAGE__->has_many(
964
  "alerts",
965
    "alerts",
965
  "Koha::Schema::Result::Alert",
966
    "Koha::Schema::Result::Alert",
966
  { "foreign.borrowernumber" => "self.borrowernumber" },
967
    { "foreign.borrowernumber" => "self.borrowernumber" },
967
  { cascade_copy => 0, cascade_delete => 0 },
968
    { cascade_copy             => 0, cascade_delete => 0 },
968
);
969
);
969
970
970
=head2 api_keys
971
=head2 api_keys
Lines 976-985 Related object: L<Koha::Schema::Result::ApiKey> Link Here
976
=cut
977
=cut
977
978
978
__PACKAGE__->has_many(
979
__PACKAGE__->has_many(
979
  "api_keys",
980
    "api_keys",
980
  "Koha::Schema::Result::ApiKey",
981
    "Koha::Schema::Result::ApiKey",
981
  { "foreign.patron_id" => "self.borrowernumber" },
982
    { "foreign.patron_id" => "self.borrowernumber" },
982
  { cascade_copy => 0, cascade_delete => 0 },
983
    { cascade_copy        => 0, cascade_delete => 0 },
983
);
984
);
984
985
985
=head2 aqbasketusers
986
=head2 aqbasketusers
Lines 991-1000 Related object: L<Koha::Schema::Result::Aqbasketuser> Link Here
991
=cut
992
=cut
992
993
993
__PACKAGE__->has_many(
994
__PACKAGE__->has_many(
994
  "aqbasketusers",
995
    "aqbasketusers",
995
  "Koha::Schema::Result::Aqbasketuser",
996
    "Koha::Schema::Result::Aqbasketuser",
996
  { "foreign.borrowernumber" => "self.borrowernumber" },
997
    { "foreign.borrowernumber" => "self.borrowernumber" },
997
  { cascade_copy => 0, cascade_delete => 0 },
998
    { cascade_copy             => 0, cascade_delete => 0 },
998
);
999
);
999
1000
1000
=head2 aqbudgetborrowers
1001
=head2 aqbudgetborrowers
Lines 1006-1015 Related object: L<Koha::Schema::Result::Aqbudgetborrower> Link Here
1006
=cut
1007
=cut
1007
1008
1008
__PACKAGE__->has_many(
1009
__PACKAGE__->has_many(
1009
  "aqbudgetborrowers",
1010
    "aqbudgetborrowers",
1010
  "Koha::Schema::Result::Aqbudgetborrower",
1011
    "Koha::Schema::Result::Aqbudgetborrower",
1011
  { "foreign.borrowernumber" => "self.borrowernumber" },
1012
    { "foreign.borrowernumber" => "self.borrowernumber" },
1012
  { cascade_copy => 0, cascade_delete => 0 },
1013
    { cascade_copy             => 0, cascade_delete => 0 },
1013
);
1014
);
1014
1015
1015
=head2 aqorder_users
1016
=head2 aqorder_users
Lines 1021-1030 Related object: L<Koha::Schema::Result::AqorderUser> Link Here
1021
=cut
1022
=cut
1022
1023
1023
__PACKAGE__->has_many(
1024
__PACKAGE__->has_many(
1024
  "aqorder_users",
1025
    "aqorder_users",
1025
  "Koha::Schema::Result::AqorderUser",
1026
    "Koha::Schema::Result::AqorderUser",
1026
  { "foreign.borrowernumber" => "self.borrowernumber" },
1027
    { "foreign.borrowernumber" => "self.borrowernumber" },
1027
  { cascade_copy => 0, cascade_delete => 0 },
1028
    { cascade_copy             => 0, cascade_delete => 0 },
1028
);
1029
);
1029
1030
1030
=head2 aqorders
1031
=head2 aqorders
Lines 1036-1045 Related object: L<Koha::Schema::Result::Aqorder> Link Here
1036
=cut
1037
=cut
1037
1038
1038
__PACKAGE__->has_many(
1039
__PACKAGE__->has_many(
1039
  "aqorders",
1040
    "aqorders",
1040
  "Koha::Schema::Result::Aqorder",
1041
    "Koha::Schema::Result::Aqorder",
1041
  { "foreign.created_by" => "self.borrowernumber" },
1042
    { "foreign.created_by" => "self.borrowernumber" },
1042
  { cascade_copy => 0, cascade_delete => 0 },
1043
    { cascade_copy         => 0, cascade_delete => 0 },
1043
);
1044
);
1044
1045
1045
=head2 article_requests
1046
=head2 article_requests
Lines 1051-1060 Related object: L<Koha::Schema::Result::ArticleRequest> Link Here
1051
=cut
1052
=cut
1052
1053
1053
__PACKAGE__->has_many(
1054
__PACKAGE__->has_many(
1054
  "article_requests",
1055
    "article_requests",
1055
  "Koha::Schema::Result::ArticleRequest",
1056
    "Koha::Schema::Result::ArticleRequest",
1056
  { "foreign.borrowernumber" => "self.borrowernumber" },
1057
    { "foreign.borrowernumber" => "self.borrowernumber" },
1057
  { cascade_copy => 0, cascade_delete => 0 },
1058
    { cascade_copy             => 0, cascade_delete => 0 },
1058
);
1059
);
1059
1060
1060
=head2 borrower_attributes
1061
=head2 borrower_attributes
Lines 1066-1075 Related object: L<Koha::Schema::Result::BorrowerAttribute> Link Here
1066
=cut
1067
=cut
1067
1068
1068
__PACKAGE__->has_many(
1069
__PACKAGE__->has_many(
1069
  "borrower_attributes",
1070
    "borrower_attributes",
1070
  "Koha::Schema::Result::BorrowerAttribute",
1071
    "Koha::Schema::Result::BorrowerAttribute",
1071
  { "foreign.borrowernumber" => "self.borrowernumber" },
1072
    { "foreign.borrowernumber" => "self.borrowernumber" },
1072
  { cascade_copy => 0, cascade_delete => 0 },
1073
    { cascade_copy             => 0, cascade_delete => 0 },
1073
);
1074
);
1074
1075
1075
=head2 borrower_debarments
1076
=head2 borrower_debarments
Lines 1081-1090 Related object: L<Koha::Schema::Result::BorrowerDebarment> Link Here
1081
=cut
1082
=cut
1082
1083
1083
__PACKAGE__->has_many(
1084
__PACKAGE__->has_many(
1084
  "borrower_debarments",
1085
    "borrower_debarments",
1085
  "Koha::Schema::Result::BorrowerDebarment",
1086
    "Koha::Schema::Result::BorrowerDebarment",
1086
  { "foreign.borrowernumber" => "self.borrowernumber" },
1087
    { "foreign.borrowernumber" => "self.borrowernumber" },
1087
  { cascade_copy => 0, cascade_delete => 0 },
1088
    { cascade_copy             => 0, cascade_delete => 0 },
1088
);
1089
);
1089
1090
1090
=head2 borrower_files
1091
=head2 borrower_files
Lines 1096-1105 Related object: L<Koha::Schema::Result::BorrowerFile> Link Here
1096
=cut
1097
=cut
1097
1098
1098
__PACKAGE__->has_many(
1099
__PACKAGE__->has_many(
1099
  "borrower_files",
1100
    "borrower_files",
1100
  "Koha::Schema::Result::BorrowerFile",
1101
    "Koha::Schema::Result::BorrowerFile",
1101
  { "foreign.borrowernumber" => "self.borrowernumber" },
1102
    { "foreign.borrowernumber" => "self.borrowernumber" },
1102
  { cascade_copy => 0, cascade_delete => 0 },
1103
    { cascade_copy             => 0, cascade_delete => 0 },
1103
);
1104
);
1104
1105
1105
=head2 borrower_message_preferences
1106
=head2 borrower_message_preferences
Lines 1111-1120 Related object: L<Koha::Schema::Result::BorrowerMessagePreference> Link Here
1111
=cut
1112
=cut
1112
1113
1113
__PACKAGE__->has_many(
1114
__PACKAGE__->has_many(
1114
  "borrower_message_preferences",
1115
    "borrower_message_preferences",
1115
  "Koha::Schema::Result::BorrowerMessagePreference",
1116
    "Koha::Schema::Result::BorrowerMessagePreference",
1116
  { "foreign.borrowernumber" => "self.borrowernumber" },
1117
    { "foreign.borrowernumber" => "self.borrowernumber" },
1117
  { cascade_copy => 0, cascade_delete => 0 },
1118
    { cascade_copy             => 0, cascade_delete => 0 },
1118
);
1119
);
1119
1120
1120
=head2 borrower_relationships_guarantees
1121
=head2 borrower_relationships_guarantees
Lines 1126-1135 Related object: L<Koha::Schema::Result::BorrowerRelationship> Link Here
1126
=cut
1127
=cut
1127
1128
1128
__PACKAGE__->has_many(
1129
__PACKAGE__->has_many(
1129
  "borrower_relationships_guarantees",
1130
    "borrower_relationships_guarantees",
1130
  "Koha::Schema::Result::BorrowerRelationship",
1131
    "Koha::Schema::Result::BorrowerRelationship",
1131
  { "foreign.guarantee_id" => "self.borrowernumber" },
1132
    { "foreign.guarantee_id" => "self.borrowernumber" },
1132
  { cascade_copy => 0, cascade_delete => 0 },
1133
    { cascade_copy           => 0, cascade_delete => 0 },
1133
);
1134
);
1134
1135
1135
=head2 borrower_relationships_guarantors
1136
=head2 borrower_relationships_guarantors
Lines 1141-1150 Related object: L<Koha::Schema::Result::BorrowerRelationship> Link Here
1141
=cut
1142
=cut
1142
1143
1143
__PACKAGE__->has_many(
1144
__PACKAGE__->has_many(
1144
  "borrower_relationships_guarantors",
1145
    "borrower_relationships_guarantors",
1145
  "Koha::Schema::Result::BorrowerRelationship",
1146
    "Koha::Schema::Result::BorrowerRelationship",
1146
  { "foreign.guarantor_id" => "self.borrowernumber" },
1147
    { "foreign.guarantor_id" => "self.borrowernumber" },
1147
  { cascade_copy => 0, cascade_delete => 0 },
1148
    { cascade_copy           => 0, cascade_delete => 0 },
1148
);
1149
);
1149
1150
1150
=head2 branchcode
1151
=head2 branchcode
Lines 1156-1165 Related object: L<Koha::Schema::Result::Branch> Link Here
1156
=cut
1157
=cut
1157
1158
1158
__PACKAGE__->belongs_to(
1159
__PACKAGE__->belongs_to(
1159
  "branchcode",
1160
    "branchcode",
1160
  "Koha::Schema::Result::Branch",
1161
    "Koha::Schema::Result::Branch",
1161
  { branchcode => "branchcode" },
1162
    { branchcode    => "branchcode" },
1162
  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
1163
    { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
1163
);
1164
);
1164
1165
1165
=head2 cash_register_actions
1166
=head2 cash_register_actions
Lines 1171-1180 Related object: L<Koha::Schema::Result::CashRegisterAction> Link Here
1171
=cut
1172
=cut
1172
1173
1173
__PACKAGE__->has_many(
1174
__PACKAGE__->has_many(
1174
  "cash_register_actions",
1175
    "cash_register_actions",
1175
  "Koha::Schema::Result::CashRegisterAction",
1176
    "Koha::Schema::Result::CashRegisterAction",
1176
  { "foreign.manager_id" => "self.borrowernumber" },
1177
    { "foreign.manager_id" => "self.borrowernumber" },
1177
  { cascade_copy => 0, cascade_delete => 0 },
1178
    { cascade_copy         => 0, cascade_delete => 0 },
1178
);
1179
);
1179
1180
1180
=head2 categorycode
1181
=head2 categorycode
Lines 1186-1195 Related object: L<Koha::Schema::Result::Category> Link Here
1186
=cut
1187
=cut
1187
1188
1188
__PACKAGE__->belongs_to(
1189
__PACKAGE__->belongs_to(
1189
  "categorycode",
1190
    "categorycode",
1190
  "Koha::Schema::Result::Category",
1191
    "Koha::Schema::Result::Category",
1191
  { categorycode => "categorycode" },
1192
    { categorycode  => "categorycode" },
1192
  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
1193
    { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
1193
);
1194
);
1194
1195
1195
=head2 checkout_renewals
1196
=head2 checkout_renewals
Lines 1201-1210 Related object: L<Koha::Schema::Result::CheckoutRenewal> Link Here
1201
=cut
1202
=cut
1202
1203
1203
__PACKAGE__->has_many(
1204
__PACKAGE__->has_many(
1204
  "checkout_renewals",
1205
    "checkout_renewals",
1205
  "Koha::Schema::Result::CheckoutRenewal",
1206
    "Koha::Schema::Result::CheckoutRenewal",
1206
  { "foreign.renewer_id" => "self.borrowernumber" },
1207
    { "foreign.renewer_id" => "self.borrowernumber" },
1207
  { cascade_copy => 0, cascade_delete => 0 },
1208
    { cascade_copy         => 0, cascade_delete => 0 },
1208
);
1209
);
1209
1210
1210
=head2 club_enrollments
1211
=head2 club_enrollments
Lines 1216-1225 Related object: L<Koha::Schema::Result::ClubEnrollment> Link Here
1216
=cut
1217
=cut
1217
1218
1218
__PACKAGE__->has_many(
1219
__PACKAGE__->has_many(
1219
  "club_enrollments",
1220
    "club_enrollments",
1220
  "Koha::Schema::Result::ClubEnrollment",
1221
    "Koha::Schema::Result::ClubEnrollment",
1221
  { "foreign.borrowernumber" => "self.borrowernumber" },
1222
    { "foreign.borrowernumber" => "self.borrowernumber" },
1222
  { cascade_copy => 0, cascade_delete => 0 },
1223
    { cascade_copy             => 0, cascade_delete => 0 },
1223
);
1224
);
1224
1225
1225
=head2 club_holds_to_patron_holds
1226
=head2 club_holds_to_patron_holds
Lines 1231-1240 Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold> Link Here
1231
=cut
1232
=cut
1232
1233
1233
__PACKAGE__->has_many(
1234
__PACKAGE__->has_many(
1234
  "club_holds_to_patron_holds",
1235
    "club_holds_to_patron_holds",
1235
  "Koha::Schema::Result::ClubHoldsToPatronHold",
1236
    "Koha::Schema::Result::ClubHoldsToPatronHold",
1236
  { "foreign.patron_id" => "self.borrowernumber" },
1237
    { "foreign.patron_id" => "self.borrowernumber" },
1237
  { cascade_copy => 0, cascade_delete => 0 },
1238
    { cascade_copy        => 0, cascade_delete => 0 },
1238
);
1239
);
1239
1240
1240
=head2 course_instructors
1241
=head2 course_instructors
Lines 1246-1255 Related object: L<Koha::Schema::Result::CourseInstructor> Link Here
1246
=cut
1247
=cut
1247
1248
1248
__PACKAGE__->has_many(
1249
__PACKAGE__->has_many(
1249
  "course_instructors",
1250
    "course_instructors",
1250
  "Koha::Schema::Result::CourseInstructor",
1251
    "Koha::Schema::Result::CourseInstructor",
1251
  { "foreign.borrowernumber" => "self.borrowernumber" },
1252
    { "foreign.borrowernumber" => "self.borrowernumber" },
1252
  { cascade_copy => 0, cascade_delete => 0 },
1253
    { cascade_copy             => 0, cascade_delete => 0 },
1253
);
1254
);
1254
1255
1255
=head2 creator_batches
1256
=head2 creator_batches
Lines 1261-1270 Related object: L<Koha::Schema::Result::CreatorBatch> Link Here
1261
=cut
1262
=cut
1262
1263
1263
__PACKAGE__->has_many(
1264
__PACKAGE__->has_many(
1264
  "creator_batches",
1265
    "creator_batches",
1265
  "Koha::Schema::Result::CreatorBatch",
1266
    "Koha::Schema::Result::CreatorBatch",
1266
  { "foreign.borrower_number" => "self.borrowernumber" },
1267
    { "foreign.borrower_number" => "self.borrowernumber" },
1267
  { cascade_copy => 0, cascade_delete => 0 },
1268
    { cascade_copy              => 0, cascade_delete => 0 },
1268
);
1269
);
1269
1270
1270
=head2 curbside_pickups_borrowernumbers
1271
=head2 curbside_pickups_borrowernumbers
Lines 1276-1285 Related object: L<Koha::Schema::Result::CurbsidePickup> Link Here
1276
=cut
1277
=cut
1277
1278
1278
__PACKAGE__->has_many(
1279
__PACKAGE__->has_many(
1279
  "curbside_pickups_borrowernumbers",
1280
    "curbside_pickups_borrowernumbers",
1280
  "Koha::Schema::Result::CurbsidePickup",
1281
    "Koha::Schema::Result::CurbsidePickup",
1281
  { "foreign.borrowernumber" => "self.borrowernumber" },
1282
    { "foreign.borrowernumber" => "self.borrowernumber" },
1282
  { cascade_copy => 0, cascade_delete => 0 },
1283
    { cascade_copy             => 0, cascade_delete => 0 },
1283
);
1284
);
1284
1285
1285
=head2 curbside_pickups_staged_by
1286
=head2 curbside_pickups_staged_by
Lines 1291-1300 Related object: L<Koha::Schema::Result::CurbsidePickup> Link Here
1291
=cut
1292
=cut
1292
1293
1293
__PACKAGE__->has_many(
1294
__PACKAGE__->has_many(
1294
  "curbside_pickups_staged_by",
1295
    "curbside_pickups_staged_by",
1295
  "Koha::Schema::Result::CurbsidePickup",
1296
    "Koha::Schema::Result::CurbsidePickup",
1296
  { "foreign.staged_by" => "self.borrowernumber" },
1297
    { "foreign.staged_by" => "self.borrowernumber" },
1297
  { cascade_copy => 0, cascade_delete => 0 },
1298
    { cascade_copy        => 0, cascade_delete => 0 },
1298
);
1299
);
1299
1300
1300
=head2 discharges
1301
=head2 discharges
Lines 1306-1315 Related object: L<Koha::Schema::Result::Discharge> Link Here
1306
=cut
1307
=cut
1307
1308
1308
__PACKAGE__->has_many(
1309
__PACKAGE__->has_many(
1309
  "discharges",
1310
    "discharges",
1310
  "Koha::Schema::Result::Discharge",
1311
    "Koha::Schema::Result::Discharge",
1311
  { "foreign.borrower" => "self.borrowernumber" },
1312
    { "foreign.borrower" => "self.borrowernumber" },
1312
  { cascade_copy => 0, cascade_delete => 0 },
1313
    { cascade_copy       => 0, cascade_delete => 0 },
1313
);
1314
);
1314
1315
1315
=head2 erm_user_roles
1316
=head2 erm_user_roles
Lines 1321-1330 Related object: L<Koha::Schema::Result::ErmUserRole> Link Here
1321
=cut
1322
=cut
1322
1323
1323
__PACKAGE__->has_many(
1324
__PACKAGE__->has_many(
1324
  "erm_user_roles",
1325
    "erm_user_roles",
1325
  "Koha::Schema::Result::ErmUserRole",
1326
    "Koha::Schema::Result::ErmUserRole",
1326
  { "foreign.user_id" => "self.borrowernumber" },
1327
    { "foreign.user_id" => "self.borrowernumber" },
1327
  { cascade_copy => 0, cascade_delete => 0 },
1328
    { cascade_copy      => 0, cascade_delete => 0 },
1328
);
1329
);
1329
1330
1330
=head2 hold_fill_targets
1331
=head2 hold_fill_targets
Lines 1336-1345 Related object: L<Koha::Schema::Result::HoldFillTarget> Link Here
1336
=cut
1337
=cut
1337
1338
1338
__PACKAGE__->has_many(
1339
__PACKAGE__->has_many(
1339
  "hold_fill_targets",
1340
    "hold_fill_targets",
1340
  "Koha::Schema::Result::HoldFillTarget",
1341
    "Koha::Schema::Result::HoldFillTarget",
1341
  { "foreign.borrowernumber" => "self.borrowernumber" },
1342
    { "foreign.borrowernumber" => "self.borrowernumber" },
1342
  { cascade_copy => 0, cascade_delete => 0 },
1343
    { cascade_copy             => 0, cascade_delete => 0 },
1343
);
1344
);
1344
1345
1345
=head2 housebound_profile
1346
=head2 housebound_profile
Lines 1351-1360 Related object: L<Koha::Schema::Result::HouseboundProfile> Link Here
1351
=cut
1352
=cut
1352
1353
1353
__PACKAGE__->might_have(
1354
__PACKAGE__->might_have(
1354
  "housebound_profile",
1355
    "housebound_profile",
1355
  "Koha::Schema::Result::HouseboundProfile",
1356
    "Koha::Schema::Result::HouseboundProfile",
1356
  { "foreign.borrowernumber" => "self.borrowernumber" },
1357
    { "foreign.borrowernumber" => "self.borrowernumber" },
1357
  { cascade_copy => 0, cascade_delete => 0 },
1358
    { cascade_copy             => 0, cascade_delete => 0 },
1358
);
1359
);
1359
1360
1360
=head2 housebound_role
1361
=head2 housebound_role
Lines 1366-1375 Related object: L<Koha::Schema::Result::HouseboundRole> Link Here
1366
=cut
1367
=cut
1367
1368
1368
__PACKAGE__->might_have(
1369
__PACKAGE__->might_have(
1369
  "housebound_role",
1370
    "housebound_role",
1370
  "Koha::Schema::Result::HouseboundRole",
1371
    "Koha::Schema::Result::HouseboundRole",
1371
  { "foreign.borrowernumber_id" => "self.borrowernumber" },
1372
    { "foreign.borrowernumber_id" => "self.borrowernumber" },
1372
  { cascade_copy => 0, cascade_delete => 0 },
1373
    { cascade_copy                => 0, cascade_delete => 0 },
1373
);
1374
);
1374
1375
1375
=head2 housebound_visit_chooser_brwnumbers
1376
=head2 housebound_visit_chooser_brwnumbers
Lines 1381-1390 Related object: L<Koha::Schema::Result::HouseboundVisit> Link Here
1381
=cut
1382
=cut
1382
1383
1383
__PACKAGE__->has_many(
1384
__PACKAGE__->has_many(
1384
  "housebound_visit_chooser_brwnumbers",
1385
    "housebound_visit_chooser_brwnumbers",
1385
  "Koha::Schema::Result::HouseboundVisit",
1386
    "Koha::Schema::Result::HouseboundVisit",
1386
  { "foreign.chooser_brwnumber" => "self.borrowernumber" },
1387
    { "foreign.chooser_brwnumber" => "self.borrowernumber" },
1387
  { cascade_copy => 0, cascade_delete => 0 },
1388
    { cascade_copy                => 0, cascade_delete => 0 },
1388
);
1389
);
1389
1390
1390
=head2 housebound_visit_deliverer_brwnumbers
1391
=head2 housebound_visit_deliverer_brwnumbers
Lines 1396-1405 Related object: L<Koha::Schema::Result::HouseboundVisit> Link Here
1396
=cut
1397
=cut
1397
1398
1398
__PACKAGE__->has_many(
1399
__PACKAGE__->has_many(
1399
  "housebound_visit_deliverer_brwnumbers",
1400
    "housebound_visit_deliverer_brwnumbers",
1400
  "Koha::Schema::Result::HouseboundVisit",
1401
    "Koha::Schema::Result::HouseboundVisit",
1401
  { "foreign.deliverer_brwnumber" => "self.borrowernumber" },
1402
    { "foreign.deliverer_brwnumber" => "self.borrowernumber" },
1402
  { cascade_copy => 0, cascade_delete => 0 },
1403
    { cascade_copy                  => 0, cascade_delete => 0 },
1403
);
1404
);
1404
1405
1405
=head2 illcomments
1406
=head2 illcomments
Lines 1411-1420 Related object: L<Koha::Schema::Result::Illcomment> Link Here
1411
=cut
1412
=cut
1412
1413
1413
__PACKAGE__->has_many(
1414
__PACKAGE__->has_many(
1414
  "illcomments",
1415
    "illcomments",
1415
  "Koha::Schema::Result::Illcomment",
1416
    "Koha::Schema::Result::Illcomment",
1416
  { "foreign.borrowernumber" => "self.borrowernumber" },
1417
    { "foreign.borrowernumber" => "self.borrowernumber" },
1417
  { cascade_copy => 0, cascade_delete => 0 },
1418
    { cascade_copy             => 0, cascade_delete => 0 },
1418
);
1419
);
1419
1420
1420
=head2 illrequests
1421
=head2 illrequests
Lines 1426-1435 Related object: L<Koha::Schema::Result::Illrequest> Link Here
1426
=cut
1427
=cut
1427
1428
1428
__PACKAGE__->has_many(
1429
__PACKAGE__->has_many(
1429
  "illrequests",
1430
    "illrequests",
1430
  "Koha::Schema::Result::Illrequest",
1431
    "Koha::Schema::Result::Illrequest",
1431
  { "foreign.borrowernumber" => "self.borrowernumber" },
1432
    { "foreign.borrowernumber" => "self.borrowernumber" },
1432
  { cascade_copy => 0, cascade_delete => 0 },
1433
    { cascade_copy             => 0, cascade_delete => 0 },
1433
);
1434
);
1434
1435
1435
=head2 issues
1436
=head2 issues
Lines 1441-1450 Related object: L<Koha::Schema::Result::Issue> Link Here
1441
=cut
1442
=cut
1442
1443
1443
__PACKAGE__->has_many(
1444
__PACKAGE__->has_many(
1444
  "issues",
1445
    "issues",
1445
  "Koha::Schema::Result::Issue",
1446
    "Koha::Schema::Result::Issue",
1446
  { "foreign.borrowernumber" => "self.borrowernumber" },
1447
    { "foreign.borrowernumber" => "self.borrowernumber" },
1447
  { cascade_copy => 0, cascade_delete => 0 },
1448
    { cascade_copy             => 0, cascade_delete => 0 },
1448
);
1449
);
1449
1450
1450
=head2 issues_issuers
1451
=head2 issues_issuers
Lines 1456-1465 Related object: L<Koha::Schema::Result::Issue> Link Here
1456
=cut
1457
=cut
1457
1458
1458
__PACKAGE__->has_many(
1459
__PACKAGE__->has_many(
1459
  "issues_issuers",
1460
    "issues_issuers",
1460
  "Koha::Schema::Result::Issue",
1461
    "Koha::Schema::Result::Issue",
1461
  { "foreign.issuer_id" => "self.borrowernumber" },
1462
    { "foreign.issuer_id" => "self.borrowernumber" },
1462
  { cascade_copy => 0, cascade_delete => 0 },
1463
    { cascade_copy        => 0, cascade_delete => 0 },
1463
);
1464
);
1464
1465
1465
=head2 item_editor_templates
1466
=head2 item_editor_templates
Lines 1471-1480 Related object: L<Koha::Schema::Result::ItemEditorTemplate> Link Here
1471
=cut
1472
=cut
1472
1473
1473
__PACKAGE__->has_many(
1474
__PACKAGE__->has_many(
1474
  "item_editor_templates",
1475
    "item_editor_templates",
1475
  "Koha::Schema::Result::ItemEditorTemplate",
1476
    "Koha::Schema::Result::ItemEditorTemplate",
1476
  { "foreign.patron_id" => "self.borrowernumber" },
1477
    { "foreign.patron_id" => "self.borrowernumber" },
1477
  { cascade_copy => 0, cascade_delete => 0 },
1478
    { cascade_copy        => 0, cascade_delete => 0 },
1478
);
1479
);
1479
1480
1480
=head2 items_last_borrowers
1481
=head2 items_last_borrowers
Lines 1486-1495 Related object: L<Koha::Schema::Result::ItemsLastBorrower> Link Here
1486
=cut
1487
=cut
1487
1488
1488
__PACKAGE__->has_many(
1489
__PACKAGE__->has_many(
1489
  "items_last_borrowers",
1490
    "items_last_borrowers",
1490
  "Koha::Schema::Result::ItemsLastBorrower",
1491
    "Koha::Schema::Result::ItemsLastBorrower",
1491
  { "foreign.borrowernumber" => "self.borrowernumber" },
1492
    { "foreign.borrowernumber" => "self.borrowernumber" },
1492
  { cascade_copy => 0, cascade_delete => 0 },
1493
    { cascade_copy             => 0, cascade_delete => 0 },
1493
);
1494
);
1494
1495
1495
=head2 linktrackers
1496
=head2 linktrackers
Lines 1501-1510 Related object: L<Koha::Schema::Result::Linktracker> Link Here
1501
=cut
1502
=cut
1502
1503
1503
__PACKAGE__->has_many(
1504
__PACKAGE__->has_many(
1504
  "linktrackers",
1505
    "linktrackers",
1505
  "Koha::Schema::Result::Linktracker",
1506
    "Koha::Schema::Result::Linktracker",
1506
  { "foreign.borrowernumber" => "self.borrowernumber" },
1507
    { "foreign.borrowernumber" => "self.borrowernumber" },
1507
  { cascade_copy => 0, cascade_delete => 0 },
1508
    { cascade_copy             => 0, cascade_delete => 0 },
1508
);
1509
);
1509
1510
1510
=head2 message_queues
1511
=head2 message_queues
Lines 1516-1525 Related object: L<Koha::Schema::Result::MessageQueue> Link Here
1516
=cut
1517
=cut
1517
1518
1518
__PACKAGE__->has_many(
1519
__PACKAGE__->has_many(
1519
  "message_queues",
1520
    "message_queues",
1520
  "Koha::Schema::Result::MessageQueue",
1521
    "Koha::Schema::Result::MessageQueue",
1521
  { "foreign.borrowernumber" => "self.borrowernumber" },
1522
    { "foreign.borrowernumber" => "self.borrowernumber" },
1522
  { cascade_copy => 0, cascade_delete => 0 },
1523
    { cascade_copy             => 0, cascade_delete => 0 },
1523
);
1524
);
1524
1525
1525
=head2 messages
1526
=head2 messages
Lines 1531-1540 Related object: L<Koha::Schema::Result::Message> Link Here
1531
=cut
1532
=cut
1532
1533
1533
__PACKAGE__->has_many(
1534
__PACKAGE__->has_many(
1534
  "messages",
1535
    "messages",
1535
  "Koha::Schema::Result::Message",
1536
    "Koha::Schema::Result::Message",
1536
  { "foreign.manager_id" => "self.borrowernumber" },
1537
    { "foreign.manager_id" => "self.borrowernumber" },
1537
  { cascade_copy => 0, cascade_delete => 0 },
1538
    { cascade_copy         => 0, cascade_delete => 0 },
1538
);
1539
);
1539
1540
1540
=head2 messages_borrowernumbers
1541
=head2 messages_borrowernumbers
Lines 1546-1555 Related object: L<Koha::Schema::Result::Message> Link Here
1546
=cut
1547
=cut
1547
1548
1548
__PACKAGE__->has_many(
1549
__PACKAGE__->has_many(
1549
  "messages_borrowernumbers",
1550
    "messages_borrowernumbers",
1550
  "Koha::Schema::Result::Message",
1551
    "Koha::Schema::Result::Message",
1551
  { "foreign.borrowernumber" => "self.borrowernumber" },
1552
    { "foreign.borrowernumber" => "self.borrowernumber" },
1552
  { cascade_copy => 0, cascade_delete => 0 },
1553
    { cascade_copy             => 0, cascade_delete => 0 },
1553
);
1554
);
1554
1555
1555
=head2 old_issues
1556
=head2 old_issues
Lines 1561-1570 Related object: L<Koha::Schema::Result::OldIssue> Link Here
1561
=cut
1562
=cut
1562
1563
1563
__PACKAGE__->has_many(
1564
__PACKAGE__->has_many(
1564
  "old_issues",
1565
    "old_issues",
1565
  "Koha::Schema::Result::OldIssue",
1566
    "Koha::Schema::Result::OldIssue",
1566
  { "foreign.borrowernumber" => "self.borrowernumber" },
1567
    { "foreign.borrowernumber" => "self.borrowernumber" },
1567
  { cascade_copy => 0, cascade_delete => 0 },
1568
    { cascade_copy             => 0, cascade_delete => 0 },
1568
);
1569
);
1569
1570
1570
=head2 old_issues_issuers
1571
=head2 old_issues_issuers
Lines 1576-1585 Related object: L<Koha::Schema::Result::OldIssue> Link Here
1576
=cut
1577
=cut
1577
1578
1578
__PACKAGE__->has_many(
1579
__PACKAGE__->has_many(
1579
  "old_issues_issuers",
1580
    "old_issues_issuers",
1580
  "Koha::Schema::Result::OldIssue",
1581
    "Koha::Schema::Result::OldIssue",
1581
  { "foreign.issuer_id" => "self.borrowernumber" },
1582
    { "foreign.issuer_id" => "self.borrowernumber" },
1582
  { cascade_copy => 0, cascade_delete => 0 },
1583
    { cascade_copy        => 0, cascade_delete => 0 },
1583
);
1584
);
1584
1585
1585
=head2 old_reserves
1586
=head2 old_reserves
Lines 1591-1600 Related object: L<Koha::Schema::Result::OldReserve> Link Here
1591
=cut
1592
=cut
1592
1593
1593
__PACKAGE__->has_many(
1594
__PACKAGE__->has_many(
1594
  "old_reserves",
1595
    "old_reserves",
1595
  "Koha::Schema::Result::OldReserve",
1596
    "Koha::Schema::Result::OldReserve",
1596
  { "foreign.borrowernumber" => "self.borrowernumber" },
1597
    { "foreign.borrowernumber" => "self.borrowernumber" },
1597
  { cascade_copy => 0, cascade_delete => 0 },
1598
    { cascade_copy             => 0, cascade_delete => 0 },
1598
);
1599
);
1599
1600
1600
=head2 patron_consents
1601
=head2 patron_consents
Lines 1606-1615 Related object: L<Koha::Schema::Result::PatronConsent> Link Here
1606
=cut
1607
=cut
1607
1608
1608
__PACKAGE__->has_many(
1609
__PACKAGE__->has_many(
1609
  "patron_consents",
1610
    "patron_consents",
1610
  "Koha::Schema::Result::PatronConsent",
1611
    "Koha::Schema::Result::PatronConsent",
1611
  { "foreign.borrowernumber" => "self.borrowernumber" },
1612
    { "foreign.borrowernumber" => "self.borrowernumber" },
1612
  { cascade_copy => 0, cascade_delete => 0 },
1613
    { cascade_copy             => 0, cascade_delete => 0 },
1613
);
1614
);
1614
1615
1615
=head2 patron_list_patrons
1616
=head2 patron_list_patrons
Lines 1621-1630 Related object: L<Koha::Schema::Result::PatronListPatron> Link Here
1621
=cut
1622
=cut
1622
1623
1623
__PACKAGE__->has_many(
1624
__PACKAGE__->has_many(
1624
  "patron_list_patrons",
1625
    "patron_list_patrons",
1625
  "Koha::Schema::Result::PatronListPatron",
1626
    "Koha::Schema::Result::PatronListPatron",
1626
  { "foreign.borrowernumber" => "self.borrowernumber" },
1627
    { "foreign.borrowernumber" => "self.borrowernumber" },
1627
  { cascade_copy => 0, cascade_delete => 0 },
1628
    { cascade_copy             => 0, cascade_delete => 0 },
1628
);
1629
);
1629
1630
1630
=head2 patron_lists
1631
=head2 patron_lists
Lines 1636-1645 Related object: L<Koha::Schema::Result::PatronList> Link Here
1636
=cut
1637
=cut
1637
1638
1638
__PACKAGE__->has_many(
1639
__PACKAGE__->has_many(
1639
  "patron_lists",
1640
    "patron_lists",
1640
  "Koha::Schema::Result::PatronList",
1641
    "Koha::Schema::Result::PatronList",
1641
  { "foreign.owner" => "self.borrowernumber" },
1642
    { "foreign.owner" => "self.borrowernumber" },
1642
  { cascade_copy => 0, cascade_delete => 0 },
1643
    { cascade_copy    => 0, cascade_delete => 0 },
1643
);
1644
);
1644
1645
1645
=head2 patronimage
1646
=head2 patronimage
Lines 1651-1660 Related object: L<Koha::Schema::Result::Patronimage> Link Here
1651
=cut
1652
=cut
1652
1653
1653
__PACKAGE__->might_have(
1654
__PACKAGE__->might_have(
1654
  "patronimage",
1655
    "patronimage",
1655
  "Koha::Schema::Result::Patronimage",
1656
    "Koha::Schema::Result::Patronimage",
1656
  { "foreign.borrowernumber" => "self.borrowernumber" },
1657
    { "foreign.borrowernumber" => "self.borrowernumber" },
1657
  { cascade_copy => 0, cascade_delete => 0 },
1658
    { cascade_copy             => 0, cascade_delete => 0 },
1658
);
1659
);
1659
1660
1660
=head2 problem_reports
1661
=head2 problem_reports
Lines 1666-1675 Related object: L<Koha::Schema::Result::ProblemReport> Link Here
1666
=cut
1667
=cut
1667
1668
1668
__PACKAGE__->has_many(
1669
__PACKAGE__->has_many(
1669
  "problem_reports",
1670
    "problem_reports",
1670
  "Koha::Schema::Result::ProblemReport",
1671
    "Koha::Schema::Result::ProblemReport",
1671
  { "foreign.borrowernumber" => "self.borrowernumber" },
1672
    { "foreign.borrowernumber" => "self.borrowernumber" },
1672
  { cascade_copy => 0, cascade_delete => 0 },
1673
    { cascade_copy             => 0, cascade_delete => 0 },
1673
);
1674
);
1674
1675
1675
=head2 ratings
1676
=head2 ratings
Lines 1681-1690 Related object: L<Koha::Schema::Result::Rating> Link Here
1681
=cut
1682
=cut
1682
1683
1683
__PACKAGE__->has_many(
1684
__PACKAGE__->has_many(
1684
  "ratings",
1685
    "ratings",
1685
  "Koha::Schema::Result::Rating",
1686
    "Koha::Schema::Result::Rating",
1686
  { "foreign.borrowernumber" => "self.borrowernumber" },
1687
    { "foreign.borrowernumber" => "self.borrowernumber" },
1687
  { cascade_copy => 0, cascade_delete => 0 },
1688
    { cascade_copy             => 0, cascade_delete => 0 },
1688
);
1689
);
1689
1690
1690
=head2 recalls
1691
=head2 recalls
Lines 1696-1705 Related object: L<Koha::Schema::Result::Recall> Link Here
1696
=cut
1697
=cut
1697
1698
1698
__PACKAGE__->has_many(
1699
__PACKAGE__->has_many(
1699
  "recalls",
1700
    "recalls",
1700
  "Koha::Schema::Result::Recall",
1701
    "Koha::Schema::Result::Recall",
1701
  { "foreign.patron_id" => "self.borrowernumber" },
1702
    { "foreign.patron_id" => "self.borrowernumber" },
1702
  { cascade_copy => 0, cascade_delete => 0 },
1703
    { cascade_copy        => 0, cascade_delete => 0 },
1703
);
1704
);
1704
1705
1705
=head2 record_sources
1706
=head2 record_sources
Lines 1711-1720 Related object: L<Koha::Schema::Result::RecordSource> Link Here
1711
=cut
1712
=cut
1712
1713
1713
__PACKAGE__->has_many(
1714
__PACKAGE__->has_many(
1714
  "record_sources",
1715
    "record_sources",
1715
  "Koha::Schema::Result::RecordSource",
1716
    "Koha::Schema::Result::RecordSource",
1716
  { "foreign.patron_id" => "self.borrowernumber" },
1717
    { "foreign.patron_id" => "self.borrowernumber" },
1717
  { cascade_copy => 0, cascade_delete => 0 },
1718
    { cascade_copy        => 0, cascade_delete => 0 },
1718
);
1719
);
1719
1720
1720
=head2 reserves
1721
=head2 reserves
Lines 1726-1735 Related object: L<Koha::Schema::Result::Reserve> Link Here
1726
=cut
1727
=cut
1727
1728
1728
__PACKAGE__->has_many(
1729
__PACKAGE__->has_many(
1729
  "reserves",
1730
    "reserves",
1730
  "Koha::Schema::Result::Reserve",
1731
    "Koha::Schema::Result::Reserve",
1731
  { "foreign.borrowernumber" => "self.borrowernumber" },
1732
    { "foreign.borrowernumber" => "self.borrowernumber" },
1732
  { cascade_copy => 0, cascade_delete => 0 },
1733
    { cascade_copy             => 0, cascade_delete => 0 },
1733
);
1734
);
1734
1735
1735
=head2 return_claims_borrowernumbers
1736
=head2 return_claims_borrowernumbers
Lines 1741-1750 Related object: L<Koha::Schema::Result::ReturnClaim> Link Here
1741
=cut
1742
=cut
1742
1743
1743
__PACKAGE__->has_many(
1744
__PACKAGE__->has_many(
1744
  "return_claims_borrowernumbers",
1745
    "return_claims_borrowernumbers",
1745
  "Koha::Schema::Result::ReturnClaim",
1746
    "Koha::Schema::Result::ReturnClaim",
1746
  { "foreign.borrowernumber" => "self.borrowernumber" },
1747
    { "foreign.borrowernumber" => "self.borrowernumber" },
1747
  { cascade_copy => 0, cascade_delete => 0 },
1748
    { cascade_copy             => 0, cascade_delete => 0 },
1748
);
1749
);
1749
1750
1750
=head2 return_claims_created_by
1751
=head2 return_claims_created_by
Lines 1756-1765 Related object: L<Koha::Schema::Result::ReturnClaim> Link Here
1756
=cut
1757
=cut
1757
1758
1758
__PACKAGE__->has_many(
1759
__PACKAGE__->has_many(
1759
  "return_claims_created_by",
1760
    "return_claims_created_by",
1760
  "Koha::Schema::Result::ReturnClaim",
1761
    "Koha::Schema::Result::ReturnClaim",
1761
  { "foreign.created_by" => "self.borrowernumber" },
1762
    { "foreign.created_by" => "self.borrowernumber" },
1762
  { cascade_copy => 0, cascade_delete => 0 },
1763
    { cascade_copy         => 0, cascade_delete => 0 },
1763
);
1764
);
1764
1765
1765
=head2 return_claims_resolved_by
1766
=head2 return_claims_resolved_by
Lines 1771-1780 Related object: L<Koha::Schema::Result::ReturnClaim> Link Here
1771
=cut
1772
=cut
1772
1773
1773
__PACKAGE__->has_many(
1774
__PACKAGE__->has_many(
1774
  "return_claims_resolved_by",
1775
    "return_claims_resolved_by",
1775
  "Koha::Schema::Result::ReturnClaim",
1776
    "Koha::Schema::Result::ReturnClaim",
1776
  { "foreign.resolved_by" => "self.borrowernumber" },
1777
    { "foreign.resolved_by" => "self.borrowernumber" },
1777
  { cascade_copy => 0, cascade_delete => 0 },
1778
    { cascade_copy          => 0, cascade_delete => 0 },
1778
);
1779
);
1779
1780
1780
=head2 return_claims_updated_by
1781
=head2 return_claims_updated_by
Lines 1786-1795 Related object: L<Koha::Schema::Result::ReturnClaim> Link Here
1786
=cut
1787
=cut
1787
1788
1788
__PACKAGE__->has_many(
1789
__PACKAGE__->has_many(
1789
  "return_claims_updated_by",
1790
    "return_claims_updated_by",
1790
  "Koha::Schema::Result::ReturnClaim",
1791
    "Koha::Schema::Result::ReturnClaim",
1791
  { "foreign.updated_by" => "self.borrowernumber" },
1792
    { "foreign.updated_by" => "self.borrowernumber" },
1792
  { cascade_copy => 0, cascade_delete => 0 },
1793
    { cascade_copy         => 0, cascade_delete => 0 },
1793
);
1794
);
1794
1795
1795
=head2 reviews
1796
=head2 reviews
Lines 1801-1810 Related object: L<Koha::Schema::Result::Review> Link Here
1801
=cut
1802
=cut
1802
1803
1803
__PACKAGE__->has_many(
1804
__PACKAGE__->has_many(
1804
  "reviews",
1805
    "reviews",
1805
  "Koha::Schema::Result::Review",
1806
    "Koha::Schema::Result::Review",
1806
  { "foreign.borrowernumber" => "self.borrowernumber" },
1807
    { "foreign.borrowernumber" => "self.borrowernumber" },
1807
  { cascade_copy => 0, cascade_delete => 0 },
1808
    { cascade_copy             => 0, cascade_delete => 0 },
1808
);
1809
);
1809
1810
1810
=head2 sms_provider
1811
=head2 sms_provider
Lines 1816-1830 Related object: L<Koha::Schema::Result::SmsProvider> Link Here
1816
=cut
1817
=cut
1817
1818
1818
__PACKAGE__->belongs_to(
1819
__PACKAGE__->belongs_to(
1819
  "sms_provider",
1820
    "sms_provider",
1820
  "Koha::Schema::Result::SmsProvider",
1821
    "Koha::Schema::Result::SmsProvider",
1821
  { id => "sms_provider_id" },
1822
    { id => "sms_provider_id" },
1822
  {
1823
    {
1823
    is_deferrable => 1,
1824
        is_deferrable => 1,
1824
    join_type     => "LEFT",
1825
        join_type     => "LEFT",
1825
    on_delete     => "SET NULL",
1826
        on_delete     => "SET NULL",
1826
    on_update     => "CASCADE",
1827
        on_update     => "CASCADE",
1827
  },
1828
    },
1828
);
1829
);
1829
1830
1830
=head2 subscriptionroutinglists
1831
=head2 subscriptionroutinglists
Lines 1836-1845 Related object: L<Koha::Schema::Result::Subscriptionroutinglist> Link Here
1836
=cut
1837
=cut
1837
1838
1838
__PACKAGE__->has_many(
1839
__PACKAGE__->has_many(
1839
  "subscriptionroutinglists",
1840
    "subscriptionroutinglists",
1840
  "Koha::Schema::Result::Subscriptionroutinglist",
1841
    "Koha::Schema::Result::Subscriptionroutinglist",
1841
  { "foreign.borrowernumber" => "self.borrowernumber" },
1842
    { "foreign.borrowernumber" => "self.borrowernumber" },
1842
  { cascade_copy => 0, cascade_delete => 0 },
1843
    { cascade_copy             => 0, cascade_delete => 0 },
1843
);
1844
);
1844
1845
1845
=head2 suggestions_acceptedbies
1846
=head2 suggestions_acceptedbies
Lines 1851-1860 Related object: L<Koha::Schema::Result::Suggestion> Link Here
1851
=cut
1852
=cut
1852
1853
1853
__PACKAGE__->has_many(
1854
__PACKAGE__->has_many(
1854
  "suggestions_acceptedbies",
1855
    "suggestions_acceptedbies",
1855
  "Koha::Schema::Result::Suggestion",
1856
    "Koha::Schema::Result::Suggestion",
1856
  { "foreign.acceptedby" => "self.borrowernumber" },
1857
    { "foreign.acceptedby" => "self.borrowernumber" },
1857
  { cascade_copy => 0, cascade_delete => 0 },
1858
    { cascade_copy         => 0, cascade_delete => 0 },
1858
);
1859
);
1859
1860
1860
=head2 suggestions_lastmodificationbies
1861
=head2 suggestions_lastmodificationbies
Lines 1866-1875 Related object: L<Koha::Schema::Result::Suggestion> Link Here
1866
=cut
1867
=cut
1867
1868
1868
__PACKAGE__->has_many(
1869
__PACKAGE__->has_many(
1869
  "suggestions_lastmodificationbies",
1870
    "suggestions_lastmodificationbies",
1870
  "Koha::Schema::Result::Suggestion",
1871
    "Koha::Schema::Result::Suggestion",
1871
  { "foreign.lastmodificationby" => "self.borrowernumber" },
1872
    { "foreign.lastmodificationby" => "self.borrowernumber" },
1872
  { cascade_copy => 0, cascade_delete => 0 },
1873
    { cascade_copy                 => 0, cascade_delete => 0 },
1873
);
1874
);
1874
1875
1875
=head2 suggestions_managedbies
1876
=head2 suggestions_managedbies
Lines 1881-1890 Related object: L<Koha::Schema::Result::Suggestion> Link Here
1881
=cut
1882
=cut
1882
1883
1883
__PACKAGE__->has_many(
1884
__PACKAGE__->has_many(
1884
  "suggestions_managedbies",
1885
    "suggestions_managedbies",
1885
  "Koha::Schema::Result::Suggestion",
1886
    "Koha::Schema::Result::Suggestion",
1886
  { "foreign.managedby" => "self.borrowernumber" },
1887
    { "foreign.managedby" => "self.borrowernumber" },
1887
  { cascade_copy => 0, cascade_delete => 0 },
1888
    { cascade_copy        => 0, cascade_delete => 0 },
1888
);
1889
);
1889
1890
1890
=head2 suggestions_rejectedbies
1891
=head2 suggestions_rejectedbies
Lines 1896-1905 Related object: L<Koha::Schema::Result::Suggestion> Link Here
1896
=cut
1897
=cut
1897
1898
1898
__PACKAGE__->has_many(
1899
__PACKAGE__->has_many(
1899
  "suggestions_rejectedbies",
1900
    "suggestions_rejectedbies",
1900
  "Koha::Schema::Result::Suggestion",
1901
    "Koha::Schema::Result::Suggestion",
1901
  { "foreign.rejectedby" => "self.borrowernumber" },
1902
    { "foreign.rejectedby" => "self.borrowernumber" },
1902
  { cascade_copy => 0, cascade_delete => 0 },
1903
    { cascade_copy         => 0, cascade_delete => 0 },
1903
);
1904
);
1904
1905
1905
=head2 suggestions_suggestedbies
1906
=head2 suggestions_suggestedbies
Lines 1911-1920 Related object: L<Koha::Schema::Result::Suggestion> Link Here
1911
=cut
1912
=cut
1912
1913
1913
__PACKAGE__->has_many(
1914
__PACKAGE__->has_many(
1914
  "suggestions_suggestedbies",
1915
    "suggestions_suggestedbies",
1915
  "Koha::Schema::Result::Suggestion",
1916
    "Koha::Schema::Result::Suggestion",
1916
  { "foreign.suggestedby" => "self.borrowernumber" },
1917
    { "foreign.suggestedby" => "self.borrowernumber" },
1917
  { cascade_copy => 0, cascade_delete => 0 },
1918
    { cascade_copy          => 0, cascade_delete => 0 },
1918
);
1919
);
1919
1920
1920
=head2 tags_all
1921
=head2 tags_all
Lines 1926-1935 Related object: L<Koha::Schema::Result::TagAll> Link Here
1926
=cut
1927
=cut
1927
1928
1928
__PACKAGE__->has_many(
1929
__PACKAGE__->has_many(
1929
  "tags_all",
1930
    "tags_all",
1930
  "Koha::Schema::Result::TagAll",
1931
    "Koha::Schema::Result::TagAll",
1931
  { "foreign.borrowernumber" => "self.borrowernumber" },
1932
    { "foreign.borrowernumber" => "self.borrowernumber" },
1932
  { cascade_copy => 0, cascade_delete => 0 },
1933
    { cascade_copy             => 0, cascade_delete => 0 },
1933
);
1934
);
1934
1935
1935
=head2 tags_approvals
1936
=head2 tags_approvals
Lines 1941-1950 Related object: L<Koha::Schema::Result::TagsApproval> Link Here
1941
=cut
1942
=cut
1942
1943
1943
__PACKAGE__->has_many(
1944
__PACKAGE__->has_many(
1944
  "tags_approvals",
1945
    "tags_approvals",
1945
  "Koha::Schema::Result::TagsApproval",
1946
    "Koha::Schema::Result::TagsApproval",
1946
  { "foreign.approved_by" => "self.borrowernumber" },
1947
    { "foreign.approved_by" => "self.borrowernumber" },
1947
  { cascade_copy => 0, cascade_delete => 0 },
1948
    { cascade_copy          => 0, cascade_delete => 0 },
1948
);
1949
);
1949
1950
1950
=head2 ticket_updates
1951
=head2 ticket_updates
Lines 1956-1965 Related object: L<Koha::Schema::Result::TicketUpdate> Link Here
1956
=cut
1957
=cut
1957
1958
1958
__PACKAGE__->has_many(
1959
__PACKAGE__->has_many(
1959
  "ticket_updates",
1960
    "ticket_updates",
1960
  "Koha::Schema::Result::TicketUpdate",
1961
    "Koha::Schema::Result::TicketUpdate",
1961
  { "foreign.user_id" => "self.borrowernumber" },
1962
    { "foreign.user_id" => "self.borrowernumber" },
1962
  { cascade_copy => 0, cascade_delete => 0 },
1963
    { cascade_copy      => 0, cascade_delete => 0 },
1963
);
1964
);
1964
1965
1965
=head2 tickets_reporters
1966
=head2 tickets_reporters
Lines 1971-1980 Related object: L<Koha::Schema::Result::Ticket> Link Here
1971
=cut
1972
=cut
1972
1973
1973
__PACKAGE__->has_many(
1974
__PACKAGE__->has_many(
1974
  "tickets_reporters",
1975
    "tickets_reporters",
1975
  "Koha::Schema::Result::Ticket",
1976
    "Koha::Schema::Result::Ticket",
1976
  { "foreign.reporter_id" => "self.borrowernumber" },
1977
    { "foreign.reporter_id" => "self.borrowernumber" },
1977
  { cascade_copy => 0, cascade_delete => 0 },
1978
    { cascade_copy          => 0, cascade_delete => 0 },
1978
);
1979
);
1979
1980
1980
=head2 tickets_resolvers
1981
=head2 tickets_resolvers
Lines 1986-1995 Related object: L<Koha::Schema::Result::Ticket> Link Here
1986
=cut
1987
=cut
1987
1988
1988
__PACKAGE__->has_many(
1989
__PACKAGE__->has_many(
1989
  "tickets_resolvers",
1990
    "tickets_resolvers",
1990
  "Koha::Schema::Result::Ticket",
1991
    "Koha::Schema::Result::Ticket",
1991
  { "foreign.resolver_id" => "self.borrowernumber" },
1992
    { "foreign.resolver_id" => "self.borrowernumber" },
1992
  { cascade_copy => 0, cascade_delete => 0 },
1993
    { cascade_copy          => 0, cascade_delete => 0 },
1993
);
1994
);
1994
1995
1995
=head2 tmp_holdsqueues
1996
=head2 tmp_holdsqueues
Lines 2001-2010 Related object: L<Koha::Schema::Result::TmpHoldsqueue> Link Here
2001
=cut
2002
=cut
2002
2003
2003
__PACKAGE__->has_many(
2004
__PACKAGE__->has_many(
2004
  "tmp_holdsqueues",
2005
    "tmp_holdsqueues",
2005
  "Koha::Schema::Result::TmpHoldsqueue",
2006
    "Koha::Schema::Result::TmpHoldsqueue",
2006
  { "foreign.borrowernumber" => "self.borrowernumber" },
2007
    { "foreign.borrowernumber" => "self.borrowernumber" },
2007
  { cascade_copy => 0, cascade_delete => 0 },
2008
    { cascade_copy             => 0, cascade_delete => 0 },
2008
);
2009
);
2009
2010
2010
=head2 user_permissions
2011
=head2 user_permissions
Lines 2016-2025 Related object: L<Koha::Schema::Result::UserPermission> Link Here
2016
=cut
2017
=cut
2017
2018
2018
__PACKAGE__->has_many(
2019
__PACKAGE__->has_many(
2019
  "user_permissions",
2020
    "user_permissions",
2020
  "Koha::Schema::Result::UserPermission",
2021
    "Koha::Schema::Result::UserPermission",
2021
  { "foreign.borrowernumber" => "self.borrowernumber" },
2022
    { "foreign.borrowernumber" => "self.borrowernumber" },
2022
  { cascade_copy => 0, cascade_delete => 0 },
2023
    { cascade_copy             => 0, cascade_delete => 0 },
2023
);
2024
);
2024
2025
2025
=head2 virtualshelfcontents
2026
=head2 virtualshelfcontents
Lines 2031-2040 Related object: L<Koha::Schema::Result::Virtualshelfcontent> Link Here
2031
=cut
2032
=cut
2032
2033
2033
__PACKAGE__->has_many(
2034
__PACKAGE__->has_many(
2034
  "virtualshelfcontents",
2035
    "virtualshelfcontents",
2035
  "Koha::Schema::Result::Virtualshelfcontent",
2036
    "Koha::Schema::Result::Virtualshelfcontent",
2036
  { "foreign.borrowernumber" => "self.borrowernumber" },
2037
    { "foreign.borrowernumber" => "self.borrowernumber" },
2037
  { cascade_copy => 0, cascade_delete => 0 },
2038
    { cascade_copy             => 0, cascade_delete => 0 },
2038
);
2039
);
2039
2040
2040
=head2 virtualshelfshares
2041
=head2 virtualshelfshares
Lines 2046-2055 Related object: L<Koha::Schema::Result::Virtualshelfshare> Link Here
2046
=cut
2047
=cut
2047
2048
2048
__PACKAGE__->has_many(
2049
__PACKAGE__->has_many(
2049
  "virtualshelfshares",
2050
    "virtualshelfshares",
2050
  "Koha::Schema::Result::Virtualshelfshare",
2051
    "Koha::Schema::Result::Virtualshelfshare",
2051
  { "foreign.borrowernumber" => "self.borrowernumber" },
2052
    { "foreign.borrowernumber" => "self.borrowernumber" },
2052
  { cascade_copy => 0, cascade_delete => 0 },
2053
    { cascade_copy             => 0, cascade_delete => 0 },
2053
);
2054
);
2054
2055
2055
=head2 virtualshelves
2056
=head2 virtualshelves
Lines 2061-2070 Related object: L<Koha::Schema::Result::Virtualshelve> Link Here
2061
=cut
2062
=cut
2062
2063
2063
__PACKAGE__->has_many(
2064
__PACKAGE__->has_many(
2064
  "virtualshelves",
2065
    "virtualshelves",
2065
  "Koha::Schema::Result::Virtualshelve",
2066
    "Koha::Schema::Result::Virtualshelve",
2066
  { "foreign.owner" => "self.borrowernumber" },
2067
    { "foreign.owner" => "self.borrowernumber" },
2067
  { cascade_copy => 0, cascade_delete => 0 },
2068
    { cascade_copy    => 0, cascade_delete => 0 },
2068
);
2069
);
2069
2070
2070
=head2 basketnoes
2071
=head2 basketnoes
Lines 2075-2081 Composing rels: L</aqbasketusers> -> basketno Link Here
2075
2076
2076
=cut
2077
=cut
2077
2078
2078
__PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno");
2079
__PACKAGE__->many_to_many( "basketnoes", "aqbasketusers", "basketno" );
2079
2080
2080
=head2 budgets
2081
=head2 budgets
2081
2082
Lines 2085-2091 Composing rels: L</aqbudgetborrowers> -> budget Link Here
2085
2086
2086
=cut
2087
=cut
2087
2088
2088
__PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget");
2089
__PACKAGE__->many_to_many( "budgets", "aqbudgetborrowers", "budget" );
2089
2090
2090
=head2 courses
2091
=head2 courses
2091
2092
Lines 2095-2101 Composing rels: L</course_instructors> -> course Link Here
2095
2096
2096
=cut
2097
=cut
2097
2098
2098
__PACKAGE__->many_to_many("courses", "course_instructors", "course");
2099
__PACKAGE__->many_to_many( "courses", "course_instructors", "course" );
2099
2100
2100
=head2 ordernumbers
2101
=head2 ordernumbers
2101
2102
Lines 2105-2111 Composing rels: L</aqorder_users> -> ordernumber Link Here
2105
2106
2106
=cut
2107
=cut
2107
2108
2108
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
2109
__PACKAGE__->many_to_many( "ordernumbers", "aqorder_users", "ordernumber" );
2109
2110
2110
=head2 permissions
2111
=head2 permissions
2111
2112
Lines 2115-2151 Composing rels: L</user_permissions> -> permission Link Here
2115
2116
2116
=cut
2117
=cut
2117
2118
2118
__PACKAGE__->many_to_many("permissions", "user_permissions", "permission");
2119
__PACKAGE__->many_to_many( "permissions", "user_permissions", "permission" );
2119
2120
2120
2121
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-07-27 20:42:58
2121
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-07-27 20:42:58
2122
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ozXW5ny1kN3YQGJUEiqg9A
2122
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ozXW5ny1kN3YQGJUEiqg9A
2123
2123
2124
__PACKAGE__->has_many(
2124
__PACKAGE__->has_many(
2125
  "restrictions",
2125
    "restrictions",
2126
  "Koha::Schema::Result::BorrowerDebarment",
2126
    "Koha::Schema::Result::BorrowerDebarment",
2127
  { "foreign.borrowernumber" => "self.borrowernumber" },
2127
    { "foreign.borrowernumber" => "self.borrowernumber" },
2128
  { cascade_copy => 0, cascade_delete => 0 },
2128
    { cascade_copy             => 0, cascade_delete => 0 },
2129
);
2129
);
2130
2130
2131
__PACKAGE__->has_many(
2131
__PACKAGE__->has_many(
2132
  "extended_attributes",
2132
    "extended_attributes",
2133
  "Koha::Schema::Result::BorrowerAttribute",
2133
    "Koha::Schema::Result::BorrowerAttribute",
2134
  { "foreign.borrowernumber" => "self.borrowernumber" },
2134
    { "foreign.borrowernumber" => "self.borrowernumber" },
2135
  { cascade_copy => 0, cascade_delete => 0 },
2135
    { cascade_copy             => 0, cascade_delete => 0 },
2136
);
2136
);
2137
2137
2138
__PACKAGE__->add_columns(
2138
__PACKAGE__->add_columns(
2139
    '+anonymized'    => { is_boolean => 1 },
2139
    '+anonymized'              => { is_boolean => 1 },
2140
    '+lost'          => { is_boolean => 1 },
2140
    '+lost'                    => { is_boolean => 1 },
2141
    '+gonenoaddress' => { is_boolean => 1 },
2141
    '+gonenoaddress'           => { is_boolean => 1 },
2142
    '+privacy_guarantor_fines' => { is_boolean => 1 },
2142
    '+privacy_guarantor_fines' => { is_boolean => 1 },
2143
    '+autorenew_checkouts' => { is_boolean => 1 }
2143
    '+autorenew_checkouts'     => { is_boolean => 1 }
2144
);
2144
);
2145
2145
2146
sub koha_objects_class {
2146
sub koha_objects_class {
2147
    'Koha::Patrons';
2147
    'Koha::Patrons';
2148
}
2148
}
2149
2149
sub koha_object_class {
2150
sub koha_object_class {
2150
    'Koha::Patron';
2151
    'Koha::Patron';
2151
}
2152
}
(-)a/installer/data/mysql/atomicupdate/bug_32607.pl (-16 / +14 lines)
Lines 1-37 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
2
3
return {
3
return {
4
    bug_number => "32607",
4
    bug_number  => "32607",
5
    description => "Add record_sources table",
5
    description => "Add record_sources table",
6
    up => sub {
6
    up          => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        # Do you stuffs here
10
        if(!TableExists('record_sources')) {
11
            $dbh->do(q{
12
                --
13
                -- Table structure for table `record_sources`
14
                --
15
9
16
                DROP TABLE IF EXISTS `record_sources`;
10
        # Do you stuffs here
17
                /*!40101 SET @saved_cs_client     = @@character_set_client */;
11
        if ( !TableExists('record_sources') ) {
18
                /*!40101 SET character_set_client = utf8 */;
12
            $dbh->do(
13
                q{
19
                CREATE TABLE `record_sources` (
14
                CREATE TABLE `record_sources` (
20
                `record_source_id` int(11) NOT NULL AUTO_INCREMENT,
15
                `record_source_id` int(11) NOT NULL AUTO_INCREMENT,
21
                `name` text NOT NULL,
16
                `name` text NOT NULL,
22
                `patron_id` int(11) NOT NULL,
17
                `patron_id` int(11) NOT NULL,
23
                PRIMARY KEY (`record_source_id`),
18
                PRIMARY KEY (`record_source_id`),
24
                CONSTRAINT `record_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
19
                CONSTRAINT `record_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
25
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
20
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
26
            });
21
            }
22
            );
27
        }
23
        }
28
24
29
        say $out "Added new record_sources table";
25
        say $out "Added new record_sources table";
30
26
31
        $dbh->do(q{
27
        $dbh->do(
28
            q{
32
            INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
29
            INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
33
            ( 3, 'manage_record_sources', 'Manage record sources')
30
            ( 3, 'manage_record_sources', 'Manage record sources')
34
        });
31
        }
32
        );
35
33
36
        say $out "Added new manage_record_sources permission";
34
        say $out "Added new manage_record_sources permission";
37
35
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 3479-3485 CREATE TABLE `record_sources` ( Link Here
3479
  `name` text NOT NULL,
3479
  `name` text NOT NULL,
3480
  `patron_id` int(11) NOT NULL,
3480
  `patron_id` int(11) NOT NULL,
3481
  PRIMARY KEY (`record_source_id`),
3481
  PRIMARY KEY (`record_source_id`),
3482
  CONSTRAINT `record_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
3482
  CONSTRAINT `record_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
3483
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3483
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3484
--
3484
--
3485
-- Table structure for table `import_record_matches`
3485
-- Table structure for table `import_record_matches`
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Page.vue (-5 / +5 lines)
Lines 1-7 Link Here
1
<template>
1
<template>
2
    <div :id="id">
2
    <div :id="id">
3
        <div id="sub-header">
3
        <div id="sub-header">
4
            <Breadcrumbs :title="title"></Breadcrumbs>
4
            <Breadcrumbs></Breadcrumbs>
5
            <Help />
5
            <Help />
6
        </div>
6
        </div>
7
        <div class="main container-fluid">
7
        <div class="main container-fluid">
Lines 35-43 import Help from "./Help.vue" Link Here
35
import Dialog from "./Dialog.vue"
35
import Dialog from "./Dialog.vue"
36
export default {
36
export default {
37
    name: "Page",
37
    name: "Page",
38
    data: () => ({
39
        leftMenu: true,
40
    }),
41
    components: {
38
    components: {
42
        LeftMenu,
39
        LeftMenu,
43
        Dialog,
40
        Dialog,
Lines 47-53 export default { Link Here
47
    props: {
44
    props: {
48
        id: String,
45
        id: String,
49
        title: String,
46
        title: String,
50
        leftMenu: Boolean,
47
        leftMenu: {
48
            type: Boolean,
49
            default: true,
50
        },
51
    },
51
    },
52
}
52
}
53
</script>
53
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/record-sources/Edit.vue (-53 / +57 lines)
Lines 1-49 Link Here
1
<template>
1
<template>
2
    <h1>{{ title }}</h1>
2
    <div v-if="!initialized">{{ $__("Loading") }}</div>
3
    <form @submit="processSubmit">
3
    <div v-else>
4
        <fieldset class="rows">
4
        <h1>{{ title }}</h1>
5
            <ol>
5
        <form @submit="processSubmit">
6
                <li>
6
            <fieldset class="rows">
7
                    <label class="required" for="name">
7
                <ol>
8
                        {{ $__("Name") }}:
8
                    <li>
9
                    </label>
9
                        <label class="required" for="name">
10
                            {{ $__("Name") }}:
11
                        </label>
12
                        <input
13
                            id="name"
14
                            v-model="row.name"
15
                            :placeholder="$__('Name')"
16
                            required
17
                        />
18
                        <span class="required">{{ $__("Required") }}</span>
19
                    </li>
20
                    <li>
21
                        <label :for="`user_id`" class="required"
22
                            >{{ $__("User") }}:</label
23
                        >
24
                        <span class="user">
25
                            {{ patron_str }}
26
                        </span>
27
                        (<a
28
                            href="#"
29
                            @click="selectUser()"
30
                            class="btn btn-default"
31
                            >{{ $__("Select user") }}</a
32
                        >)
33
                        <span class="required">{{ $__("Required") }}</span>
34
                    </li>
10
                    <input
35
                    <input
11
                        id="name"
36
                        type="hidden"
12
                        v-model="row.name"
37
                        name="selected_patron_id"
13
                        :placeholder="$__('Name')"
38
                        id="selected_patron_id"
14
                        required
15
                    />
39
                    />
16
                    <span class="required">{{ $__("Required") }}</span>
40
                </ol>
17
                </li>
41
            </fieldset>
18
                <li>
42
            <fieldset class="action">
19
                    <label :for="`user_id`" class="required"
43
                <input type="submit" :value="$__('Submit')" />
20
                        >{{ $__("User") }}:</label
44
                <router-link
21
                    >
45
                    to="../record-sources"
22
                    <span class="user">
46
                    role="button"
23
                        {{ patron_str }}
47
                    class="cancel"
24
                    </span>
48
                    >{{ $__("Cancel") }}</router-link
25
                    (<a
49
                >
26
                        href="#"
50
            </fieldset>
27
                        @click="selectUser()"
51
        </form>
28
                        class="btn btn-default"
52
    </div>
29
                        >{{ $__("Select user") }}</a
30
                    >)
31
                    <span class="required">{{ $__("Required") }}</span>
32
                </li>
33
                <input
34
                    type="hidden"
35
                    name="selected_patron_id"
36
                    id="selected_patron_id"
37
                />
38
            </ol>
39
        </fieldset>
40
        <fieldset class="action">
41
            <input type="submit" :value="$__('Submit')" />
42
            <a @click="doCancel($event)" class="router-link-active cancel">{{
43
                $__("Cancel")
44
            }}</a>
45
        </fieldset>
46
    </form>
47
</template>
53
</template>
48
54
49
<script>
55
<script>
Lines 69-81 export default { Link Here
69
            row: {
75
            row: {
70
                name: "",
76
                name: "",
71
            },
77
            },
72
            loading: true,
73
            patron_str: "",
78
            patron_str: "",
79
            initialized: false,
74
        }
80
        }
75
    },
81
    },
76
    methods: {
82
    methods: {
77
        processSubmit(event) {
83
        processSubmit(event) {
78
            event.preventDefault()
84
            event.preventDefault()
85
            const _hasValue = value => {
86
                return value !== undefined && value !== null && value !== ""
87
            }
88
            if (!_hasValue(this.row.name) || !_hasValue(this.row.patron_id))
89
                return false
79
            let response
90
            let response
80
            if (this.row.record_source_id) {
91
            if (this.row.record_source_id) {
81
                const { record_source_id: id, ...row } = this.row
92
                const { record_source_id: id, ...row } = this.row
Lines 117-126 export default { Link Here
117
                this.patron_str = $patron_to_html(patron)
128
                this.patron_str = $patron_to_html(patron)
118
            })
129
            })
119
        },
130
        },
120
        doCancel(event) {
121
            event.preventDefault()
122
            this.$router.push({ path: "../record-sources" })
123
        },
124
    },
131
    },
125
    created() {
132
    created() {
126
        const { id } = this.$route.params
133
        const { id } = this.$route.params
Lines 134-143 export default { Link Here
134
                        this.row[key] = response[key]
141
                        this.row[key] = response[key]
135
                    })
142
                    })
136
                    this.getUserData()
143
                    this.getUserData()
137
                    this.loading = false
144
                    this.initialized = true
138
                })
145
                })
139
        } else {
146
        } else {
140
            this.loading = false
147
            this.initialized = true
141
        }
148
        }
142
    },
149
    },
143
    computed: {
150
    computed: {
Lines 147-154 export default { Link Here
147
            return this.$__("Edit %s").format(this.row.name)
154
            return this.$__("Edit %s").format(this.row.name)
148
        },
155
        },
149
    },
156
    },
150
    beforeMount() {
151
        this.$root.setTitle(this.title)
152
    },
153
}
157
}
154
</script>
158
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/record-sources/List.vue (-15 / +30 lines)
Lines 1-18 Link Here
1
<template>
1
<template>
2
    <div id="toolbar" class="btn-toolbar">
2
    <div v-if="!initialized">{{ $__("Loading") }}</div>
3
        <div class="btn-group">
3
    <div v-else>
4
            <button class="btn btn-default" @click="newRecordSource">
4
        <div id="toolbar" class="btn-toolbar">
5
                <i class="fa fa-plus"></i> New record source
5
            <div class="btn-group">
6
            </button>
6
                <button class="btn btn-default" @click="newRecordSource">
7
                    <i class="fa fa-plus"></i> New record source
8
                </button>
9
            </div>
10
        </div>
11
        <h1>{{ title }}</h1>
12
        <div v-if="record_sources_count > 0" class="page-section">
13
            <KohaTable
14
                v-bind="tableOptions"
15
                @edit="doEdit"
16
                @delete="doRemove"
17
            ></KohaTable>
18
        </div>
19
        <div v-else>
20
            {{ $__("There are no record sources defined") }}
7
        </div>
21
        </div>
8
    </div>
9
    <h1>{{ title }}</h1>
10
    <div class="page-section">
11
        <KohaTable
12
            v-bind="tableOptions"
13
            @edit="doEdit"
14
            @delete="doRemove"
15
        ></KohaTable>
16
    </div>
22
    </div>
17
</template>
23
</template>
18
24
Lines 54-59 export default { Link Here
54
                },
60
                },
55
                url: "/api/v1/record_sources",
61
                url: "/api/v1/record_sources",
56
            },
62
            },
63
            initialized: false,
64
            record_sources_count: 0,
57
        }
65
        }
58
    },
66
    },
59
    setup() {
67
    setup() {
Lines 68-77 export default { Link Here
68
            api: record_source,
76
            api: record_source,
69
        }
77
        }
70
    },
78
    },
71
    beforeMount() {
79
    beforeRouteEnter(to, from, next) {
72
        this.$root.setTitle(this.title)
80
        next(vm => {
81
            vm.getRecordSourcesCount().then(() => (vm.initialized = true))
82
        })
73
    },
83
    },
74
    methods: {
84
    methods: {
85
        getRecordSourcesCount() {
86
            return this.api.count().then(count => {
87
                this.record_sources_count = count
88
            })
89
        },
75
        newRecordSource() {
90
        newRecordSource() {
76
            this.$router.push({ path: "record-sources/add" })
91
            this.$router.push({ path: "record-sources/add" })
77
        },
92
        },
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/record-sources/Main.vue (-11 / +1 lines)
Lines 1-5 Link Here
1
<template>
1
<template>
2
    <Page :left-menu="false" :title="title">
2
    <Page :left-menu="false">
3
        <router-view></router-view>
3
        <router-view></router-view>
4
    </Page>
4
    </Page>
5
</template>
5
</template>
Lines 8-23 Link Here
8
import Page from "../Page.vue"
8
import Page from "../Page.vue"
9
export default {
9
export default {
10
    name: "Main",
10
    name: "Main",
11
    data() {
12
        return {
13
            title: "",
14
        }
15
    },
16
    methods: {
17
        setTitle(title) {
18
            this.title = title
19
        },
20
    },
21
    components: {
11
    components: {
22
        Page,
12
        Page,
23
    },
13
    },
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/record-sources.js (+11 lines)
Lines 43-48 export class RecordSourcesClient extends HttpClient { Link Here
43
                    headers,
43
                    headers,
44
                });
44
                });
45
            },
45
            },
46
            count: (query = {}) => {
47
                return this.count({
48
                    endpoint:
49
                        "?" +
50
                        new URLSearchParams({
51
                            _page: 1,
52
                            _per_page: 1,
53
                            ...(query && { q: JSON.stringify(query) }),
54
                        }),
55
                });
56
            },
46
        };
57
        };
47
    }
58
    }
48
}
59
}
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/record-sources.ts (-1 / +1 lines)
Lines 31-37 const router = createRouter({ Link Here
31
    routes,
31
    routes,
32
});
32
});
33
33
34
import App from "../components/record-sources/Main.vue";
34
import App from "../components/RecordSources/Main.vue";
35
35
36
// import { routes } from "./routes";
36
// import { routes } from "./routes";
37
37
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/routes/record-sources.js (-14 / +13 lines)
Lines 1-32 Link Here
1
import Edit from "../components/record-sources/Edit.vue";
1
import { markRaw } from "vue";
2
import List from "../components/record-sources/List.vue";
2
import Edit from "../components/RecordSources/Edit.vue";
3
import List from "../components/RecordSources/List.vue";
4
import { $__ } from "../i18n";
3
5
4
export default {
6
export default {
5
    title: "Administration",
7
    title: $__("Administration"),
6
    href: "/cgi-bin/koha/admin/admin-home.pl",
8
    href: "/cgi-bin/koha/admin/admin-home.pl",
9
    is_base: true,
7
    children: [
10
    children: [
8
        {
11
        {
9
            title: "Record sources",
12
            title: $__("Record sources"),
10
            path: "/cgi-bin/koha/admin/record-sources",
13
            path: "/cgi-bin/koha/admin/record-sources",
11
            component: {
12
                template: "<router-view></router-view>",
13
                name: "Base",
14
            },
15
            children: [
14
            children: [
16
                {
15
                {
17
                    title: "List",
16
                    title: $__("List"),
18
                    path: "",
17
                    path: "",
19
                    component: List,
18
                    component: markRaw(List),
20
                },
19
                },
21
                {
20
                {
22
                    title: "Add record source",
21
                    title: $__("Add record source"),
23
                    path: "add",
22
                    path: "add",
24
                    component: Edit,
23
                    component: markRaw(Edit),
25
                },
24
                },
26
                {
25
                {
27
                    title: "Edit record source",
26
                    title: $__("Edit record source"),
28
                    path: ":id",
27
                    path: ":id",
29
                    component: Edit,
28
                    component: markRaw(Edit),
30
                },
29
                },
31
            ],
30
            ],
32
        },
31
        },
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/navigation.js (-15 / +18 lines)
Lines 71-80 export const useNavigationStore = defineStore("navigation", { Link Here
71
    },
71
    },
72
    getters: {
72
    getters: {
73
        breadcrumbs() {
73
        breadcrumbs() {
74
            const baseElements = _getBaseElements(this.routeState);
74
            if (this.current)
75
            if (this.current)
75
                return _buildFromCurrentMatches(this.current, this.routeState);
76
                return [
77
                    ...baseElements,
78
                    ..._buildFromCurrentMatches(this.current),
79
                ].filter(
80
                    (breadcrumb, index, array) =>
81
                        !array
82
                            .slice(0, index)
83
                            .find(
84
                                bc =>
85
                                    (breadcrumb.href &&
86
                                        breadcrumb.href === bc.href) ||
87
                                    (breadcrumb.path &&
88
                                        breadcrumb.path === bc.path)
89
                            )
90
                );
76
91
77
            return _getBaseElements(this.routeState);
92
            return baseElements;
78
93
79
            // Function declarations
94
            // Function declarations
80
95
Lines 100-121 export const useNavigationStore = defineStore("navigation", { Link Here
100
                );
115
                );
101
            }
116
            }
102
117
103
            function _buildFromCurrentMatches(currentMatches, routeState) {
104
                return [
105
                    {
106
                        ...routeState,
107
                        icon: null,
108
                        children: null,
109
                    },
110
                    ..._mapMatches(currentMatches),
111
                ];
112
            }
113
114
            function _isBaseOrNotStub(child) {
118
            function _isBaseOrNotStub(child) {
115
                return child.is_base || (child.path && child.path !== "");
119
                return child.is_base || (child.path && child.path !== "");
116
            }
120
            }
117
121
118
            function _mapMatches(currentMatches) {
122
            function _buildFromCurrentMatches(currentMatches) {
119
                return currentMatches
123
                return currentMatches
120
                    .filter(match => _isBaseOrNotStub(match.meta.self))
124
                    .filter(match => _isBaseOrNotStub(match.meta.self))
121
                    .map(match => ({
125
                    .map(match => ({
122
- 

Return to bug 32607