Bug 30060: Update DBIC 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 primary key, Koha assigned ID number for patrons/borrowers
33
34 =head2 cardnumber
35
36   data_type: 'varchar'
37   is_nullable: 1
38   size: 32
39
40 unique key, library assigned ID number for patrons/borrowers
41
42 =head2 surname
43
44   data_type: 'longtext'
45   is_nullable: 1
46
47 patron/borrower's last name (surname)
48
49 =head2 firstname
50
51   data_type: 'mediumtext'
52   is_nullable: 1
53
54 patron/borrower's first name
55
56 =head2 title
57
58   data_type: 'longtext'
59   is_nullable: 1
60
61 patron/borrower's title, for example: Mr. or Mrs.
62
63 =head2 othernames
64
65   data_type: 'longtext'
66   is_nullable: 1
67
68 any other names associated with the patron/borrower
69
70 =head2 initials
71
72   data_type: 'mediumtext'
73   is_nullable: 1
74
75 initials for your patron/borrower
76
77 =head2 streetnumber
78
79   data_type: 'tinytext'
80   is_nullable: 1
81
82 the house number for your patron/borrower's primary address
83
84 =head2 streettype
85
86   data_type: 'tinytext'
87   is_nullable: 1
88
89 the street type (Rd., Blvd, etc) for your patron/borrower's primary address
90
91 =head2 address
92
93   data_type: 'longtext'
94   is_nullable: 1
95
96 the first address line for your patron/borrower's primary address
97
98 =head2 address2
99
100   data_type: 'mediumtext'
101   is_nullable: 1
102
103 the second address line for your patron/borrower's primary address
104
105 =head2 city
106
107   data_type: 'longtext'
108   is_nullable: 1
109
110 the city or town for your patron/borrower's primary address
111
112 =head2 state
113
114   data_type: 'mediumtext'
115   is_nullable: 1
116
117 the state or province for your patron/borrower's primary address
118
119 =head2 zipcode
120
121   data_type: 'tinytext'
122   is_nullable: 1
123
124 the zip or postal code for your patron/borrower's primary address
125
126 =head2 country
127
128   data_type: 'mediumtext'
129   is_nullable: 1
130
131 the country for your patron/borrower's primary address
132
133 =head2 email
134
135   data_type: 'longtext'
136   is_nullable: 1
137
138 the primary email address for your patron/borrower's primary address
139
140 =head2 phone
141
142   data_type: 'mediumtext'
143   is_nullable: 1
144
145 the primary phone number for your patron/borrower's primary address
146
147 =head2 mobile
148
149   data_type: 'tinytext'
150   is_nullable: 1
151
152 the other phone number for your patron/borrower's primary address
153
154 =head2 fax
155
156   data_type: 'longtext'
157   is_nullable: 1
158
159 the fax number for your patron/borrower's primary address
160
161 =head2 emailpro
162
163   data_type: 'mediumtext'
164   is_nullable: 1
165
166 the secondary email addres for your patron/borrower's primary address
167
168 =head2 phonepro
169
170   data_type: 'mediumtext'
171   is_nullable: 1
172
173 the secondary phone number for your patron/borrower's primary address
174
175 =head2 B_streetnumber
176
177   accessor: 'b_streetnumber'
178   data_type: 'tinytext'
179   is_nullable: 1
180
181 the house number for your patron/borrower's alternate address
182
183 =head2 B_streettype
184
185   accessor: 'b_streettype'
186   data_type: 'tinytext'
187   is_nullable: 1
188
189 the street type (Rd., Blvd, etc) for your patron/borrower's alternate address
190
191 =head2 B_address
192
193   accessor: 'b_address'
194   data_type: 'mediumtext'
195   is_nullable: 1
196
197 the first address line for your patron/borrower's alternate address
198
199 =head2 B_address2
200
201   accessor: 'b_address2'
202   data_type: 'mediumtext'
203   is_nullable: 1
204
205 the second address line for your patron/borrower's alternate address
206
207 =head2 B_city
208
209   accessor: 'b_city'
210   data_type: 'longtext'
211   is_nullable: 1
212
213 the city or town for your patron/borrower's alternate address
214
215 =head2 B_state
216
217   accessor: 'b_state'
218   data_type: 'mediumtext'
219   is_nullable: 1
220
221 the state for your patron/borrower's alternate address
222
223 =head2 B_zipcode
224
225   accessor: 'b_zipcode'
226   data_type: 'tinytext'
227   is_nullable: 1
228
229 the zip or postal code for your patron/borrower's alternate address
230
231 =head2 B_country
232
233   accessor: 'b_country'
234   data_type: 'mediumtext'
235   is_nullable: 1
236
237 the country for your patron/borrower's alternate address
238
239 =head2 B_email
240
241   accessor: 'b_email'
242   data_type: 'mediumtext'
243   is_nullable: 1
244
245 the patron/borrower's alternate email address
246
247 =head2 B_phone
248
249   accessor: 'b_phone'
250   data_type: 'longtext'
251   is_nullable: 1
252
253 the patron/borrower's alternate phone number
254
255 =head2 dateofbirth
256
257   data_type: 'date'
258   datetime_undef_if_invalid: 1
259   is_nullable: 1
260
261 the patron/borrower's date of birth (YYYY-MM-DD)
262
263 =head2 branchcode
264
265   data_type: 'varchar'
266   default_value: (empty string)
267   is_foreign_key: 1
268   is_nullable: 0
269   size: 10
270
271 foreign key from the branches table, includes the code of the patron/borrower's home branch
272
273 =head2 categorycode
274
275   data_type: 'varchar'
276   default_value: (empty string)
277   is_foreign_key: 1
278   is_nullable: 0
279   size: 10
280
281 foreign key from the categories table, includes the code of the patron category
282
283 =head2 dateenrolled
284
285   data_type: 'date'
286   datetime_undef_if_invalid: 1
287   is_nullable: 1
288
289 date the patron was added to Koha (YYYY-MM-DD)
290
291 =head2 dateexpiry
292
293   data_type: 'date'
294   datetime_undef_if_invalid: 1
295   is_nullable: 1
296
297 date the patron/borrower's card is set to expire (YYYY-MM-DD)
298
299 =head2 date_renewed
300
301   data_type: 'date'
302   datetime_undef_if_invalid: 1
303   is_nullable: 1
304
305 date the patron/borrower's card was last renewed
306
307 =head2 gonenoaddress
308
309   data_type: 'tinyint'
310   is_nullable: 1
311
312 set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having an unconfirmed address
313
314 =head2 lost
315
316   data_type: 'tinyint'
317   is_nullable: 1
318
319 set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having lost their card
320
321 =head2 debarred
322
323   data_type: 'date'
324   datetime_undef_if_invalid: 1
325   is_nullable: 1
326
327 until this date the patron can only check-in (no loans, no holds, etc.), is a fine based on days instead of money (YYYY-MM-DD)
328
329 =head2 debarredcomment
330
331   data_type: 'varchar'
332   is_nullable: 1
333   size: 255
334
335 comment on the stop of the patron
336
337 =head2 contactname
338
339   data_type: 'longtext'
340   is_nullable: 1
341
342 used for children and profesionals to include surname or last name of guarantor or organization name
343
344 =head2 contactfirstname
345
346   data_type: 'mediumtext'
347   is_nullable: 1
348
349 used for children to include first name of guarantor
350
351 =head2 contacttitle
352
353   data_type: 'mediumtext'
354   is_nullable: 1
355
356 used for children to include title (Mr., Mrs., etc) of guarantor
357
358 =head2 borrowernotes
359
360   data_type: 'longtext'
361   is_nullable: 1
362
363 a note on the patron/borrower's account that is only visible in the staff interface
364
365 =head2 relationship
366
367   data_type: 'varchar'
368   is_nullable: 1
369   size: 100
370
371 used for children to include the relationship to their guarantor
372
373 =head2 sex
374
375   data_type: 'varchar'
376   is_nullable: 1
377   size: 1
378
379 patron/borrower's gender
380
381 =head2 password
382
383   data_type: 'varchar'
384   is_nullable: 1
385   size: 60
386
387 patron/borrower's Bcrypt encrypted password
388
389 =head2 flags
390
391   data_type: 'integer'
392   is_nullable: 1
393
394 will include a number associated with the staff member's permissions
395
396 =head2 userid
397
398   data_type: 'varchar'
399   is_nullable: 1
400   size: 75
401
402 patron/borrower's opac and/or staff interface log in
403
404 =head2 opacnote
405
406   data_type: 'longtext'
407   is_nullable: 1
408
409 a note on the patron/borrower's account that is visible in the OPAC and staff interface
410
411 =head2 contactnote
412
413   data_type: 'varchar'
414   is_nullable: 1
415   size: 255
416
417 a note related to the patron/borrower's alternate address
418
419 =head2 sort1
420
421   data_type: 'varchar'
422   is_nullable: 1
423   size: 80
424
425 a field that can be used for any information unique to the library
426
427 =head2 sort2
428
429   data_type: 'varchar'
430   is_nullable: 1
431   size: 80
432
433 a field that can be used for any information unique to the library
434
435 =head2 altcontactfirstname
436
437   data_type: 'mediumtext'
438   is_nullable: 1
439
440 first name of alternate contact for the patron/borrower
441
442 =head2 altcontactsurname
443
444   data_type: 'mediumtext'
445   is_nullable: 1
446
447 surname or last name of the alternate contact for the patron/borrower
448
449 =head2 altcontactaddress1
450
451   data_type: 'mediumtext'
452   is_nullable: 1
453
454 the first address line for the alternate contact for the patron/borrower
455
456 =head2 altcontactaddress2
457
458   data_type: 'mediumtext'
459   is_nullable: 1
460
461 the second address line for the alternate contact for the patron/borrower
462
463 =head2 altcontactaddress3
464
465   data_type: 'mediumtext'
466   is_nullable: 1
467
468 the city for the alternate contact for the patron/borrower
469
470 =head2 altcontactstate
471
472   data_type: 'mediumtext'
473   is_nullable: 1
474
475 the state for the alternate contact for the patron/borrower
476
477 =head2 altcontactzipcode
478
479   data_type: 'mediumtext'
480   is_nullable: 1
481
482 the zipcode for the alternate contact for the patron/borrower
483
484 =head2 altcontactcountry
485
486   data_type: 'mediumtext'
487   is_nullable: 1
488
489 the country for the alternate contact for the patron/borrower
490
491 =head2 altcontactphone
492
493   data_type: 'mediumtext'
494   is_nullable: 1
495
496 the phone number for the alternate contact for the patron/borrower
497
498 =head2 smsalertnumber
499
500   data_type: 'varchar'
501   is_nullable: 1
502   size: 50
503
504 the mobile phone number where the patron/borrower would like to receive notices (if SMS turned on)
505
506 =head2 sms_provider_id
507
508   data_type: 'integer'
509   is_foreign_key: 1
510   is_nullable: 1
511
512 the provider of the mobile phone number defined in smsalertnumber
513
514 =head2 privacy
515
516   data_type: 'integer'
517   default_value: 1
518   is_nullable: 0
519
520 patron/borrower's privacy settings related to their checkout history
521
522 =head2 privacy_guarantor_fines
523
524   data_type: 'tinyint'
525   default_value: 0
526   is_nullable: 0
527
528 controls if relatives can see this patron's fines
529
530 =head2 privacy_guarantor_checkouts
531
532   data_type: 'tinyint'
533   default_value: 0
534   is_nullable: 0
535
536 controls if relatives can see this patron's checkouts
537
538 =head2 checkprevcheckout
539
540   data_type: 'varchar'
541   default_value: 'inherit'
542   is_nullable: 0
543   size: 7
544
545 produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'.
546
547 =head2 updated_on
548
549   data_type: 'timestamp'
550   datetime_undef_if_invalid: 1
551   default_value: current_timestamp
552   is_nullable: 0
553
554 time of last change could be useful for synchronization with external systems (among others)
555
556 =head2 lastseen
557
558   data_type: 'datetime'
559   datetime_undef_if_invalid: 1
560   is_nullable: 1
561
562 last time a patron has been seen (connected at the OPAC or staff interface)
563
564 =head2 lang
565
566   data_type: 'varchar'
567   default_value: 'default'
568   is_nullable: 0
569   size: 25
570
571 lang to use to send notices to this patron
572
573 =head2 login_attempts
574
575   data_type: 'integer'
576   default_value: 0
577   is_nullable: 0
578
579 number of failed login attemps
580
581 =head2 overdrive_auth_token
582
583   data_type: 'mediumtext'
584   is_nullable: 1
585
586 persist OverDrive auth token
587
588 =head2 anonymized
589
590   data_type: 'tinyint'
591   default_value: 0
592   is_nullable: 0
593
594 flag for data anonymization
595
596 =head2 autorenew_checkouts
597
598   data_type: 'tinyint'
599   default_value: 1
600   is_nullable: 0
601
602 flag for allowing auto-renewal
603
604 =head2 primary_contact_method
605
606   data_type: 'varchar'
607   is_nullable: 1
608   size: 45
609
610 useful for reporting purposes
611
612 =cut
613
614 __PACKAGE__->add_columns(
615   "borrowernumber",
616   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
617   "cardnumber",
618   { data_type => "varchar", is_nullable => 1, size => 32 },
619   "surname",
620   { data_type => "longtext", is_nullable => 1 },
621   "firstname",
622   { data_type => "mediumtext", is_nullable => 1 },
623   "title",
624   { data_type => "longtext", is_nullable => 1 },
625   "othernames",
626   { data_type => "longtext", is_nullable => 1 },
627   "initials",
628   { data_type => "mediumtext", is_nullable => 1 },
629   "streetnumber",
630   { data_type => "tinytext", is_nullable => 1 },
631   "streettype",
632   { data_type => "tinytext", is_nullable => 1 },
633   "address",
634   { data_type => "longtext", is_nullable => 1 },
635   "address2",
636   { data_type => "mediumtext", is_nullable => 1 },
637   "city",
638   { data_type => "longtext", is_nullable => 1 },
639   "state",
640   { data_type => "mediumtext", is_nullable => 1 },
641   "zipcode",
642   { data_type => "tinytext", is_nullable => 1 },
643   "country",
644   { data_type => "mediumtext", is_nullable => 1 },
645   "email",
646   { data_type => "longtext", is_nullable => 1 },
647   "phone",
648   { data_type => "mediumtext", is_nullable => 1 },
649   "mobile",
650   { data_type => "tinytext", is_nullable => 1 },
651   "fax",
652   { data_type => "longtext", is_nullable => 1 },
653   "emailpro",
654   { data_type => "mediumtext", is_nullable => 1 },
655   "phonepro",
656   { data_type => "mediumtext", is_nullable => 1 },
657   "B_streetnumber",
658   { accessor => "b_streetnumber", data_type => "tinytext", is_nullable => 1 },
659   "B_streettype",
660   { accessor => "b_streettype", data_type => "tinytext", is_nullable => 1 },
661   "B_address",
662   { accessor => "b_address", data_type => "mediumtext", is_nullable => 1 },
663   "B_address2",
664   { accessor => "b_address2", data_type => "mediumtext", is_nullable => 1 },
665   "B_city",
666   { accessor => "b_city", data_type => "longtext", is_nullable => 1 },
667   "B_state",
668   { accessor => "b_state", data_type => "mediumtext", is_nullable => 1 },
669   "B_zipcode",
670   { accessor => "b_zipcode", data_type => "tinytext", is_nullable => 1 },
671   "B_country",
672   { accessor => "b_country", data_type => "mediumtext", is_nullable => 1 },
673   "B_email",
674   { accessor => "b_email", data_type => "mediumtext", is_nullable => 1 },
675   "B_phone",
676   { accessor => "b_phone", data_type => "longtext", is_nullable => 1 },
677   "dateofbirth",
678   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
679   "branchcode",
680   {
681     data_type => "varchar",
682     default_value => "",
683     is_foreign_key => 1,
684     is_nullable => 0,
685     size => 10,
686   },
687   "categorycode",
688   {
689     data_type => "varchar",
690     default_value => "",
691     is_foreign_key => 1,
692     is_nullable => 0,
693     size => 10,
694   },
695   "dateenrolled",
696   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
697   "dateexpiry",
698   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
699   "date_renewed",
700   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
701   "gonenoaddress",
702   { data_type => "tinyint", is_nullable => 1 },
703   "lost",
704   { data_type => "tinyint", is_nullable => 1 },
705   "debarred",
706   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
707   "debarredcomment",
708   { data_type => "varchar", is_nullable => 1, size => 255 },
709   "contactname",
710   { data_type => "longtext", is_nullable => 1 },
711   "contactfirstname",
712   { data_type => "mediumtext", is_nullable => 1 },
713   "contacttitle",
714   { data_type => "mediumtext", is_nullable => 1 },
715   "borrowernotes",
716   { data_type => "longtext", is_nullable => 1 },
717   "relationship",
718   { data_type => "varchar", is_nullable => 1, size => 100 },
719   "sex",
720   { data_type => "varchar", is_nullable => 1, size => 1 },
721   "password",
722   { data_type => "varchar", is_nullable => 1, size => 60 },
723   "flags",
724   { data_type => "integer", is_nullable => 1 },
725   "userid",
726   { data_type => "varchar", is_nullable => 1, size => 75 },
727   "opacnote",
728   { data_type => "longtext", is_nullable => 1 },
729   "contactnote",
730   { data_type => "varchar", is_nullable => 1, size => 255 },
731   "sort1",
732   { data_type => "varchar", is_nullable => 1, size => 80 },
733   "sort2",
734   { data_type => "varchar", is_nullable => 1, size => 80 },
735   "altcontactfirstname",
736   { data_type => "mediumtext", is_nullable => 1 },
737   "altcontactsurname",
738   { data_type => "mediumtext", is_nullable => 1 },
739   "altcontactaddress1",
740   { data_type => "mediumtext", is_nullable => 1 },
741   "altcontactaddress2",
742   { data_type => "mediumtext", is_nullable => 1 },
743   "altcontactaddress3",
744   { data_type => "mediumtext", is_nullable => 1 },
745   "altcontactstate",
746   { data_type => "mediumtext", is_nullable => 1 },
747   "altcontactzipcode",
748   { data_type => "mediumtext", is_nullable => 1 },
749   "altcontactcountry",
750   { data_type => "mediumtext", is_nullable => 1 },
751   "altcontactphone",
752   { data_type => "mediumtext", is_nullable => 1 },
753   "smsalertnumber",
754   { data_type => "varchar", is_nullable => 1, size => 50 },
755   "sms_provider_id",
756   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
757   "privacy",
758   { data_type => "integer", default_value => 1, is_nullable => 0 },
759   "privacy_guarantor_fines",
760   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
761   "privacy_guarantor_checkouts",
762   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
763   "checkprevcheckout",
764   {
765     data_type => "varchar",
766     default_value => "inherit",
767     is_nullable => 0,
768     size => 7,
769   },
770   "updated_on",
771   {
772     data_type => "timestamp",
773     datetime_undef_if_invalid => 1,
774     default_value => \"current_timestamp",
775     is_nullable => 0,
776   },
777   "lastseen",
778   {
779     data_type => "datetime",
780     datetime_undef_if_invalid => 1,
781     is_nullable => 1,
782   },
783   "lang",
784   {
785     data_type => "varchar",
786     default_value => "default",
787     is_nullable => 0,
788     size => 25,
789   },
790   "login_attempts",
791   { data_type => "integer", default_value => 0, is_nullable => 0 },
792   "overdrive_auth_token",
793   { data_type => "mediumtext", is_nullable => 1 },
794   "anonymized",
795   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
796   "autorenew_checkouts",
797   { data_type => "tinyint", default_value => 1, is_nullable => 0 },
798   "primary_contact_method",
799   { data_type => "varchar", is_nullable => 1, size => 45 },
800 );
801
802 =head1 PRIMARY KEY
803
804 =over 4
805
806 =item * L</borrowernumber>
807
808 =back
809
810 =cut
811
812 __PACKAGE__->set_primary_key("borrowernumber");
813
814 =head1 UNIQUE CONSTRAINTS
815
816 =head2 C<cardnumber>
817
818 =over 4
819
820 =item * L</cardnumber>
821
822 =back
823
824 =cut
825
826 __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]);
827
828 =head2 C<userid>
829
830 =over 4
831
832 =item * L</userid>
833
834 =back
835
836 =cut
837
838 __PACKAGE__->add_unique_constraint("userid", ["userid"]);
839
840 =head1 RELATIONS
841
842 =head2 accountlines
843
844 Type: has_many
845
846 Related object: L<Koha::Schema::Result::Accountline>
847
848 =cut
849
850 __PACKAGE__->has_many(
851   "accountlines",
852   "Koha::Schema::Result::Accountline",
853   { "foreign.borrowernumber" => "self.borrowernumber" },
854   { cascade_copy => 0, cascade_delete => 0 },
855 );
856
857 =head2 accountlines_managers
858
859 Type: has_many
860
861 Related object: L<Koha::Schema::Result::Accountline>
862
863 =cut
864
865 __PACKAGE__->has_many(
866   "accountlines_managers",
867   "Koha::Schema::Result::Accountline",
868   { "foreign.manager_id" => "self.borrowernumber" },
869   { cascade_copy => 0, cascade_delete => 0 },
870 );
871
872 =head2 additional_contents
873
874 Type: has_many
875
876 Related object: L<Koha::Schema::Result::AdditionalContent>
877
878 =cut
879
880 __PACKAGE__->has_many(
881   "additional_contents",
882   "Koha::Schema::Result::AdditionalContent",
883   { "foreign.borrowernumber" => "self.borrowernumber" },
884   { cascade_copy => 0, cascade_delete => 0 },
885 );
886
887 =head2 advanced_editor_macros
888
889 Type: has_many
890
891 Related object: L<Koha::Schema::Result::AdvancedEditorMacro>
892
893 =cut
894
895 __PACKAGE__->has_many(
896   "advanced_editor_macros",
897   "Koha::Schema::Result::AdvancedEditorMacro",
898   { "foreign.borrowernumber" => "self.borrowernumber" },
899   { cascade_copy => 0, cascade_delete => 0 },
900 );
901
902 =head2 alerts
903
904 Type: has_many
905
906 Related object: L<Koha::Schema::Result::Alert>
907
908 =cut
909
910 __PACKAGE__->has_many(
911   "alerts",
912   "Koha::Schema::Result::Alert",
913   { "foreign.borrowernumber" => "self.borrowernumber" },
914   { cascade_copy => 0, cascade_delete => 0 },
915 );
916
917 =head2 api_keys
918
919 Type: has_many
920
921 Related object: L<Koha::Schema::Result::ApiKey>
922
923 =cut
924
925 __PACKAGE__->has_many(
926   "api_keys",
927   "Koha::Schema::Result::ApiKey",
928   { "foreign.patron_id" => "self.borrowernumber" },
929   { cascade_copy => 0, cascade_delete => 0 },
930 );
931
932 =head2 aqbasketusers
933
934 Type: has_many
935
936 Related object: L<Koha::Schema::Result::Aqbasketuser>
937
938 =cut
939
940 __PACKAGE__->has_many(
941   "aqbasketusers",
942   "Koha::Schema::Result::Aqbasketuser",
943   { "foreign.borrowernumber" => "self.borrowernumber" },
944   { cascade_copy => 0, cascade_delete => 0 },
945 );
946
947 =head2 aqbudgetborrowers
948
949 Type: has_many
950
951 Related object: L<Koha::Schema::Result::Aqbudgetborrower>
952
953 =cut
954
955 __PACKAGE__->has_many(
956   "aqbudgetborrowers",
957   "Koha::Schema::Result::Aqbudgetborrower",
958   { "foreign.borrowernumber" => "self.borrowernumber" },
959   { cascade_copy => 0, cascade_delete => 0 },
960 );
961
962 =head2 aqorder_users
963
964 Type: has_many
965
966 Related object: L<Koha::Schema::Result::AqorderUser>
967
968 =cut
969
970 __PACKAGE__->has_many(
971   "aqorder_users",
972   "Koha::Schema::Result::AqorderUser",
973   { "foreign.borrowernumber" => "self.borrowernumber" },
974   { cascade_copy => 0, cascade_delete => 0 },
975 );
976
977 =head2 aqorders
978
979 Type: has_many
980
981 Related object: L<Koha::Schema::Result::Aqorder>
982
983 =cut
984
985 __PACKAGE__->has_many(
986   "aqorders",
987   "Koha::Schema::Result::Aqorder",
988   { "foreign.created_by" => "self.borrowernumber" },
989   { cascade_copy => 0, cascade_delete => 0 },
990 );
991
992 =head2 article_requests
993
994 Type: has_many
995
996 Related object: L<Koha::Schema::Result::ArticleRequest>
997
998 =cut
999
1000 __PACKAGE__->has_many(
1001   "article_requests",
1002   "Koha::Schema::Result::ArticleRequest",
1003   { "foreign.borrowernumber" => "self.borrowernumber" },
1004   { cascade_copy => 0, cascade_delete => 0 },
1005 );
1006
1007 =head2 borrower_attributes
1008
1009 Type: has_many
1010
1011 Related object: L<Koha::Schema::Result::BorrowerAttribute>
1012
1013 =cut
1014
1015 __PACKAGE__->has_many(
1016   "borrower_attributes",
1017   "Koha::Schema::Result::BorrowerAttribute",
1018   { "foreign.borrowernumber" => "self.borrowernumber" },
1019   { cascade_copy => 0, cascade_delete => 0 },
1020 );
1021
1022 =head2 borrower_debarments
1023
1024 Type: has_many
1025
1026 Related object: L<Koha::Schema::Result::BorrowerDebarment>
1027
1028 =cut
1029
1030 __PACKAGE__->has_many(
1031   "borrower_debarments",
1032   "Koha::Schema::Result::BorrowerDebarment",
1033   { "foreign.borrowernumber" => "self.borrowernumber" },
1034   { cascade_copy => 0, cascade_delete => 0 },
1035 );
1036
1037 =head2 borrower_files
1038
1039 Type: has_many
1040
1041 Related object: L<Koha::Schema::Result::BorrowerFile>
1042
1043 =cut
1044
1045 __PACKAGE__->has_many(
1046   "borrower_files",
1047   "Koha::Schema::Result::BorrowerFile",
1048   { "foreign.borrowernumber" => "self.borrowernumber" },
1049   { cascade_copy => 0, cascade_delete => 0 },
1050 );
1051
1052 =head2 borrower_message_preferences
1053
1054 Type: has_many
1055
1056 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
1057
1058 =cut
1059
1060 __PACKAGE__->has_many(
1061   "borrower_message_preferences",
1062   "Koha::Schema::Result::BorrowerMessagePreference",
1063   { "foreign.borrowernumber" => "self.borrowernumber" },
1064   { cascade_copy => 0, cascade_delete => 0 },
1065 );
1066
1067 =head2 borrower_relationships_guarantees
1068
1069 Type: has_many
1070
1071 Related object: L<Koha::Schema::Result::BorrowerRelationship>
1072
1073 =cut
1074
1075 __PACKAGE__->has_many(
1076   "borrower_relationships_guarantees",
1077   "Koha::Schema::Result::BorrowerRelationship",
1078   { "foreign.guarantee_id" => "self.borrowernumber" },
1079   { cascade_copy => 0, cascade_delete => 0 },
1080 );
1081
1082 =head2 borrower_relationships_guarantors
1083
1084 Type: has_many
1085
1086 Related object: L<Koha::Schema::Result::BorrowerRelationship>
1087
1088 =cut
1089
1090 __PACKAGE__->has_many(
1091   "borrower_relationships_guarantors",
1092   "Koha::Schema::Result::BorrowerRelationship",
1093   { "foreign.guarantor_id" => "self.borrowernumber" },
1094   { cascade_copy => 0, cascade_delete => 0 },
1095 );
1096
1097 =head2 branchcode
1098
1099 Type: belongs_to
1100
1101 Related object: L<Koha::Schema::Result::Branch>
1102
1103 =cut
1104
1105 __PACKAGE__->belongs_to(
1106   "branchcode",
1107   "Koha::Schema::Result::Branch",
1108   { branchcode => "branchcode" },
1109   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
1110 );
1111
1112 =head2 cash_register_actions
1113
1114 Type: has_many
1115
1116 Related object: L<Koha::Schema::Result::CashRegisterAction>
1117
1118 =cut
1119
1120 __PACKAGE__->has_many(
1121   "cash_register_actions",
1122   "Koha::Schema::Result::CashRegisterAction",
1123   { "foreign.manager_id" => "self.borrowernumber" },
1124   { cascade_copy => 0, cascade_delete => 0 },
1125 );
1126
1127 =head2 categorycode
1128
1129 Type: belongs_to
1130
1131 Related object: L<Koha::Schema::Result::Category>
1132
1133 =cut
1134
1135 __PACKAGE__->belongs_to(
1136   "categorycode",
1137   "Koha::Schema::Result::Category",
1138   { categorycode => "categorycode" },
1139   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
1140 );
1141
1142 =head2 club_enrollments
1143
1144 Type: has_many
1145
1146 Related object: L<Koha::Schema::Result::ClubEnrollment>
1147
1148 =cut
1149
1150 __PACKAGE__->has_many(
1151   "club_enrollments",
1152   "Koha::Schema::Result::ClubEnrollment",
1153   { "foreign.borrowernumber" => "self.borrowernumber" },
1154   { cascade_copy => 0, cascade_delete => 0 },
1155 );
1156
1157 =head2 club_holds_to_patron_holds
1158
1159 Type: has_many
1160
1161 Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold>
1162
1163 =cut
1164
1165 __PACKAGE__->has_many(
1166   "club_holds_to_patron_holds",
1167   "Koha::Schema::Result::ClubHoldsToPatronHold",
1168   { "foreign.patron_id" => "self.borrowernumber" },
1169   { cascade_copy => 0, cascade_delete => 0 },
1170 );
1171
1172 =head2 course_instructors
1173
1174 Type: has_many
1175
1176 Related object: L<Koha::Schema::Result::CourseInstructor>
1177
1178 =cut
1179
1180 __PACKAGE__->has_many(
1181   "course_instructors",
1182   "Koha::Schema::Result::CourseInstructor",
1183   { "foreign.borrowernumber" => "self.borrowernumber" },
1184   { cascade_copy => 0, cascade_delete => 0 },
1185 );
1186
1187 =head2 creator_batches
1188
1189 Type: has_many
1190
1191 Related object: L<Koha::Schema::Result::CreatorBatch>
1192
1193 =cut
1194
1195 __PACKAGE__->has_many(
1196   "creator_batches",
1197   "Koha::Schema::Result::CreatorBatch",
1198   { "foreign.borrower_number" => "self.borrowernumber" },
1199   { cascade_copy => 0, cascade_delete => 0 },
1200 );
1201
1202 =head2 discharges
1203
1204 Type: has_many
1205
1206 Related object: L<Koha::Schema::Result::Discharge>
1207
1208 =cut
1209
1210 __PACKAGE__->has_many(
1211   "discharges",
1212   "Koha::Schema::Result::Discharge",
1213   { "foreign.borrower" => "self.borrowernumber" },
1214   { cascade_copy => 0, cascade_delete => 0 },
1215 );
1216
1217 =head2 hold_fill_targets
1218
1219 Type: has_many
1220
1221 Related object: L<Koha::Schema::Result::HoldFillTarget>
1222
1223 =cut
1224
1225 __PACKAGE__->has_many(
1226   "hold_fill_targets",
1227   "Koha::Schema::Result::HoldFillTarget",
1228   { "foreign.borrowernumber" => "self.borrowernumber" },
1229   { cascade_copy => 0, cascade_delete => 0 },
1230 );
1231
1232 =head2 housebound_profile
1233
1234 Type: might_have
1235
1236 Related object: L<Koha::Schema::Result::HouseboundProfile>
1237
1238 =cut
1239
1240 __PACKAGE__->might_have(
1241   "housebound_profile",
1242   "Koha::Schema::Result::HouseboundProfile",
1243   { "foreign.borrowernumber" => "self.borrowernumber" },
1244   { cascade_copy => 0, cascade_delete => 0 },
1245 );
1246
1247 =head2 housebound_role
1248
1249 Type: might_have
1250
1251 Related object: L<Koha::Schema::Result::HouseboundRole>
1252
1253 =cut
1254
1255 __PACKAGE__->might_have(
1256   "housebound_role",
1257   "Koha::Schema::Result::HouseboundRole",
1258   { "foreign.borrowernumber_id" => "self.borrowernumber" },
1259   { cascade_copy => 0, cascade_delete => 0 },
1260 );
1261
1262 =head2 housebound_visit_chooser_brwnumbers
1263
1264 Type: has_many
1265
1266 Related object: L<Koha::Schema::Result::HouseboundVisit>
1267
1268 =cut
1269
1270 __PACKAGE__->has_many(
1271   "housebound_visit_chooser_brwnumbers",
1272   "Koha::Schema::Result::HouseboundVisit",
1273   { "foreign.chooser_brwnumber" => "self.borrowernumber" },
1274   { cascade_copy => 0, cascade_delete => 0 },
1275 );
1276
1277 =head2 housebound_visit_deliverer_brwnumbers
1278
1279 Type: has_many
1280
1281 Related object: L<Koha::Schema::Result::HouseboundVisit>
1282
1283 =cut
1284
1285 __PACKAGE__->has_many(
1286   "housebound_visit_deliverer_brwnumbers",
1287   "Koha::Schema::Result::HouseboundVisit",
1288   { "foreign.deliverer_brwnumber" => "self.borrowernumber" },
1289   { cascade_copy => 0, cascade_delete => 0 },
1290 );
1291
1292 =head2 illcomments
1293
1294 Type: has_many
1295
1296 Related object: L<Koha::Schema::Result::Illcomment>
1297
1298 =cut
1299
1300 __PACKAGE__->has_many(
1301   "illcomments",
1302   "Koha::Schema::Result::Illcomment",
1303   { "foreign.borrowernumber" => "self.borrowernumber" },
1304   { cascade_copy => 0, cascade_delete => 0 },
1305 );
1306
1307 =head2 illrequests
1308
1309 Type: has_many
1310
1311 Related object: L<Koha::Schema::Result::Illrequest>
1312
1313 =cut
1314
1315 __PACKAGE__->has_many(
1316   "illrequests",
1317   "Koha::Schema::Result::Illrequest",
1318   { "foreign.borrowernumber" => "self.borrowernumber" },
1319   { cascade_copy => 0, cascade_delete => 0 },
1320 );
1321
1322 =head2 issues
1323
1324 Type: has_many
1325
1326 Related object: L<Koha::Schema::Result::Issue>
1327
1328 =cut
1329
1330 __PACKAGE__->has_many(
1331   "issues",
1332   "Koha::Schema::Result::Issue",
1333   { "foreign.borrowernumber" => "self.borrowernumber" },
1334   { cascade_copy => 0, cascade_delete => 0 },
1335 );
1336
1337 =head2 issues_issuers
1338
1339 Type: has_many
1340
1341 Related object: L<Koha::Schema::Result::Issue>
1342
1343 =cut
1344
1345 __PACKAGE__->has_many(
1346   "issues_issuers",
1347   "Koha::Schema::Result::Issue",
1348   { "foreign.issuer_id" => "self.borrowernumber" },
1349   { cascade_copy => 0, cascade_delete => 0 },
1350 );
1351
1352 =head2 items_last_borrowers
1353
1354 Type: has_many
1355
1356 Related object: L<Koha::Schema::Result::ItemsLastBorrower>
1357
1358 =cut
1359
1360 __PACKAGE__->has_many(
1361   "items_last_borrowers",
1362   "Koha::Schema::Result::ItemsLastBorrower",
1363   { "foreign.borrowernumber" => "self.borrowernumber" },
1364   { cascade_copy => 0, cascade_delete => 0 },
1365 );
1366
1367 =head2 linktrackers
1368
1369 Type: has_many
1370
1371 Related object: L<Koha::Schema::Result::Linktracker>
1372
1373 =cut
1374
1375 __PACKAGE__->has_many(
1376   "linktrackers",
1377   "Koha::Schema::Result::Linktracker",
1378   { "foreign.borrowernumber" => "self.borrowernumber" },
1379   { cascade_copy => 0, cascade_delete => 0 },
1380 );
1381
1382 =head2 message_queues
1383
1384 Type: has_many
1385
1386 Related object: L<Koha::Schema::Result::MessageQueue>
1387
1388 =cut
1389
1390 __PACKAGE__->has_many(
1391   "message_queues",
1392   "Koha::Schema::Result::MessageQueue",
1393   { "foreign.borrowernumber" => "self.borrowernumber" },
1394   { cascade_copy => 0, cascade_delete => 0 },
1395 );
1396
1397 =head2 messages
1398
1399 Type: has_many
1400
1401 Related object: L<Koha::Schema::Result::Message>
1402
1403 =cut
1404
1405 __PACKAGE__->has_many(
1406   "messages",
1407   "Koha::Schema::Result::Message",
1408   { "foreign.manager_id" => "self.borrowernumber" },
1409   { cascade_copy => 0, cascade_delete => 0 },
1410 );
1411
1412 =head2 messages_borrowernumbers
1413
1414 Type: has_many
1415
1416 Related object: L<Koha::Schema::Result::Message>
1417
1418 =cut
1419
1420 __PACKAGE__->has_many(
1421   "messages_borrowernumbers",
1422   "Koha::Schema::Result::Message",
1423   { "foreign.borrowernumber" => "self.borrowernumber" },
1424   { cascade_copy => 0, cascade_delete => 0 },
1425 );
1426
1427 =head2 old_issues
1428
1429 Type: has_many
1430
1431 Related object: L<Koha::Schema::Result::OldIssue>
1432
1433 =cut
1434
1435 __PACKAGE__->has_many(
1436   "old_issues",
1437   "Koha::Schema::Result::OldIssue",
1438   { "foreign.borrowernumber" => "self.borrowernumber" },
1439   { cascade_copy => 0, cascade_delete => 0 },
1440 );
1441
1442 =head2 old_issues_issuers
1443
1444 Type: has_many
1445
1446 Related object: L<Koha::Schema::Result::OldIssue>
1447
1448 =cut
1449
1450 __PACKAGE__->has_many(
1451   "old_issues_issuers",
1452   "Koha::Schema::Result::OldIssue",
1453   { "foreign.issuer_id" => "self.borrowernumber" },
1454   { cascade_copy => 0, cascade_delete => 0 },
1455 );
1456
1457 =head2 old_reserves
1458
1459 Type: has_many
1460
1461 Related object: L<Koha::Schema::Result::OldReserve>
1462
1463 =cut
1464
1465 __PACKAGE__->has_many(
1466   "old_reserves",
1467   "Koha::Schema::Result::OldReserve",
1468   { "foreign.borrowernumber" => "self.borrowernumber" },
1469   { cascade_copy => 0, cascade_delete => 0 },
1470 );
1471
1472 =head2 patron_consents
1473
1474 Type: has_many
1475
1476 Related object: L<Koha::Schema::Result::PatronConsent>
1477
1478 =cut
1479
1480 __PACKAGE__->has_many(
1481   "patron_consents",
1482   "Koha::Schema::Result::PatronConsent",
1483   { "foreign.borrowernumber" => "self.borrowernumber" },
1484   { cascade_copy => 0, cascade_delete => 0 },
1485 );
1486
1487 =head2 patron_list_patrons
1488
1489 Type: has_many
1490
1491 Related object: L<Koha::Schema::Result::PatronListPatron>
1492
1493 =cut
1494
1495 __PACKAGE__->has_many(
1496   "patron_list_patrons",
1497   "Koha::Schema::Result::PatronListPatron",
1498   { "foreign.borrowernumber" => "self.borrowernumber" },
1499   { cascade_copy => 0, cascade_delete => 0 },
1500 );
1501
1502 =head2 patron_lists
1503
1504 Type: has_many
1505
1506 Related object: L<Koha::Schema::Result::PatronList>
1507
1508 =cut
1509
1510 __PACKAGE__->has_many(
1511   "patron_lists",
1512   "Koha::Schema::Result::PatronList",
1513   { "foreign.owner" => "self.borrowernumber" },
1514   { cascade_copy => 0, cascade_delete => 0 },
1515 );
1516
1517 =head2 patronimage
1518
1519 Type: might_have
1520
1521 Related object: L<Koha::Schema::Result::Patronimage>
1522
1523 =cut
1524
1525 __PACKAGE__->might_have(
1526   "patronimage",
1527   "Koha::Schema::Result::Patronimage",
1528   { "foreign.borrowernumber" => "self.borrowernumber" },
1529   { cascade_copy => 0, cascade_delete => 0 },
1530 );
1531
1532 =head2 problem_reports
1533
1534 Type: has_many
1535
1536 Related object: L<Koha::Schema::Result::ProblemReport>
1537
1538 =cut
1539
1540 __PACKAGE__->has_many(
1541   "problem_reports",
1542   "Koha::Schema::Result::ProblemReport",
1543   { "foreign.borrowernumber" => "self.borrowernumber" },
1544   { cascade_copy => 0, cascade_delete => 0 },
1545 );
1546
1547 =head2 ratings
1548
1549 Type: has_many
1550
1551 Related object: L<Koha::Schema::Result::Rating>
1552
1553 =cut
1554
1555 __PACKAGE__->has_many(
1556   "ratings",
1557   "Koha::Schema::Result::Rating",
1558   { "foreign.borrowernumber" => "self.borrowernumber" },
1559   { cascade_copy => 0, cascade_delete => 0 },
1560 );
1561
1562 =head2 reserves
1563
1564 Type: has_many
1565
1566 Related object: L<Koha::Schema::Result::Reserve>
1567
1568 =cut
1569
1570 __PACKAGE__->has_many(
1571   "reserves",
1572   "Koha::Schema::Result::Reserve",
1573   { "foreign.borrowernumber" => "self.borrowernumber" },
1574   { cascade_copy => 0, cascade_delete => 0 },
1575 );
1576
1577 =head2 return_claims_borrowernumbers
1578
1579 Type: has_many
1580
1581 Related object: L<Koha::Schema::Result::ReturnClaim>
1582
1583 =cut
1584
1585 __PACKAGE__->has_many(
1586   "return_claims_borrowernumbers",
1587   "Koha::Schema::Result::ReturnClaim",
1588   { "foreign.borrowernumber" => "self.borrowernumber" },
1589   { cascade_copy => 0, cascade_delete => 0 },
1590 );
1591
1592 =head2 return_claims_created_by
1593
1594 Type: has_many
1595
1596 Related object: L<Koha::Schema::Result::ReturnClaim>
1597
1598 =cut
1599
1600 __PACKAGE__->has_many(
1601   "return_claims_created_by",
1602   "Koha::Schema::Result::ReturnClaim",
1603   { "foreign.created_by" => "self.borrowernumber" },
1604   { cascade_copy => 0, cascade_delete => 0 },
1605 );
1606
1607 =head2 return_claims_resolved_by
1608
1609 Type: has_many
1610
1611 Related object: L<Koha::Schema::Result::ReturnClaim>
1612
1613 =cut
1614
1615 __PACKAGE__->has_many(
1616   "return_claims_resolved_by",
1617   "Koha::Schema::Result::ReturnClaim",
1618   { "foreign.resolved_by" => "self.borrowernumber" },
1619   { cascade_copy => 0, cascade_delete => 0 },
1620 );
1621
1622 =head2 return_claims_updated_by
1623
1624 Type: has_many
1625
1626 Related object: L<Koha::Schema::Result::ReturnClaim>
1627
1628 =cut
1629
1630 __PACKAGE__->has_many(
1631   "return_claims_updated_by",
1632   "Koha::Schema::Result::ReturnClaim",
1633   { "foreign.updated_by" => "self.borrowernumber" },
1634   { cascade_copy => 0, cascade_delete => 0 },
1635 );
1636
1637 =head2 reviews
1638
1639 Type: has_many
1640
1641 Related object: L<Koha::Schema::Result::Review>
1642
1643 =cut
1644
1645 __PACKAGE__->has_many(
1646   "reviews",
1647   "Koha::Schema::Result::Review",
1648   { "foreign.borrowernumber" => "self.borrowernumber" },
1649   { cascade_copy => 0, cascade_delete => 0 },
1650 );
1651
1652 =head2 sms_provider
1653
1654 Type: belongs_to
1655
1656 Related object: L<Koha::Schema::Result::SmsProvider>
1657
1658 =cut
1659
1660 __PACKAGE__->belongs_to(
1661   "sms_provider",
1662   "Koha::Schema::Result::SmsProvider",
1663   { id => "sms_provider_id" },
1664   {
1665     is_deferrable => 1,
1666     join_type     => "LEFT",
1667     on_delete     => "SET NULL",
1668     on_update     => "CASCADE",
1669   },
1670 );
1671
1672 =head2 subscriptionroutinglists
1673
1674 Type: has_many
1675
1676 Related object: L<Koha::Schema::Result::Subscriptionroutinglist>
1677
1678 =cut
1679
1680 __PACKAGE__->has_many(
1681   "subscriptionroutinglists",
1682   "Koha::Schema::Result::Subscriptionroutinglist",
1683   { "foreign.borrowernumber" => "self.borrowernumber" },
1684   { cascade_copy => 0, cascade_delete => 0 },
1685 );
1686
1687 =head2 suggestions_acceptedbies
1688
1689 Type: has_many
1690
1691 Related object: L<Koha::Schema::Result::Suggestion>
1692
1693 =cut
1694
1695 __PACKAGE__->has_many(
1696   "suggestions_acceptedbies",
1697   "Koha::Schema::Result::Suggestion",
1698   { "foreign.acceptedby" => "self.borrowernumber" },
1699   { cascade_copy => 0, cascade_delete => 0 },
1700 );
1701
1702 =head2 suggestions_lastmodificationbies
1703
1704 Type: has_many
1705
1706 Related object: L<Koha::Schema::Result::Suggestion>
1707
1708 =cut
1709
1710 __PACKAGE__->has_many(
1711   "suggestions_lastmodificationbies",
1712   "Koha::Schema::Result::Suggestion",
1713   { "foreign.lastmodificationby" => "self.borrowernumber" },
1714   { cascade_copy => 0, cascade_delete => 0 },
1715 );
1716
1717 =head2 suggestions_managedbies
1718
1719 Type: has_many
1720
1721 Related object: L<Koha::Schema::Result::Suggestion>
1722
1723 =cut
1724
1725 __PACKAGE__->has_many(
1726   "suggestions_managedbies",
1727   "Koha::Schema::Result::Suggestion",
1728   { "foreign.managedby" => "self.borrowernumber" },
1729   { cascade_copy => 0, cascade_delete => 0 },
1730 );
1731
1732 =head2 suggestions_rejectedbies
1733
1734 Type: has_many
1735
1736 Related object: L<Koha::Schema::Result::Suggestion>
1737
1738 =cut
1739
1740 __PACKAGE__->has_many(
1741   "suggestions_rejectedbies",
1742   "Koha::Schema::Result::Suggestion",
1743   { "foreign.rejectedby" => "self.borrowernumber" },
1744   { cascade_copy => 0, cascade_delete => 0 },
1745 );
1746
1747 =head2 suggestions_suggestedbies
1748
1749 Type: has_many
1750
1751 Related object: L<Koha::Schema::Result::Suggestion>
1752
1753 =cut
1754
1755 __PACKAGE__->has_many(
1756   "suggestions_suggestedbies",
1757   "Koha::Schema::Result::Suggestion",
1758   { "foreign.suggestedby" => "self.borrowernumber" },
1759   { cascade_copy => 0, cascade_delete => 0 },
1760 );
1761
1762 =head2 tags_all
1763
1764 Type: has_many
1765
1766 Related object: L<Koha::Schema::Result::TagAll>
1767
1768 =cut
1769
1770 __PACKAGE__->has_many(
1771   "tags_all",
1772   "Koha::Schema::Result::TagAll",
1773   { "foreign.borrowernumber" => "self.borrowernumber" },
1774   { cascade_copy => 0, cascade_delete => 0 },
1775 );
1776
1777 =head2 tags_approvals
1778
1779 Type: has_many
1780
1781 Related object: L<Koha::Schema::Result::TagsApproval>
1782
1783 =cut
1784
1785 __PACKAGE__->has_many(
1786   "tags_approvals",
1787   "Koha::Schema::Result::TagsApproval",
1788   { "foreign.approved_by" => "self.borrowernumber" },
1789   { cascade_copy => 0, cascade_delete => 0 },
1790 );
1791
1792 =head2 tmp_holdsqueues
1793
1794 Type: has_many
1795
1796 Related object: L<Koha::Schema::Result::TmpHoldsqueue>
1797
1798 =cut
1799
1800 __PACKAGE__->has_many(
1801   "tmp_holdsqueues",
1802   "Koha::Schema::Result::TmpHoldsqueue",
1803   { "foreign.borrowernumber" => "self.borrowernumber" },
1804   { cascade_copy => 0, cascade_delete => 0 },
1805 );
1806
1807 =head2 user_permissions
1808
1809 Type: has_many
1810
1811 Related object: L<Koha::Schema::Result::UserPermission>
1812
1813 =cut
1814
1815 __PACKAGE__->has_many(
1816   "user_permissions",
1817   "Koha::Schema::Result::UserPermission",
1818   { "foreign.borrowernumber" => "self.borrowernumber" },
1819   { cascade_copy => 0, cascade_delete => 0 },
1820 );
1821
1822 =head2 virtualshelfcontents
1823
1824 Type: has_many
1825
1826 Related object: L<Koha::Schema::Result::Virtualshelfcontent>
1827
1828 =cut
1829
1830 __PACKAGE__->has_many(
1831   "virtualshelfcontents",
1832   "Koha::Schema::Result::Virtualshelfcontent",
1833   { "foreign.borrowernumber" => "self.borrowernumber" },
1834   { cascade_copy => 0, cascade_delete => 0 },
1835 );
1836
1837 =head2 virtualshelfshares
1838
1839 Type: has_many
1840
1841 Related object: L<Koha::Schema::Result::Virtualshelfshare>
1842
1843 =cut
1844
1845 __PACKAGE__->has_many(
1846   "virtualshelfshares",
1847   "Koha::Schema::Result::Virtualshelfshare",
1848   { "foreign.borrowernumber" => "self.borrowernumber" },
1849   { cascade_copy => 0, cascade_delete => 0 },
1850 );
1851
1852 =head2 virtualshelves
1853
1854 Type: has_many
1855
1856 Related object: L<Koha::Schema::Result::Virtualshelve>
1857
1858 =cut
1859
1860 __PACKAGE__->has_many(
1861   "virtualshelves",
1862   "Koha::Schema::Result::Virtualshelve",
1863   { "foreign.owner" => "self.borrowernumber" },
1864   { cascade_copy => 0, cascade_delete => 0 },
1865 );
1866
1867 =head2 basketnoes
1868
1869 Type: many_to_many
1870
1871 Composing rels: L</aqbasketusers> -> basketno
1872
1873 =cut
1874
1875 __PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno");
1876
1877 =head2 budgets
1878
1879 Type: many_to_many
1880
1881 Composing rels: L</aqbudgetborrowers> -> budget
1882
1883 =cut
1884
1885 __PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget");
1886
1887 =head2 courses
1888
1889 Type: many_to_many
1890
1891 Composing rels: L</course_instructors> -> course
1892
1893 =cut
1894
1895 __PACKAGE__->many_to_many("courses", "course_instructors", "course");
1896
1897 =head2 ordernumbers
1898
1899 Type: many_to_many
1900
1901 Composing rels: L</aqorder_users> -> ordernumber
1902
1903 =cut
1904
1905 __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1906
1907 =head2 permissions
1908
1909 Type: many_to_many
1910
1911 Composing rels: L</user_permissions> -> permission
1912
1913 =cut
1914
1915 __PACKAGE__->many_to_many("permissions", "user_permissions", "permission");
1916
1917
1918 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-25 00:33:23
1919 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qPGKczsaKaLxxiNzZS5zdQ
1920
1921 __PACKAGE__->has_many(
1922   "extended_attributes",
1923   "Koha::Schema::Result::BorrowerAttribute",
1924   { "foreign.borrowernumber" => "self.borrowernumber" },
1925   { cascade_copy => 0, cascade_delete => 0 },
1926 );
1927
1928 __PACKAGE__->add_columns(
1929     '+anonymized'    => { is_boolean => 1 },
1930     '+lost'          => { is_boolean => 1 },
1931     '+gonenoaddress' => { is_boolean => 1 },
1932     '+privacy_guarantor_fines' => { is_boolean => 1 },
1933     '+autorenew_checkouts' => { is_boolean => 1 }
1934 );
1935
1936 sub koha_objects_class {
1937     'Koha::Patrons';
1938 }
1939 sub koha_object_class {
1940     'Koha::Patron';
1941 }
1942
1943 1;