Bug 9021: Schema 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 =cut
411
412 __PACKAGE__->add_columns(
413   "borrowernumber",
414   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
415   "cardnumber",
416   { data_type => "varchar", is_nullable => 1, size => 16 },
417   "surname",
418   { data_type => "mediumtext", is_nullable => 0 },
419   "firstname",
420   { data_type => "text", is_nullable => 1 },
421   "title",
422   { data_type => "mediumtext", is_nullable => 1 },
423   "othernames",
424   { data_type => "mediumtext", is_nullable => 1 },
425   "initials",
426   { data_type => "text", is_nullable => 1 },
427   "streetnumber",
428   { data_type => "varchar", is_nullable => 1, size => 10 },
429   "streettype",
430   { data_type => "varchar", is_nullable => 1, size => 50 },
431   "address",
432   { data_type => "mediumtext", is_nullable => 0 },
433   "address2",
434   { data_type => "text", is_nullable => 1 },
435   "city",
436   { data_type => "mediumtext", is_nullable => 0 },
437   "state",
438   { data_type => "text", is_nullable => 1 },
439   "zipcode",
440   { data_type => "varchar", is_nullable => 1, size => 25 },
441   "country",
442   { data_type => "text", is_nullable => 1 },
443   "email",
444   { data_type => "mediumtext", is_nullable => 1 },
445   "phone",
446   { data_type => "text", is_nullable => 1 },
447   "mobile",
448   { data_type => "varchar", is_nullable => 1, size => 50 },
449   "fax",
450   { data_type => "mediumtext", is_nullable => 1 },
451   "emailpro",
452   { data_type => "text", is_nullable => 1 },
453   "phonepro",
454   { data_type => "text", is_nullable => 1 },
455   "B_streetnumber",
456   {
457     accessor => "b_streetnumber",
458     data_type => "varchar",
459     is_nullable => 1,
460     size => 10,
461   },
462   "B_streettype",
463   {
464     accessor => "b_streettype",
465     data_type => "varchar",
466     is_nullable => 1,
467     size => 50,
468   },
469   "B_address",
470   {
471     accessor => "b_address",
472     data_type => "varchar",
473     is_nullable => 1,
474     size => 100,
475   },
476   "B_address2",
477   { accessor => "b_address2", data_type => "text", is_nullable => 1 },
478   "B_city",
479   { accessor => "b_city", data_type => "mediumtext", is_nullable => 1 },
480   "B_state",
481   { accessor => "b_state", data_type => "text", is_nullable => 1 },
482   "B_zipcode",
483   {
484     accessor => "b_zipcode",
485     data_type => "varchar",
486     is_nullable => 1,
487     size => 25,
488   },
489   "B_country",
490   { accessor => "b_country", data_type => "text", is_nullable => 1 },
491   "B_email",
492   { accessor => "b_email", data_type => "text", is_nullable => 1 },
493   "B_phone",
494   { accessor => "b_phone", data_type => "mediumtext", is_nullable => 1 },
495   "dateofbirth",
496   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
497   "branchcode",
498   {
499     data_type => "varchar",
500     default_value => "",
501     is_foreign_key => 1,
502     is_nullable => 0,
503     size => 10,
504   },
505   "categorycode",
506   {
507     data_type => "varchar",
508     default_value => "",
509     is_foreign_key => 1,
510     is_nullable => 0,
511     size => 10,
512   },
513   "dateenrolled",
514   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
515   "dateexpiry",
516   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
517   "gonenoaddress",
518   { data_type => "tinyint", is_nullable => 1 },
519   "lost",
520   { data_type => "tinyint", is_nullable => 1 },
521   "debarred",
522   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
523   "debarredcomment",
524   { data_type => "varchar", is_nullable => 1, size => 255 },
525   "contactname",
526   { data_type => "mediumtext", is_nullable => 1 },
527   "contactfirstname",
528   { data_type => "text", is_nullable => 1 },
529   "contacttitle",
530   { data_type => "text", is_nullable => 1 },
531   "guarantorid",
532   { data_type => "integer", is_nullable => 1 },
533   "borrowernotes",
534   { data_type => "mediumtext", is_nullable => 1 },
535   "relationship",
536   { data_type => "varchar", is_nullable => 1, size => 100 },
537   "sex",
538   { data_type => "varchar", is_nullable => 1, size => 1 },
539   "password",
540   { data_type => "varchar", is_nullable => 1, size => 60 },
541   "flags",
542   { data_type => "integer", is_nullable => 1 },
543   "userid",
544   { data_type => "varchar", is_nullable => 1, size => 75 },
545   "opacnote",
546   { data_type => "mediumtext", is_nullable => 1 },
547   "contactnote",
548   { data_type => "varchar", is_nullable => 1, size => 255 },
549   "sort1",
550   { data_type => "varchar", is_nullable => 1, size => 80 },
551   "sort2",
552   { data_type => "varchar", is_nullable => 1, size => 80 },
553   "altcontactfirstname",
554   { data_type => "varchar", is_nullable => 1, size => 255 },
555   "altcontactsurname",
556   { data_type => "varchar", is_nullable => 1, size => 255 },
557   "altcontactaddress1",
558   { data_type => "varchar", is_nullable => 1, size => 255 },
559   "altcontactaddress2",
560   { data_type => "varchar", is_nullable => 1, size => 255 },
561   "altcontactaddress3",
562   { data_type => "varchar", is_nullable => 1, size => 255 },
563   "altcontactstate",
564   { data_type => "text", is_nullable => 1 },
565   "altcontactzipcode",
566   { data_type => "varchar", is_nullable => 1, size => 50 },
567   "altcontactcountry",
568   { data_type => "text", is_nullable => 1 },
569   "altcontactphone",
570   { data_type => "varchar", is_nullable => 1, size => 50 },
571   "smsalertnumber",
572   { data_type => "varchar", is_nullable => 1, size => 50 },
573   "sms_provider_id",
574   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
575   "privacy",
576   { data_type => "integer", default_value => 1, is_nullable => 0 },
577   "privacy_guarantor_checkouts",
578   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
579 );
580
581 =head1 PRIMARY KEY
582
583 =over 4
584
585 =item * L</borrowernumber>
586
587 =back
588
589 =cut
590
591 __PACKAGE__->set_primary_key("borrowernumber");
592
593 =head1 UNIQUE CONSTRAINTS
594
595 =head2 C<cardnumber>
596
597 =over 4
598
599 =item * L</cardnumber>
600
601 =back
602
603 =cut
604
605 __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]);
606
607 =head2 C<userid>
608
609 =over 4
610
611 =item * L</userid>
612
613 =back
614
615 =cut
616
617 __PACKAGE__->add_unique_constraint("userid", ["userid"]);
618
619 =head1 RELATIONS
620
621 =head2 accountlines
622
623 Type: has_many
624
625 Related object: L<Koha::Schema::Result::Accountline>
626
627 =cut
628
629 __PACKAGE__->has_many(
630   "accountlines",
631   "Koha::Schema::Result::Accountline",
632   { "foreign.borrowernumber" => "self.borrowernumber" },
633   { cascade_copy => 0, cascade_delete => 0 },
634 );
635
636 =head2 accountoffsets
637
638 Type: has_many
639
640 Related object: L<Koha::Schema::Result::Accountoffset>
641
642 =cut
643
644 __PACKAGE__->has_many(
645   "accountoffsets",
646   "Koha::Schema::Result::Accountoffset",
647   { "foreign.borrowernumber" => "self.borrowernumber" },
648   { cascade_copy => 0, cascade_delete => 0 },
649 );
650
651 =head2 aqbasketusers
652
653 Type: has_many
654
655 Related object: L<Koha::Schema::Result::Aqbasketuser>
656
657 =cut
658
659 __PACKAGE__->has_many(
660   "aqbasketusers",
661   "Koha::Schema::Result::Aqbasketuser",
662   { "foreign.borrowernumber" => "self.borrowernumber" },
663   { cascade_copy => 0, cascade_delete => 0 },
664 );
665
666 =head2 aqbudgetborrowers
667
668 Type: has_many
669
670 Related object: L<Koha::Schema::Result::Aqbudgetborrower>
671
672 =cut
673
674 __PACKAGE__->has_many(
675   "aqbudgetborrowers",
676   "Koha::Schema::Result::Aqbudgetborrower",
677   { "foreign.borrowernumber" => "self.borrowernumber" },
678   { cascade_copy => 0, cascade_delete => 0 },
679 );
680
681 =head2 aqorder_users
682
683 Type: has_many
684
685 Related object: L<Koha::Schema::Result::AqorderUser>
686
687 =cut
688
689 __PACKAGE__->has_many(
690   "aqorder_users",
691   "Koha::Schema::Result::AqorderUser",
692   { "foreign.borrowernumber" => "self.borrowernumber" },
693   { cascade_copy => 0, cascade_delete => 0 },
694 );
695
696 =head2 borrower_attributes
697
698 Type: has_many
699
700 Related object: L<Koha::Schema::Result::BorrowerAttribute>
701
702 =cut
703
704 __PACKAGE__->has_many(
705   "borrower_attributes",
706   "Koha::Schema::Result::BorrowerAttribute",
707   { "foreign.borrowernumber" => "self.borrowernumber" },
708   { cascade_copy => 0, cascade_delete => 0 },
709 );
710
711 =head2 borrower_debarments
712
713 Type: has_many
714
715 Related object: L<Koha::Schema::Result::BorrowerDebarment>
716
717 =cut
718
719 __PACKAGE__->has_many(
720   "borrower_debarments",
721   "Koha::Schema::Result::BorrowerDebarment",
722   { "foreign.borrowernumber" => "self.borrowernumber" },
723   { cascade_copy => 0, cascade_delete => 0 },
724 );
725
726 =head2 borrower_files
727
728 Type: has_many
729
730 Related object: L<Koha::Schema::Result::BorrowerFile>
731
732 =cut
733
734 __PACKAGE__->has_many(
735   "borrower_files",
736   "Koha::Schema::Result::BorrowerFile",
737   { "foreign.borrowernumber" => "self.borrowernumber" },
738   { cascade_copy => 0, cascade_delete => 0 },
739 );
740
741 =head2 borrower_message_preferences
742
743 Type: has_many
744
745 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
746
747 =cut
748
749 __PACKAGE__->has_many(
750   "borrower_message_preferences",
751   "Koha::Schema::Result::BorrowerMessagePreference",
752   { "foreign.borrowernumber" => "self.borrowernumber" },
753   { cascade_copy => 0, cascade_delete => 0 },
754 );
755
756 =head2 borrower_syncs
757
758 Type: has_many
759
760 Related object: L<Koha::Schema::Result::BorrowerSync>
761
762 =cut
763
764 __PACKAGE__->has_many(
765   "borrower_syncs",
766   "Koha::Schema::Result::BorrowerSync",
767   { "foreign.borrowernumber" => "self.borrowernumber" },
768   { cascade_copy => 0, cascade_delete => 0 },
769 );
770
771 =head2 branchcode
772
773 Type: belongs_to
774
775 Related object: L<Koha::Schema::Result::Branch>
776
777 =cut
778
779 __PACKAGE__->belongs_to(
780   "branchcode",
781   "Koha::Schema::Result::Branch",
782   { branchcode => "branchcode" },
783   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
784 );
785
786 =head2 categorycode
787
788 Type: belongs_to
789
790 Related object: L<Koha::Schema::Result::Category>
791
792 =cut
793
794 __PACKAGE__->belongs_to(
795   "categorycode",
796   "Koha::Schema::Result::Category",
797   { categorycode => "categorycode" },
798   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
799 );
800
801 =head2 course_instructors
802
803 Type: has_many
804
805 Related object: L<Koha::Schema::Result::CourseInstructor>
806
807 =cut
808
809 __PACKAGE__->has_many(
810   "course_instructors",
811   "Koha::Schema::Result::CourseInstructor",
812   { "foreign.borrowernumber" => "self.borrowernumber" },
813   { cascade_copy => 0, cascade_delete => 0 },
814 );
815
816 =head2 creator_batches
817
818 Type: has_many
819
820 Related object: L<Koha::Schema::Result::CreatorBatch>
821
822 =cut
823
824 __PACKAGE__->has_many(
825   "creator_batches",
826   "Koha::Schema::Result::CreatorBatch",
827   { "foreign.borrower_number" => "self.borrowernumber" },
828   { cascade_copy => 0, cascade_delete => 0 },
829 );
830
831 =head2 discharges
832
833 Type: has_many
834
835 Related object: L<Koha::Schema::Result::Discharge>
836
837 =cut
838
839 __PACKAGE__->has_many(
840   "discharges",
841   "Koha::Schema::Result::Discharge",
842   { "foreign.borrower" => "self.borrowernumber" },
843   { cascade_copy => 0, cascade_delete => 0 },
844 );
845
846 =head2 hold_fill_targets
847
848 Type: has_many
849
850 Related object: L<Koha::Schema::Result::HoldFillTarget>
851
852 =cut
853
854 __PACKAGE__->has_many(
855   "hold_fill_targets",
856   "Koha::Schema::Result::HoldFillTarget",
857   { "foreign.borrowernumber" => "self.borrowernumber" },
858   { cascade_copy => 0, cascade_delete => 0 },
859 );
860
861 =head2 issues
862
863 Type: has_many
864
865 Related object: L<Koha::Schema::Result::Issue>
866
867 =cut
868
869 __PACKAGE__->has_many(
870   "issues",
871   "Koha::Schema::Result::Issue",
872   { "foreign.borrowernumber" => "self.borrowernumber" },
873   { cascade_copy => 0, cascade_delete => 0 },
874 );
875
876 =head2 items_last_borrowers
877
878 Type: has_many
879
880 Related object: L<Koha::Schema::Result::ItemsLastBorrower>
881
882 =cut
883
884 __PACKAGE__->has_many(
885   "items_last_borrowers",
886   "Koha::Schema::Result::ItemsLastBorrower",
887   { "foreign.borrowernumber" => "self.borrowernumber" },
888   { cascade_copy => 0, cascade_delete => 0 },
889 );
890
891 =head2 message_queues
892
893 Type: has_many
894
895 Related object: L<Koha::Schema::Result::MessageQueue>
896
897 =cut
898
899 __PACKAGE__->has_many(
900   "message_queues",
901   "Koha::Schema::Result::MessageQueue",
902   { "foreign.borrowernumber" => "self.borrowernumber" },
903   { cascade_copy => 0, cascade_delete => 0 },
904 );
905
906 =head2 old_issues
907
908 Type: has_many
909
910 Related object: L<Koha::Schema::Result::OldIssue>
911
912 =cut
913
914 __PACKAGE__->has_many(
915   "old_issues",
916   "Koha::Schema::Result::OldIssue",
917   { "foreign.borrowernumber" => "self.borrowernumber" },
918   { cascade_copy => 0, cascade_delete => 0 },
919 );
920
921 =head2 old_reserves
922
923 Type: has_many
924
925 Related object: L<Koha::Schema::Result::OldReserve>
926
927 =cut
928
929 __PACKAGE__->has_many(
930   "old_reserves",
931   "Koha::Schema::Result::OldReserve",
932   { "foreign.borrowernumber" => "self.borrowernumber" },
933   { cascade_copy => 0, cascade_delete => 0 },
934 );
935
936 =head2 opac_news
937
938 Type: has_many
939
940 Related object: L<Koha::Schema::Result::OpacNews>
941
942 =cut
943
944 __PACKAGE__->has_many(
945   "opac_news",
946   "Koha::Schema::Result::OpacNews",
947   { "foreign.borrowernumber" => "self.borrowernumber" },
948   { cascade_copy => 0, cascade_delete => 0 },
949 );
950
951 =head2 patron_list_patrons
952
953 Type: has_many
954
955 Related object: L<Koha::Schema::Result::PatronListPatron>
956
957 =cut
958
959 __PACKAGE__->has_many(
960   "patron_list_patrons",
961   "Koha::Schema::Result::PatronListPatron",
962   { "foreign.borrowernumber" => "self.borrowernumber" },
963   { cascade_copy => 0, cascade_delete => 0 },
964 );
965
966 =head2 patron_lists
967
968 Type: has_many
969
970 Related object: L<Koha::Schema::Result::PatronList>
971
972 =cut
973
974 __PACKAGE__->has_many(
975   "patron_lists",
976   "Koha::Schema::Result::PatronList",
977   { "foreign.owner" => "self.borrowernumber" },
978   { cascade_copy => 0, cascade_delete => 0 },
979 );
980
981 =head2 patronimage
982
983 Type: might_have
984
985 Related object: L<Koha::Schema::Result::Patronimage>
986
987 =cut
988
989 __PACKAGE__->might_have(
990   "patronimage",
991   "Koha::Schema::Result::Patronimage",
992   { "foreign.borrowernumber" => "self.borrowernumber" },
993   { cascade_copy => 0, cascade_delete => 0 },
994 );
995
996 =head2 ratings
997
998 Type: has_many
999
1000 Related object: L<Koha::Schema::Result::Rating>
1001
1002 =cut
1003
1004 __PACKAGE__->has_many(
1005   "ratings",
1006   "Koha::Schema::Result::Rating",
1007   { "foreign.borrowernumber" => "self.borrowernumber" },
1008   { cascade_copy => 0, cascade_delete => 0 },
1009 );
1010
1011 =head2 reserves
1012
1013 Type: has_many
1014
1015 Related object: L<Koha::Schema::Result::Reserve>
1016
1017 =cut
1018
1019 __PACKAGE__->has_many(
1020   "reserves",
1021   "Koha::Schema::Result::Reserve",
1022   { "foreign.borrowernumber" => "self.borrowernumber" },
1023   { cascade_copy => 0, cascade_delete => 0 },
1024 );
1025
1026 =head2 reviews
1027
1028 Type: has_many
1029
1030 Related object: L<Koha::Schema::Result::Review>
1031
1032 =cut
1033
1034 __PACKAGE__->has_many(
1035   "reviews",
1036   "Koha::Schema::Result::Review",
1037   { "foreign.borrowernumber" => "self.borrowernumber" },
1038   { cascade_copy => 0, cascade_delete => 0 },
1039 );
1040
1041 =head2 sms_provider
1042
1043 Type: belongs_to
1044
1045 Related object: L<Koha::Schema::Result::SmsProvider>
1046
1047 =cut
1048
1049 __PACKAGE__->belongs_to(
1050   "sms_provider",
1051   "Koha::Schema::Result::SmsProvider",
1052   { id => "sms_provider_id" },
1053   {
1054     is_deferrable => 1,
1055     join_type     => "LEFT",
1056     on_delete     => "RESTRICT",
1057     on_update     => "RESTRICT",
1058   },
1059 );
1060
1061 =head2 subscriptionroutinglists
1062
1063 Type: has_many
1064
1065 Related object: L<Koha::Schema::Result::Subscriptionroutinglist>
1066
1067 =cut
1068
1069 __PACKAGE__->has_many(
1070   "subscriptionroutinglists",
1071   "Koha::Schema::Result::Subscriptionroutinglist",
1072   { "foreign.borrowernumber" => "self.borrowernumber" },
1073   { cascade_copy => 0, cascade_delete => 0 },
1074 );
1075
1076 =head2 tags_all
1077
1078 Type: has_many
1079
1080 Related object: L<Koha::Schema::Result::TagAll>
1081
1082 =cut
1083
1084 __PACKAGE__->has_many(
1085   "tags_all",
1086   "Koha::Schema::Result::TagAll",
1087   { "foreign.borrowernumber" => "self.borrowernumber" },
1088   { cascade_copy => 0, cascade_delete => 0 },
1089 );
1090
1091 =head2 tags_approvals
1092
1093 Type: has_many
1094
1095 Related object: L<Koha::Schema::Result::TagsApproval>
1096
1097 =cut
1098
1099 __PACKAGE__->has_many(
1100   "tags_approvals",
1101   "Koha::Schema::Result::TagsApproval",
1102   { "foreign.approved_by" => "self.borrowernumber" },
1103   { cascade_copy => 0, cascade_delete => 0 },
1104 );
1105
1106 =head2 user_permissions
1107
1108 Type: has_many
1109
1110 Related object: L<Koha::Schema::Result::UserPermission>
1111
1112 =cut
1113
1114 __PACKAGE__->has_many(
1115   "user_permissions",
1116   "Koha::Schema::Result::UserPermission",
1117   { "foreign.borrowernumber" => "self.borrowernumber" },
1118   { cascade_copy => 0, cascade_delete => 0 },
1119 );
1120
1121 =head2 virtualshelfcontents
1122
1123 Type: has_many
1124
1125 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
1126
1127 =cut
1128
1129 __PACKAGE__->has_many(
1130   "virtualshelfcontents",
1131   "Koha::Schema::Result::Virtualshelfcontent",
1132   { "foreign.borrowernumber" => "self.borrowernumber" },
1133   { cascade_copy => 0, cascade_delete => 0 },
1134 );
1135
1136 =head2 virtualshelfshares
1137
1138 Type: has_many
1139
1140 Related object: L<Koha::Schema::Result::Virtualshelfshare>
1141
1142 =cut
1143
1144 __PACKAGE__->has_many(
1145   "virtualshelfshares",
1146   "Koha::Schema::Result::Virtualshelfshare",
1147   { "foreign.borrowernumber" => "self.borrowernumber" },
1148   { cascade_copy => 0, cascade_delete => 0 },
1149 );
1150
1151 =head2 virtualshelves
1152
1153 Type: has_many
1154
1155 Related object: L<Koha::Schema::Result::Virtualshelve>
1156
1157 =cut
1158
1159 __PACKAGE__->has_many(
1160   "virtualshelves",
1161   "Koha::Schema::Result::Virtualshelve",
1162   { "foreign.owner" => "self.borrowernumber" },
1163   { cascade_copy => 0, cascade_delete => 0 },
1164 );
1165
1166 =head2 basketnoes
1167
1168 Type: many_to_many
1169
1170 Composing rels: L</aqbasketusers> -> basketno
1171
1172 =cut
1173
1174 __PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno");
1175
1176 =head2 budgets
1177
1178 Type: many_to_many
1179
1180 Composing rels: L</aqbudgetborrowers> -> budget
1181
1182 =cut
1183
1184 __PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget");
1185
1186 =head2 courses
1187
1188 Type: many_to_many
1189
1190 Composing rels: L</course_instructors> -> course
1191
1192 =cut
1193
1194 __PACKAGE__->many_to_many("courses", "course_instructors", "course");
1195
1196 =head2 ordernumbers
1197
1198 Type: many_to_many
1199
1200 Composing rels: L</aqorder_users> -> ordernumber
1201
1202 =cut
1203
1204 __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1205
1206
1207 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-12-31 16:48:38
1208 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dd1tdtsFTruFwsmCZU6ogQ
1209
1210 __PACKAGE__->belongs_to(
1211     "guarantor",
1212     "Koha::Schema::Result::Borrower",
1213     { borrowernumber => "guarantorid" },
1214 );
1215
1216 1;