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