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