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