Bug 17767: DBIC update
[koha.git] / Koha / Schema / Result / Borrower.pm
1 use utf8;
2 package Koha::Schema::Result::Borrower;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Koha::Schema::Result::Borrower
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<borrowers>
19
20 =cut
21
22 __PACKAGE__->table("borrowers");
23
24 =head1 ACCESSORS
25
26 =head2 borrowernumber
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 cardnumber
33
34   data_type: 'varchar'
35   is_nullable: 1
36   size: 16
37
38 =head2 surname
39
40   data_type: 'mediumtext'
41   is_nullable: 0
42
43 =head2 firstname
44
45   data_type: 'text'
46   is_nullable: 1
47
48 =head2 title
49
50   data_type: 'mediumtext'
51   is_nullable: 1
52
53 =head2 othernames
54
55   data_type: 'mediumtext'
56   is_nullable: 1
57
58 =head2 initials
59
60   data_type: 'text'
61   is_nullable: 1
62
63 =head2 streetnumber
64
65   data_type: 'varchar'
66   is_nullable: 1
67   size: 10
68
69 =head2 streettype
70
71   data_type: 'varchar'
72   is_nullable: 1
73   size: 50
74
75 =head2 address
76
77   data_type: 'mediumtext'
78   is_nullable: 0
79
80 =head2 address2
81
82   data_type: 'text'
83   is_nullable: 1
84
85 =head2 city
86
87   data_type: 'mediumtext'
88   is_nullable: 0
89
90 =head2 state
91
92   data_type: 'text'
93   is_nullable: 1
94
95 =head2 zipcode
96
97   data_type: 'varchar'
98   is_nullable: 1
99   size: 25
100
101 =head2 country
102
103   data_type: 'text'
104   is_nullable: 1
105
106 =head2 email
107
108   data_type: 'mediumtext'
109   is_nullable: 1
110
111 =head2 phone
112
113   data_type: 'text'
114   is_nullable: 1
115
116 =head2 mobile
117
118   data_type: 'varchar'
119   is_nullable: 1
120   size: 50
121
122 =head2 fax
123
124   data_type: 'mediumtext'
125   is_nullable: 1
126
127 =head2 emailpro
128
129   data_type: 'text'
130   is_nullable: 1
131
132 =head2 phonepro
133
134   data_type: 'text'
135   is_nullable: 1
136
137 =head2 B_streetnumber
138
139   accessor: 'b_streetnumber'
140   data_type: 'varchar'
141   is_nullable: 1
142   size: 10
143
144 =head2 B_streettype
145
146   accessor: 'b_streettype'
147   data_type: 'varchar'
148   is_nullable: 1
149   size: 50
150
151 =head2 B_address
152
153   accessor: 'b_address'
154   data_type: 'varchar'
155   is_nullable: 1
156   size: 100
157
158 =head2 B_address2
159
160   accessor: 'b_address2'
161   data_type: 'text'
162   is_nullable: 1
163
164 =head2 B_city
165
166   accessor: 'b_city'
167   data_type: 'mediumtext'
168   is_nullable: 1
169
170 =head2 B_state
171
172   accessor: 'b_state'
173   data_type: 'text'
174   is_nullable: 1
175
176 =head2 B_zipcode
177
178   accessor: 'b_zipcode'
179   data_type: 'varchar'
180   is_nullable: 1
181   size: 25
182
183 =head2 B_country
184
185   accessor: 'b_country'
186   data_type: 'text'
187   is_nullable: 1
188
189 =head2 B_email
190
191   accessor: 'b_email'
192   data_type: 'text'
193   is_nullable: 1
194
195 =head2 B_phone
196
197   accessor: 'b_phone'
198   data_type: 'mediumtext'
199   is_nullable: 1
200
201 =head2 dateofbirth
202
203   data_type: 'date'
204   datetime_undef_if_invalid: 1
205   is_nullable: 1
206
207 =head2 branchcode
208
209   data_type: 'varchar'
210   default_value: (empty string)
211   is_foreign_key: 1
212   is_nullable: 0
213   size: 10
214
215 =head2 categorycode
216
217   data_type: 'varchar'
218   default_value: (empty string)
219   is_foreign_key: 1
220   is_nullable: 0
221   size: 10
222
223 =head2 dateenrolled
224
225   data_type: 'date'
226   datetime_undef_if_invalid: 1
227   is_nullable: 1
228
229 =head2 dateexpiry
230
231   data_type: 'date'
232   datetime_undef_if_invalid: 1
233   is_nullable: 1
234
235 =head2 gonenoaddress
236
237   data_type: 'tinyint'
238   is_nullable: 1
239
240 =head2 lost
241
242   data_type: 'tinyint'
243   is_nullable: 1
244
245 =head2 debarred
246
247   data_type: 'date'
248   datetime_undef_if_invalid: 1
249   is_nullable: 1
250
251 =head2 debarredcomment
252
253   data_type: 'varchar'
254   is_nullable: 1
255   size: 255
256
257 =head2 contactname
258
259   data_type: 'mediumtext'
260   is_nullable: 1
261
262 =head2 contactfirstname
263
264   data_type: 'text'
265   is_nullable: 1
266
267 =head2 contacttitle
268
269   data_type: 'text'
270   is_nullable: 1
271
272 =head2 guarantorid
273
274   data_type: 'integer'
275   is_nullable: 1
276
277 =head2 borrowernotes
278
279   data_type: 'mediumtext'
280   is_nullable: 1
281
282 =head2 relationship
283
284   data_type: 'varchar'
285   is_nullable: 1
286   size: 100
287
288 =head2 sex
289
290   data_type: 'varchar'
291   is_nullable: 1
292   size: 1
293
294 =head2 password
295
296   data_type: 'varchar'
297   is_nullable: 1
298   size: 60
299
300 =head2 flags
301
302   data_type: 'integer'
303   is_nullable: 1
304
305 =head2 userid
306
307   data_type: 'varchar'
308   is_nullable: 1
309   size: 75
310
311 =head2 opacnote
312
313   data_type: 'mediumtext'
314   is_nullable: 1
315
316 =head2 contactnote
317
318   data_type: 'varchar'
319   is_nullable: 1
320   size: 255
321
322 =head2 sort1
323
324   data_type: 'varchar'
325   is_nullable: 1
326   size: 80
327
328 =head2 sort2
329
330   data_type: 'varchar'
331   is_nullable: 1
332   size: 80
333
334 =head2 altcontactfirstname
335
336   data_type: 'varchar'
337   is_nullable: 1
338   size: 255
339
340 =head2 altcontactsurname
341
342   data_type: 'varchar'
343   is_nullable: 1
344   size: 255
345
346 =head2 altcontactaddress1
347
348   data_type: 'varchar'
349   is_nullable: 1
350   size: 255
351
352 =head2 altcontactaddress2
353
354   data_type: 'varchar'
355   is_nullable: 1
356   size: 255
357
358 =head2 altcontactaddress3
359
360   data_type: 'varchar'
361   is_nullable: 1
362   size: 255
363
364 =head2 altcontactstate
365
366   data_type: 'text'
367   is_nullable: 1
368
369 =head2 altcontactzipcode
370
371   data_type: 'varchar'
372   is_nullable: 1
373   size: 50
374
375 =head2 altcontactcountry
376
377   data_type: 'text'
378   is_nullable: 1
379
380 =head2 altcontactphone
381
382   data_type: 'varchar'
383   is_nullable: 1
384   size: 50
385
386 =head2 smsalertnumber
387
388   data_type: 'varchar'
389   is_nullable: 1
390   size: 50
391
392 =head2 sms_provider_id
393
394   data_type: 'integer'
395   is_foreign_key: 1
396   is_nullable: 1
397
398 =head2 privacy
399
400   data_type: 'integer'
401   default_value: 1
402   is_nullable: 0
403
404 =head2 privacy_guarantor_checkouts
405
406   data_type: 'tinyint'
407   default_value: 0
408   is_nullable: 0
409
410 =head2 checkprevcheckout
411
412   data_type: 'varchar'
413   default_value: 'inherit'
414   is_nullable: 0
415   size: 7
416
417 =head2 updated_on
418
419   data_type: 'timestamp'
420   datetime_undef_if_invalid: 1
421   default_value: current_timestamp
422   is_nullable: 0
423
424 =head2 lastseen
425
426   data_type: 'datetime'
427   datetime_undef_if_invalid: 1
428   is_nullable: 1
429
430 =cut
431
432 __PACKAGE__->add_columns(
433   "borrowernumber",
434   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
435   "cardnumber",
436   { data_type => "varchar", is_nullable => 1, size => 16 },
437   "surname",
438   { data_type => "mediumtext", is_nullable => 0 },
439   "firstname",
440   { data_type => "text", is_nullable => 1 },
441   "title",
442   { data_type => "mediumtext", is_nullable => 1 },
443   "othernames",
444   { data_type => "mediumtext", is_nullable => 1 },
445   "initials",
446   { data_type => "text", is_nullable => 1 },
447   "streetnumber",
448   { data_type => "varchar", is_nullable => 1, size => 10 },
449   "streettype",
450   { data_type => "varchar", is_nullable => 1, size => 50 },
451   "address",
452   { data_type => "mediumtext", is_nullable => 0 },
453   "address2",
454   { data_type => "text", is_nullable => 1 },
455   "city",
456   { data_type => "mediumtext", is_nullable => 0 },
457   "state",
458   { data_type => "text", is_nullable => 1 },
459   "zipcode",
460   { data_type => "varchar", is_nullable => 1, size => 25 },
461   "country",
462   { data_type => "text", is_nullable => 1 },
463   "email",
464   { data_type => "mediumtext", is_nullable => 1 },
465   "phone",
466   { data_type => "text", is_nullable => 1 },
467   "mobile",
468   { data_type => "varchar", is_nullable => 1, size => 50 },
469   "fax",
470   { data_type => "mediumtext", is_nullable => 1 },
471   "emailpro",
472   { data_type => "text", is_nullable => 1 },
473   "phonepro",
474   { data_type => "text", is_nullable => 1 },
475   "B_streetnumber",
476   {
477     accessor => "b_streetnumber",
478     data_type => "varchar",
479     is_nullable => 1,
480     size => 10,
481   },
482   "B_streettype",
483   {
484     accessor => "b_streettype",
485     data_type => "varchar",
486     is_nullable => 1,
487     size => 50,
488   },
489   "B_address",
490   {
491     accessor => "b_address",
492     data_type => "varchar",
493     is_nullable => 1,
494     size => 100,
495   },
496   "B_address2",
497   { accessor => "b_address2", data_type => "text", is_nullable => 1 },
498   "B_city",
499   { accessor => "b_city", data_type => "mediumtext", is_nullable => 1 },
500   "B_state",
501   { accessor => "b_state", data_type => "text", is_nullable => 1 },
502   "B_zipcode",
503   {
504     accessor => "b_zipcode",
505     data_type => "varchar",
506     is_nullable => 1,
507     size => 25,
508   },
509   "B_country",
510   { accessor => "b_country", data_type => "text", is_nullable => 1 },
511   "B_email",
512   { accessor => "b_email", data_type => "text", is_nullable => 1 },
513   "B_phone",
514   { accessor => "b_phone", data_type => "mediumtext", is_nullable => 1 },
515   "dateofbirth",
516   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
517   "branchcode",
518   {
519     data_type => "varchar",
520     default_value => "",
521     is_foreign_key => 1,
522     is_nullable => 0,
523     size => 10,
524   },
525   "categorycode",
526   {
527     data_type => "varchar",
528     default_value => "",
529     is_foreign_key => 1,
530     is_nullable => 0,
531     size => 10,
532   },
533   "dateenrolled",
534   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
535   "dateexpiry",
536   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
537   "gonenoaddress",
538   { data_type => "tinyint", is_nullable => 1 },
539   "lost",
540   { data_type => "tinyint", is_nullable => 1 },
541   "debarred",
542   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
543   "debarredcomment",
544   { data_type => "varchar", is_nullable => 1, size => 255 },
545   "contactname",
546   { data_type => "mediumtext", is_nullable => 1 },
547   "contactfirstname",
548   { data_type => "text", is_nullable => 1 },
549   "contacttitle",
550   { data_type => "text", is_nullable => 1 },
551   "guarantorid",
552   { data_type => "integer", is_nullable => 1 },
553   "borrowernotes",
554   { data_type => "mediumtext", is_nullable => 1 },
555   "relationship",
556   { data_type => "varchar", is_nullable => 1, size => 100 },
557   "sex",
558   { data_type => "varchar", is_nullable => 1, size => 1 },
559   "password",
560   { data_type => "varchar", is_nullable => 1, size => 60 },
561   "flags",
562   { data_type => "integer", is_nullable => 1 },
563   "userid",
564   { data_type => "varchar", is_nullable => 1, size => 75 },
565   "opacnote",
566   { data_type => "mediumtext", is_nullable => 1 },
567   "contactnote",
568   { data_type => "varchar", is_nullable => 1, size => 255 },
569   "sort1",
570   { data_type => "varchar", is_nullable => 1, size => 80 },
571   "sort2",
572   { data_type => "varchar", is_nullable => 1, size => 80 },
573   "altcontactfirstname",
574   { data_type => "varchar", is_nullable => 1, size => 255 },
575   "altcontactsurname",
576   { data_type => "varchar", is_nullable => 1, size => 255 },
577   "altcontactaddress1",
578   { data_type => "varchar", is_nullable => 1, size => 255 },
579   "altcontactaddress2",
580   { data_type => "varchar", is_nullable => 1, size => 255 },
581   "altcontactaddress3",
582   { data_type => "varchar", is_nullable => 1, size => 255 },
583   "altcontactstate",
584   { data_type => "text", is_nullable => 1 },
585   "altcontactzipcode",
586   { data_type => "varchar", is_nullable => 1, size => 50 },
587   "altcontactcountry",
588   { data_type => "text", is_nullable => 1 },
589   "altcontactphone",
590   { data_type => "varchar", is_nullable => 1, size => 50 },
591   "smsalertnumber",
592   { data_type => "varchar", is_nullable => 1, size => 50 },
593   "sms_provider_id",
594   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
595   "privacy",
596   { data_type => "integer", default_value => 1, is_nullable => 0 },
597   "privacy_guarantor_checkouts",
598   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
599   "checkprevcheckout",
600   {
601     data_type => "varchar",
602     default_value => "inherit",
603     is_nullable => 0,
604     size => 7,
605   },
606   "updated_on",
607   {
608     data_type => "timestamp",
609     datetime_undef_if_invalid => 1,
610     default_value => \"current_timestamp",
611     is_nullable => 0,
612   },
613   "lastseen",
614   {
615     data_type => "datetime",
616     datetime_undef_if_invalid => 1,
617     is_nullable => 1,
618   },
619 );
620
621 =head1 PRIMARY KEY
622
623 =over 4
624
625 =item * L</borrowernumber>
626
627 =back
628
629 =cut
630
631 __PACKAGE__->set_primary_key("borrowernumber");
632
633 =head1 UNIQUE CONSTRAINTS
634
635 =head2 C<cardnumber>
636
637 =over 4
638
639 =item * L</cardnumber>
640
641 =back
642
643 =cut
644
645 __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]);
646
647 =head2 C<userid>
648
649 =over 4
650
651 =item * L</userid>
652
653 =back
654
655 =cut
656
657 __PACKAGE__->add_unique_constraint("userid", ["userid"]);
658
659 =head1 RELATIONS
660
661 =head2 accountlines
662
663 Type: has_many
664
665 Related object: L<Koha::Schema::Result::Accountline>
666
667 =cut
668
669 __PACKAGE__->has_many(
670   "accountlines",
671   "Koha::Schema::Result::Accountline",
672   { "foreign.borrowernumber" => "self.borrowernumber" },
673   { cascade_copy => 0, cascade_delete => 0 },
674 );
675
676 =head2 accountoffsets
677
678 Type: has_many
679
680 Related object: L<Koha::Schema::Result::Accountoffset>
681
682 =cut
683
684 __PACKAGE__->has_many(
685   "accountoffsets",
686   "Koha::Schema::Result::Accountoffset",
687   { "foreign.borrowernumber" => "self.borrowernumber" },
688   { cascade_copy => 0, cascade_delete => 0 },
689 );
690
691 =head2 aqbasketusers
692
693 Type: has_many
694
695 Related object: L<Koha::Schema::Result::Aqbasketuser>
696
697 =cut
698
699 __PACKAGE__->has_many(
700   "aqbasketusers",
701   "Koha::Schema::Result::Aqbasketuser",
702   { "foreign.borrowernumber" => "self.borrowernumber" },
703   { cascade_copy => 0, cascade_delete => 0 },
704 );
705
706 =head2 aqbudgetborrowers
707
708 Type: has_many
709
710 Related object: L<Koha::Schema::Result::Aqbudgetborrower>
711
712 =cut
713
714 __PACKAGE__->has_many(
715   "aqbudgetborrowers",
716   "Koha::Schema::Result::Aqbudgetborrower",
717   { "foreign.borrowernumber" => "self.borrowernumber" },
718   { cascade_copy => 0, cascade_delete => 0 },
719 );
720
721 =head2 aqorder_users
722
723 Type: has_many
724
725 Related object: L<Koha::Schema::Result::AqorderUser>
726
727 =cut
728
729 __PACKAGE__->has_many(
730   "aqorder_users",
731   "Koha::Schema::Result::AqorderUser",
732   { "foreign.borrowernumber" => "self.borrowernumber" },
733   { cascade_copy => 0, cascade_delete => 0 },
734 );
735
736 =head2 article_requests
737
738 Type: has_many
739
740 Related object: L<Koha::Schema::Result::ArticleRequest>
741
742 =cut
743
744 __PACKAGE__->has_many(
745   "article_requests",
746   "Koha::Schema::Result::ArticleRequest",
747   { "foreign.borrowernumber" => "self.borrowernumber" },
748   { cascade_copy => 0, cascade_delete => 0 },
749 );
750
751 =head2 borrower_attributes
752
753 Type: has_many
754
755 Related object: L<Koha::Schema::Result::BorrowerAttribute>
756
757 =cut
758
759 __PACKAGE__->has_many(
760   "borrower_attributes",
761   "Koha::Schema::Result::BorrowerAttribute",
762   { "foreign.borrowernumber" => "self.borrowernumber" },
763   { cascade_copy => 0, cascade_delete => 0 },
764 );
765
766 =head2 borrower_debarments
767
768 Type: has_many
769
770 Related object: L<Koha::Schema::Result::BorrowerDebarment>
771
772 =cut
773
774 __PACKAGE__->has_many(
775   "borrower_debarments",
776   "Koha::Schema::Result::BorrowerDebarment",
777   { "foreign.borrowernumber" => "self.borrowernumber" },
778   { cascade_copy => 0, cascade_delete => 0 },
779 );
780
781 =head2 borrower_files
782
783 Type: has_many
784
785 Related object: L<Koha::Schema::Result::BorrowerFile>
786
787 =cut
788
789 __PACKAGE__->has_many(
790   "borrower_files",
791   "Koha::Schema::Result::BorrowerFile",
792   { "foreign.borrowernumber" => "self.borrowernumber" },
793   { cascade_copy => 0, cascade_delete => 0 },
794 );
795
796 =head2 borrower_message_preferences
797
798 Type: has_many
799
800 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
801
802 =cut
803
804 __PACKAGE__->has_many(
805   "borrower_message_preferences",
806   "Koha::Schema::Result::BorrowerMessagePreference",
807   { "foreign.borrowernumber" => "self.borrowernumber" },
808   { cascade_copy => 0, cascade_delete => 0 },
809 );
810
811 =head2 borrower_syncs
812
813 Type: has_many
814
815 Related object: L<Koha::Schema::Result::BorrowerSync>
816
817 =cut
818
819 __PACKAGE__->has_many(
820   "borrower_syncs",
821   "Koha::Schema::Result::BorrowerSync",
822   { "foreign.borrowernumber" => "self.borrowernumber" },
823   { cascade_copy => 0, cascade_delete => 0 },
824 );
825
826 =head2 branchcode
827
828 Type: belongs_to
829
830 Related object: L<Koha::Schema::Result::Branch>
831
832 =cut
833
834 __PACKAGE__->belongs_to(
835   "branchcode",
836   "Koha::Schema::Result::Branch",
837   { branchcode => "branchcode" },
838   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
839 );
840
841 =head2 categorycode
842
843 Type: belongs_to
844
845 Related object: L<Koha::Schema::Result::Category>
846
847 =cut
848
849 __PACKAGE__->belongs_to(
850   "categorycode",
851   "Koha::Schema::Result::Category",
852   { categorycode => "categorycode" },
853   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
854 );
855
856 =head2 course_instructors
857
858 Type: has_many
859
860 Related object: L<Koha::Schema::Result::CourseInstructor>
861
862 =cut
863
864 __PACKAGE__->has_many(
865   "course_instructors",
866   "Koha::Schema::Result::CourseInstructor",
867   { "foreign.borrowernumber" => "self.borrowernumber" },
868   { cascade_copy => 0, cascade_delete => 0 },
869 );
870
871 =head2 creator_batches
872
873 Type: has_many
874
875 Related object: L<Koha::Schema::Result::CreatorBatch>
876
877 =cut
878
879 __PACKAGE__->has_many(
880   "creator_batches",
881   "Koha::Schema::Result::CreatorBatch",
882   { "foreign.borrower_number" => "self.borrowernumber" },
883   { cascade_copy => 0, cascade_delete => 0 },
884 );
885
886 =head2 discharges
887
888 Type: has_many
889
890 Related object: L<Koha::Schema::Result::Discharge>
891
892 =cut
893
894 __PACKAGE__->has_many(
895   "discharges",
896   "Koha::Schema::Result::Discharge",
897   { "foreign.borrower" => "self.borrowernumber" },
898   { cascade_copy => 0, cascade_delete => 0 },
899 );
900
901 =head2 hold_fill_targets
902
903 Type: has_many
904
905 Related object: L<Koha::Schema::Result::HoldFillTarget>
906
907 =cut
908
909 __PACKAGE__->has_many(
910   "hold_fill_targets",
911   "Koha::Schema::Result::HoldFillTarget",
912   { "foreign.borrowernumber" => "self.borrowernumber" },
913   { cascade_copy => 0, cascade_delete => 0 },
914 );
915
916 =head2 housebound_profile
917
918 Type: might_have
919
920 Related object: L<Koha::Schema::Result::HouseboundProfile>
921
922 =cut
923
924 __PACKAGE__->might_have(
925   "housebound_profile",
926   "Koha::Schema::Result::HouseboundProfile",
927   { "foreign.borrowernumber" => "self.borrowernumber" },
928   { cascade_copy => 0, cascade_delete => 0 },
929 );
930
931 =head2 housebound_role
932
933 Type: might_have
934
935 Related object: L<Koha::Schema::Result::HouseboundRole>
936
937 =cut
938
939 __PACKAGE__->might_have(
940   "housebound_role",
941   "Koha::Schema::Result::HouseboundRole",
942   { "foreign.borrowernumber_id" => "self.borrowernumber" },
943   { cascade_copy => 0, cascade_delete => 0 },
944 );
945
946 =head2 housebound_visit_chooser_brwnumbers
947
948 Type: has_many
949
950 Related object: L<Koha::Schema::Result::HouseboundVisit>
951
952 =cut
953
954 __PACKAGE__->has_many(
955   "housebound_visit_chooser_brwnumbers",
956   "Koha::Schema::Result::HouseboundVisit",
957   { "foreign.chooser_brwnumber" => "self.borrowernumber" },
958   { cascade_copy => 0, cascade_delete => 0 },
959 );
960
961 =head2 housebound_visit_deliverer_brwnumbers
962
963 Type: has_many
964
965 Related object: L<Koha::Schema::Result::HouseboundVisit>
966
967 =cut
968
969 __PACKAGE__->has_many(
970   "housebound_visit_deliverer_brwnumbers",
971   "Koha::Schema::Result::HouseboundVisit",
972   { "foreign.deliverer_brwnumber" => "self.borrowernumber" },
973   { cascade_copy => 0, cascade_delete => 0 },
974 );
975
976 =head2 issues
977
978 Type: has_many
979
980 Related object: L<Koha::Schema::Result::Issue>
981
982 =cut
983
984 __PACKAGE__->has_many(
985   "issues",
986   "Koha::Schema::Result::Issue",
987   { "foreign.borrowernumber" => "self.borrowernumber" },
988   { cascade_copy => 0, cascade_delete => 0 },
989 );
990
991 =head2 items_last_borrowers
992
993 Type: has_many
994
995 Related object: L<Koha::Schema::Result::ItemsLastBorrower>
996
997 =cut
998
999 __PACKAGE__->has_many(
1000   "items_last_borrowers",
1001   "Koha::Schema::Result::ItemsLastBorrower",
1002   { "foreign.borrowernumber" => "self.borrowernumber" },
1003   { cascade_copy => 0, cascade_delete => 0 },
1004 );
1005
1006 =head2 message_queues
1007
1008 Type: has_many
1009
1010 Related object: L<Koha::Schema::Result::MessageQueue>
1011
1012 =cut
1013
1014 __PACKAGE__->has_many(
1015   "message_queues",
1016   "Koha::Schema::Result::MessageQueue",
1017   { "foreign.borrowernumber" => "self.borrowernumber" },
1018   { cascade_copy => 0, cascade_delete => 0 },
1019 );
1020
1021 =head2 messages
1022
1023 Type: has_many
1024
1025 Related object: L<Koha::Schema::Result::Message>
1026
1027 =cut
1028
1029 __PACKAGE__->has_many(
1030   "messages",
1031   "Koha::Schema::Result::Message",
1032   { "foreign.manager_id" => "self.borrowernumber" },
1033   { cascade_copy => 0, cascade_delete => 0 },
1034 );
1035
1036 =head2 old_issues
1037
1038 Type: has_many
1039
1040 Related object: L<Koha::Schema::Result::OldIssue>
1041
1042 =cut
1043
1044 __PACKAGE__->has_many(
1045   "old_issues",
1046   "Koha::Schema::Result::OldIssue",
1047   { "foreign.borrowernumber" => "self.borrowernumber" },
1048   { cascade_copy => 0, cascade_delete => 0 },
1049 );
1050
1051 =head2 old_reserves
1052
1053 Type: has_many
1054
1055 Related object: L<Koha::Schema::Result::OldReserve>
1056
1057 =cut
1058
1059 __PACKAGE__->has_many(
1060   "old_reserves",
1061   "Koha::Schema::Result::OldReserve",
1062   { "foreign.borrowernumber" => "self.borrowernumber" },
1063   { cascade_copy => 0, cascade_delete => 0 },
1064 );
1065
1066 =head2 opac_news
1067
1068 Type: has_many
1069
1070 Related object: L<Koha::Schema::Result::OpacNews>
1071
1072 =cut
1073
1074 __PACKAGE__->has_many(
1075   "opac_news",
1076   "Koha::Schema::Result::OpacNews",
1077   { "foreign.borrowernumber" => "self.borrowernumber" },
1078   { cascade_copy => 0, cascade_delete => 0 },
1079 );
1080
1081 =head2 patron_list_patrons
1082
1083 Type: has_many
1084
1085 Related object: L<Koha::Schema::Result::PatronListPatron>
1086
1087 =cut
1088
1089 __PACKAGE__->has_many(
1090   "patron_list_patrons",
1091   "Koha::Schema::Result::PatronListPatron",
1092   { "foreign.borrowernumber" => "self.borrowernumber" },
1093   { cascade_copy => 0, cascade_delete => 0 },
1094 );
1095
1096 =head2 patron_lists
1097
1098 Type: has_many
1099
1100 Related object: L<Koha::Schema::Result::PatronList>
1101
1102 =cut
1103
1104 __PACKAGE__->has_many(
1105   "patron_lists",
1106   "Koha::Schema::Result::PatronList",
1107   { "foreign.owner" => "self.borrowernumber" },
1108   { cascade_copy => 0, cascade_delete => 0 },
1109 );
1110
1111 =head2 patronimage
1112
1113 Type: might_have
1114
1115 Related object: L<Koha::Schema::Result::Patronimage>
1116
1117 =cut
1118
1119 __PACKAGE__->might_have(
1120   "patronimage",
1121   "Koha::Schema::Result::Patronimage",
1122   { "foreign.borrowernumber" => "self.borrowernumber" },
1123   { cascade_copy => 0, cascade_delete => 0 },
1124 );
1125
1126 =head2 ratings
1127
1128 Type: has_many
1129
1130 Related object: L<Koha::Schema::Result::Rating>
1131
1132 =cut
1133
1134 __PACKAGE__->has_many(
1135   "ratings",
1136   "Koha::Schema::Result::Rating",
1137   { "foreign.borrowernumber" => "self.borrowernumber" },
1138   { cascade_copy => 0, cascade_delete => 0 },
1139 );
1140
1141 =head2 reserves
1142
1143 Type: has_many
1144
1145 Related object: L<Koha::Schema::Result::Reserve>
1146
1147 =cut
1148
1149 __PACKAGE__->has_many(
1150   "reserves",
1151   "Koha::Schema::Result::Reserve",
1152   { "foreign.borrowernumber" => "self.borrowernumber" },
1153   { cascade_copy => 0, cascade_delete => 0 },
1154 );
1155
1156 =head2 reviews
1157
1158 Type: has_many
1159
1160 Related object: L<Koha::Schema::Result::Review>
1161
1162 =cut
1163
1164 __PACKAGE__->has_many(
1165   "reviews",
1166   "Koha::Schema::Result::Review",
1167   { "foreign.borrowernumber" => "self.borrowernumber" },
1168   { cascade_copy => 0, cascade_delete => 0 },
1169 );
1170
1171 =head2 sms_provider
1172
1173 Type: belongs_to
1174
1175 Related object: L<Koha::Schema::Result::SmsProvider>
1176
1177 =cut
1178
1179 __PACKAGE__->belongs_to(
1180   "sms_provider",
1181   "Koha::Schema::Result::SmsProvider",
1182   { id => "sms_provider_id" },
1183   {
1184     is_deferrable => 1,
1185     join_type     => "LEFT",
1186     on_delete     => "SET NULL",
1187     on_update     => "CASCADE",
1188   },
1189 );
1190
1191 =head2 subscriptionroutinglists
1192
1193 Type: has_many
1194
1195 Related object: L<Koha::Schema::Result::Subscriptionroutinglist>
1196
1197 =cut
1198
1199 __PACKAGE__->has_many(
1200   "subscriptionroutinglists",
1201   "Koha::Schema::Result::Subscriptionroutinglist",
1202   { "foreign.borrowernumber" => "self.borrowernumber" },
1203   { cascade_copy => 0, cascade_delete => 0 },
1204 );
1205
1206 =head2 tags_all
1207
1208 Type: has_many
1209
1210 Related object: L<Koha::Schema::Result::TagAll>
1211
1212 =cut
1213
1214 __PACKAGE__->has_many(
1215   "tags_all",
1216   "Koha::Schema::Result::TagAll",
1217   { "foreign.borrowernumber" => "self.borrowernumber" },
1218   { cascade_copy => 0, cascade_delete => 0 },
1219 );
1220
1221 =head2 tags_approvals
1222
1223 Type: has_many
1224
1225 Related object: L<Koha::Schema::Result::TagsApproval>
1226
1227 =cut
1228
1229 __PACKAGE__->has_many(
1230   "tags_approvals",
1231   "Koha::Schema::Result::TagsApproval",
1232   { "foreign.approved_by" => "self.borrowernumber" },
1233   { cascade_copy => 0, cascade_delete => 0 },
1234 );
1235
1236 =head2 user_permissions
1237
1238 Type: has_many
1239
1240 Related object: L<Koha::Schema::Result::UserPermission>
1241
1242 =cut
1243
1244 __PACKAGE__->has_many(
1245   "user_permissions",
1246   "Koha::Schema::Result::UserPermission",
1247   { "foreign.borrowernumber" => "self.borrowernumber" },
1248   { cascade_copy => 0, cascade_delete => 0 },
1249 );
1250
1251 =head2 virtualshelfcontents
1252
1253 Type: has_many
1254
1255 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
1256
1257 =cut
1258
1259 __PACKAGE__->has_many(
1260   "virtualshelfcontents",
1261   "Koha::Schema::Result::Virtualshelfcontent",
1262   { "foreign.borrowernumber" => "self.borrowernumber" },
1263   { cascade_copy => 0, cascade_delete => 0 },
1264 );
1265
1266 =head2 virtualshelfshares
1267
1268 Type: has_many
1269
1270 Related object: L<Koha::Schema::Result::Virtualshelfshare>
1271
1272 =cut
1273
1274 __PACKAGE__->has_many(
1275   "virtualshelfshares",
1276   "Koha::Schema::Result::Virtualshelfshare",
1277   { "foreign.borrowernumber" => "self.borrowernumber" },
1278   { cascade_copy => 0, cascade_delete => 0 },
1279 );
1280
1281 =head2 virtualshelves
1282
1283 Type: has_many
1284
1285 Related object: L<Koha::Schema::Result::Virtualshelve>
1286
1287 =cut
1288
1289 __PACKAGE__->has_many(
1290   "virtualshelves",
1291   "Koha::Schema::Result::Virtualshelve",
1292   { "foreign.owner" => "self.borrowernumber" },
1293   { cascade_copy => 0, cascade_delete => 0 },
1294 );
1295
1296 =head2 basketnoes
1297
1298 Type: many_to_many
1299
1300 Composing rels: L</aqbasketusers> -> basketno
1301
1302 =cut
1303
1304 __PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno");
1305
1306 =head2 budgets
1307
1308 Type: many_to_many
1309
1310 Composing rels: L</aqbudgetborrowers> -> budget
1311
1312 =cut
1313
1314 __PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget");
1315
1316 =head2 courses
1317
1318 Type: many_to_many
1319
1320 Composing rels: L</course_instructors> -> course
1321
1322 =cut
1323
1324 __PACKAGE__->many_to_many("courses", "course_instructors", "course");
1325
1326 =head2 ordernumbers
1327
1328 Type: many_to_many
1329
1330 Composing rels: L</aqorder_users> -> ordernumber
1331
1332 =cut
1333
1334 __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1335
1336
1337 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-31 10:39:35
1338 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lc6GQ2E7d+tyzTk3v2sWjQ
1339
1340 __PACKAGE__->belongs_to(
1341     "guarantor",
1342     "Koha::Schema::Result::Borrower",
1343     { borrowernumber => "guarantorid" },
1344 );
1345
1346 sub koha_objects_class {
1347     'Koha::Patrons';
1348 }
1349
1350 1;