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