Bug 8976: DBIC schema changes
[koha.git] / Koha / Schema / Result / Branch.pm
1 use utf8;
2 package Koha::Schema::Result::Branch;
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::Branch
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<branches>
19
20 =cut
21
22 __PACKAGE__->table("branches");
23
24 =head1 ACCESSORS
25
26 =head2 branchcode
27
28   data_type: 'varchar'
29   default_value: (empty string)
30   is_nullable: 0
31   size: 10
32
33 a unique key assigned to each branch
34
35 =head2 branchname
36
37   data_type: 'longtext'
38   is_nullable: 0
39
40 the name of your library or branch
41
42 =head2 branchaddress1
43
44   data_type: 'longtext'
45   is_nullable: 1
46
47 the first address line of for your library or branch
48
49 =head2 branchaddress2
50
51   data_type: 'longtext'
52   is_nullable: 1
53
54 the second address line of for your library or branch
55
56 =head2 branchaddress3
57
58   data_type: 'longtext'
59   is_nullable: 1
60
61 the third address line of for your library or branch
62
63 =head2 branchzip
64
65   data_type: 'varchar'
66   is_nullable: 1
67   size: 25
68
69 the zip or postal code for your library or branch
70
71 =head2 branchcity
72
73   data_type: 'longtext'
74   is_nullable: 1
75
76 the city or province for your library or branch
77
78 =head2 branchstate
79
80   data_type: 'longtext'
81   is_nullable: 1
82
83 the state for your library or branch
84
85 =head2 branchcountry
86
87   data_type: 'mediumtext'
88   is_nullable: 1
89
90 the county for your library or branch
91
92 =head2 branchphone
93
94   data_type: 'longtext'
95   is_nullable: 1
96
97 the primary phone for your library or branch
98
99 =head2 branchfax
100
101   data_type: 'longtext'
102   is_nullable: 1
103
104 the fax number for your library or branch
105
106 =head2 branchemail
107
108   data_type: 'longtext'
109   is_nullable: 1
110
111 the primary email address for your library or branch
112
113 =head2 branchillemail
114
115   data_type: 'longtext'
116   is_nullable: 1
117
118 the ILL staff email address for your library or branch
119
120 =head2 branchreplyto
121
122   data_type: 'longtext'
123   is_nullable: 1
124
125 the email to be used as a Reply-To
126
127 =head2 branchreturnpath
128
129   data_type: 'longtext'
130   is_nullable: 1
131
132 the email to be used as Return-Path
133
134 =head2 branchurl
135
136   data_type: 'longtext'
137   is_nullable: 1
138
139 the URL for your library or branch's website
140
141 =head2 issuing
142
143   data_type: 'tinyint'
144   is_nullable: 1
145
146 unused in Koha
147
148 =head2 branchip
149
150   data_type: 'varchar'
151   is_nullable: 1
152   size: 15
153
154 the IP address for your library or branch
155
156 =head2 branchnotes
157
158   data_type: 'longtext'
159   is_nullable: 1
160
161 notes related to your library or branch
162
163 =head2 opac_info
164
165   data_type: 'mediumtext'
166   is_nullable: 1
167
168 HTML that displays in OPAC
169
170 =head2 geolocation
171
172   data_type: 'varchar'
173   is_nullable: 1
174   size: 255
175
176 geolocation of your library
177
178 =head2 marcorgcode
179
180   data_type: 'varchar'
181   is_nullable: 1
182   size: 16
183
184 MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode
185
186 =head2 pickup_location
187
188   data_type: 'tinyint'
189   default_value: 1
190   is_nullable: 0
191
192 the ability to act as a pickup location
193
194 =cut
195
196 __PACKAGE__->add_columns(
197   "branchcode",
198   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
199   "branchname",
200   { data_type => "longtext", is_nullable => 0 },
201   "branchaddress1",
202   { data_type => "longtext", is_nullable => 1 },
203   "branchaddress2",
204   { data_type => "longtext", is_nullable => 1 },
205   "branchaddress3",
206   { data_type => "longtext", is_nullable => 1 },
207   "branchzip",
208   { data_type => "varchar", is_nullable => 1, size => 25 },
209   "branchcity",
210   { data_type => "longtext", is_nullable => 1 },
211   "branchstate",
212   { data_type => "longtext", is_nullable => 1 },
213   "branchcountry",
214   { data_type => "mediumtext", is_nullable => 1 },
215   "branchphone",
216   { data_type => "longtext", is_nullable => 1 },
217   "branchfax",
218   { data_type => "longtext", is_nullable => 1 },
219   "branchemail",
220   { data_type => "longtext", is_nullable => 1 },
221   "branchillemail",
222   { data_type => "longtext", is_nullable => 1 },
223   "branchreplyto",
224   { data_type => "longtext", is_nullable => 1 },
225   "branchreturnpath",
226   { data_type => "longtext", is_nullable => 1 },
227   "branchurl",
228   { data_type => "longtext", is_nullable => 1 },
229   "issuing",
230   { data_type => "tinyint", is_nullable => 1 },
231   "branchip",
232   { data_type => "varchar", is_nullable => 1, size => 15 },
233   "branchnotes",
234   { data_type => "longtext", is_nullable => 1 },
235   "opac_info",
236   { data_type => "mediumtext", is_nullable => 1 },
237   "geolocation",
238   { data_type => "varchar", is_nullable => 1, size => 255 },
239   "marcorgcode",
240   { data_type => "varchar", is_nullable => 1, size => 16 },
241   "pickup_location",
242   { data_type => "tinyint", default_value => 1, is_nullable => 0 },
243 );
244
245 =head1 PRIMARY KEY
246
247 =over 4
248
249 =item * L</branchcode>
250
251 =back
252
253 =cut
254
255 __PACKAGE__->set_primary_key("branchcode");
256
257 =head1 RELATIONS
258
259 =head2 account_credit_types_branches
260
261 Type: has_many
262
263 Related object: L<Koha::Schema::Result::AccountCreditTypesBranch>
264
265 =cut
266
267 __PACKAGE__->has_many(
268   "account_credit_types_branches",
269   "Koha::Schema::Result::AccountCreditTypesBranch",
270   { "foreign.branchcode" => "self.branchcode" },
271   { cascade_copy => 0, cascade_delete => 0 },
272 );
273
274 =head2 account_debit_types_branches
275
276 Type: has_many
277
278 Related object: L<Koha::Schema::Result::AccountDebitTypesBranch>
279
280 =cut
281
282 __PACKAGE__->has_many(
283   "account_debit_types_branches",
284   "Koha::Schema::Result::AccountDebitTypesBranch",
285   { "foreign.branchcode" => "self.branchcode" },
286   { cascade_copy => 0, cascade_delete => 0 },
287 );
288
289 =head2 accountlines
290
291 Type: has_many
292
293 Related object: L<Koha::Schema::Result::Accountline>
294
295 =cut
296
297 __PACKAGE__->has_many(
298   "accountlines",
299   "Koha::Schema::Result::Accountline",
300   { "foreign.branchcode" => "self.branchcode" },
301   { cascade_copy => 0, cascade_delete => 0 },
302 );
303
304 =head2 aqbaskets
305
306 Type: has_many
307
308 Related object: L<Koha::Schema::Result::Aqbasket>
309
310 =cut
311
312 __PACKAGE__->has_many(
313   "aqbaskets",
314   "Koha::Schema::Result::Aqbasket",
315   { "foreign.branch" => "self.branchcode" },
316   { cascade_copy => 0, cascade_delete => 0 },
317 );
318
319 =head2 article_requests
320
321 Type: has_many
322
323 Related object: L<Koha::Schema::Result::ArticleRequest>
324
325 =cut
326
327 __PACKAGE__->has_many(
328   "article_requests",
329   "Koha::Schema::Result::ArticleRequest",
330   { "foreign.branchcode" => "self.branchcode" },
331   { cascade_copy => 0, cascade_delete => 0 },
332 );
333
334 =head2 authorised_values_branches
335
336 Type: has_many
337
338 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
339
340 =cut
341
342 __PACKAGE__->has_many(
343   "authorised_values_branches",
344   "Koha::Schema::Result::AuthorisedValuesBranch",
345   { "foreign.branchcode" => "self.branchcode" },
346   { cascade_copy => 0, cascade_delete => 0 },
347 );
348
349 =head2 borrower_attribute_types_branches
350
351 Type: has_many
352
353 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
354
355 =cut
356
357 __PACKAGE__->has_many(
358   "borrower_attribute_types_branches",
359   "Koha::Schema::Result::BorrowerAttributeTypesBranch",
360   { "foreign.b_branchcode" => "self.branchcode" },
361   { cascade_copy => 0, cascade_delete => 0 },
362 );
363
364 =head2 borrowers
365
366 Type: has_many
367
368 Related object: L<Koha::Schema::Result::Borrower>
369
370 =cut
371
372 __PACKAGE__->has_many(
373   "borrowers",
374   "Koha::Schema::Result::Borrower",
375   { "foreign.branchcode" => "self.branchcode" },
376   { cascade_copy => 0, cascade_delete => 0 },
377 );
378
379 =head2 branches_overdrive
380
381 Type: might_have
382
383 Related object: L<Koha::Schema::Result::BranchesOverdrive>
384
385 =cut
386
387 __PACKAGE__->might_have(
388   "branches_overdrive",
389   "Koha::Schema::Result::BranchesOverdrive",
390   { "foreign.branchcode" => "self.branchcode" },
391   { cascade_copy => 0, cascade_delete => 0 },
392 );
393
394 =head2 branchtransfers_frombranches
395
396 Type: has_many
397
398 Related object: L<Koha::Schema::Result::Branchtransfer>
399
400 =cut
401
402 __PACKAGE__->has_many(
403   "branchtransfers_frombranches",
404   "Koha::Schema::Result::Branchtransfer",
405   { "foreign.frombranch" => "self.branchcode" },
406   { cascade_copy => 0, cascade_delete => 0 },
407 );
408
409 =head2 branchtransfers_tobranches
410
411 Type: has_many
412
413 Related object: L<Koha::Schema::Result::Branchtransfer>
414
415 =cut
416
417 __PACKAGE__->has_many(
418   "branchtransfers_tobranches",
419   "Koha::Schema::Result::Branchtransfer",
420   { "foreign.tobranch" => "self.branchcode" },
421   { cascade_copy => 0, cascade_delete => 0 },
422 );
423
424 =head2 cash_registers
425
426 Type: has_many
427
428 Related object: L<Koha::Schema::Result::CashRegister>
429
430 =cut
431
432 __PACKAGE__->has_many(
433   "cash_registers",
434   "Koha::Schema::Result::CashRegister",
435   { "foreign.branch" => "self.branchcode" },
436   { cascade_copy => 0, cascade_delete => 0 },
437 );
438
439 =head2 categories_branches
440
441 Type: has_many
442
443 Related object: L<Koha::Schema::Result::CategoriesBranch>
444
445 =cut
446
447 __PACKAGE__->has_many(
448   "categories_branches",
449   "Koha::Schema::Result::CategoriesBranch",
450   { "foreign.branchcode" => "self.branchcode" },
451   { cascade_copy => 0, cascade_delete => 0 },
452 );
453
454 =head2 circulation_rules
455
456 Type: has_many
457
458 Related object: L<Koha::Schema::Result::CirculationRule>
459
460 =cut
461
462 __PACKAGE__->has_many(
463   "circulation_rules",
464   "Koha::Schema::Result::CirculationRule",
465   { "foreign.branchcode" => "self.branchcode" },
466   { cascade_copy => 0, cascade_delete => 0 },
467 );
468
469 =head2 club_enrollments
470
471 Type: has_many
472
473 Related object: L<Koha::Schema::Result::ClubEnrollment>
474
475 =cut
476
477 __PACKAGE__->has_many(
478   "club_enrollments",
479   "Koha::Schema::Result::ClubEnrollment",
480   { "foreign.branchcode" => "self.branchcode" },
481   { cascade_copy => 0, cascade_delete => 0 },
482 );
483
484 =head2 club_templates
485
486 Type: has_many
487
488 Related object: L<Koha::Schema::Result::ClubTemplate>
489
490 =cut
491
492 __PACKAGE__->has_many(
493   "club_templates",
494   "Koha::Schema::Result::ClubTemplate",
495   { "foreign.branchcode" => "self.branchcode" },
496   { cascade_copy => 0, cascade_delete => 0 },
497 );
498
499 =head2 clubs
500
501 Type: has_many
502
503 Related object: L<Koha::Schema::Result::Club>
504
505 =cut
506
507 __PACKAGE__->has_many(
508   "clubs",
509   "Koha::Schema::Result::Club",
510   { "foreign.branchcode" => "self.branchcode" },
511   { cascade_copy => 0, cascade_delete => 0 },
512 );
513
514 =head2 collections
515
516 Type: has_many
517
518 Related object: L<Koha::Schema::Result::Collection>
519
520 =cut
521
522 __PACKAGE__->has_many(
523   "collections",
524   "Koha::Schema::Result::Collection",
525   { "foreign.colBranchcode" => "self.branchcode" },
526   { cascade_copy => 0, cascade_delete => 0 },
527 );
528
529 =head2 course_items
530
531 Type: has_many
532
533 Related object: L<Koha::Schema::Result::CourseItem>
534
535 =cut
536
537 __PACKAGE__->has_many(
538   "course_items",
539   "Koha::Schema::Result::CourseItem",
540   { "foreign.holdingbranch" => "self.branchcode" },
541   { cascade_copy => 0, cascade_delete => 0 },
542 );
543
544 =head2 course_items_homebranch_storages
545
546 Type: has_many
547
548 Related object: L<Koha::Schema::Result::CourseItem>
549
550 =cut
551
552 __PACKAGE__->has_many(
553   "course_items_homebranch_storages",
554   "Koha::Schema::Result::CourseItem",
555   { "foreign.homebranch_storage" => "self.branchcode" },
556   { cascade_copy => 0, cascade_delete => 0 },
557 );
558
559 =head2 course_items_homebranches
560
561 Type: has_many
562
563 Related object: L<Koha::Schema::Result::CourseItem>
564
565 =cut
566
567 __PACKAGE__->has_many(
568   "course_items_homebranches",
569   "Koha::Schema::Result::CourseItem",
570   { "foreign.homebranch" => "self.branchcode" },
571   { cascade_copy => 0, cascade_delete => 0 },
572 );
573
574 =head2 creator_batches
575
576 Type: has_many
577
578 Related object: L<Koha::Schema::Result::CreatorBatch>
579
580 =cut
581
582 __PACKAGE__->has_many(
583   "creator_batches",
584   "Koha::Schema::Result::CreatorBatch",
585   { "foreign.branch_code" => "self.branchcode" },
586   { cascade_copy => 0, cascade_delete => 0 },
587 );
588
589 =head2 desks
590
591 Type: has_many
592
593 Related object: L<Koha::Schema::Result::Desk>
594
595 =cut
596
597 __PACKAGE__->has_many(
598   "desks",
599   "Koha::Schema::Result::Desk",
600   { "foreign.branchcode" => "self.branchcode" },
601   { cascade_copy => 0, cascade_delete => 0 },
602 );
603
604 =head2 edifact_eans
605
606 Type: has_many
607
608 Related object: L<Koha::Schema::Result::EdifactEan>
609
610 =cut
611
612 __PACKAGE__->has_many(
613   "edifact_eans",
614   "Koha::Schema::Result::EdifactEan",
615   { "foreign.branchcode" => "self.branchcode" },
616   { cascade_copy => 0, cascade_delete => 0 },
617 );
618
619 =head2 hold_fill_targets
620
621 Type: has_many
622
623 Related object: L<Koha::Schema::Result::HoldFillTarget>
624
625 =cut
626
627 __PACKAGE__->has_many(
628   "hold_fill_targets",
629   "Koha::Schema::Result::HoldFillTarget",
630   { "foreign.source_branchcode" => "self.branchcode" },
631   { cascade_copy => 0, cascade_delete => 0 },
632 );
633
634 =head2 illrequests
635
636 Type: has_many
637
638 Related object: L<Koha::Schema::Result::Illrequest>
639
640 =cut
641
642 __PACKAGE__->has_many(
643   "illrequests",
644   "Koha::Schema::Result::Illrequest",
645   { "foreign.branchcode" => "self.branchcode" },
646   { cascade_copy => 0, cascade_delete => 0 },
647 );
648
649 =head2 items_holdingbranches
650
651 Type: has_many
652
653 Related object: L<Koha::Schema::Result::Item>
654
655 =cut
656
657 __PACKAGE__->has_many(
658   "items_holdingbranches",
659   "Koha::Schema::Result::Item",
660   { "foreign.holdingbranch" => "self.branchcode" },
661   { cascade_copy => 0, cascade_delete => 0 },
662 );
663
664 =head2 items_homebranches
665
666 Type: has_many
667
668 Related object: L<Koha::Schema::Result::Item>
669
670 =cut
671
672 __PACKAGE__->has_many(
673   "items_homebranches",
674   "Koha::Schema::Result::Item",
675   { "foreign.homebranch" => "self.branchcode" },
676   { cascade_copy => 0, cascade_delete => 0 },
677 );
678
679 =head2 itemtypes_branches
680
681 Type: has_many
682
683 Related object: L<Koha::Schema::Result::ItemtypesBranch>
684
685 =cut
686
687 __PACKAGE__->has_many(
688   "itemtypes_branches",
689   "Koha::Schema::Result::ItemtypesBranch",
690   { "foreign.branchcode" => "self.branchcode" },
691   { cascade_copy => 0, cascade_delete => 0 },
692 );
693
694 =head2 library_groups
695
696 Type: has_many
697
698 Related object: L<Koha::Schema::Result::LibraryGroup>
699
700 =cut
701
702 __PACKAGE__->has_many(
703   "library_groups",
704   "Koha::Schema::Result::LibraryGroup",
705   { "foreign.branchcode" => "self.branchcode" },
706   { cascade_copy => 0, cascade_delete => 0 },
707 );
708
709 =head2 library_smtp_server
710
711 Type: might_have
712
713 Related object: L<Koha::Schema::Result::LibrarySmtpServer>
714
715 =cut
716
717 __PACKAGE__->might_have(
718   "library_smtp_server",
719   "Koha::Schema::Result::LibrarySmtpServer",
720   { "foreign.library_id" => "self.branchcode" },
721   { cascade_copy => 0, cascade_delete => 0 },
722 );
723
724 =head2 opac_news
725
726 Type: has_many
727
728 Related object: L<Koha::Schema::Result::OpacNews>
729
730 =cut
731
732 __PACKAGE__->has_many(
733   "opac_news",
734   "Koha::Schema::Result::OpacNews",
735   { "foreign.branchcode" => "self.branchcode" },
736   { cascade_copy => 0, cascade_delete => 0 },
737 );
738
739 =head2 problem_reports
740
741 Type: has_many
742
743 Related object: L<Koha::Schema::Result::ProblemReport>
744
745 =cut
746
747 __PACKAGE__->has_many(
748   "problem_reports",
749   "Koha::Schema::Result::ProblemReport",
750   { "foreign.branchcode" => "self.branchcode" },
751   { cascade_copy => 0, cascade_delete => 0 },
752 );
753
754 =head2 pseudonymized_transactions_branchcodes
755
756 Type: has_many
757
758 Related object: L<Koha::Schema::Result::PseudonymizedTransaction>
759
760 =cut
761
762 __PACKAGE__->has_many(
763   "pseudonymized_transactions_branchcodes",
764   "Koha::Schema::Result::PseudonymizedTransaction",
765   { "foreign.branchcode" => "self.branchcode" },
766   { cascade_copy => 0, cascade_delete => 0 },
767 );
768
769 =head2 pseudonymized_transactions_transaction_branchcodes
770
771 Type: has_many
772
773 Related object: L<Koha::Schema::Result::PseudonymizedTransaction>
774
775 =cut
776
777 __PACKAGE__->has_many(
778   "pseudonymized_transactions_transaction_branchcodes",
779   "Koha::Schema::Result::PseudonymizedTransaction",
780   { "foreign.transaction_branchcode" => "self.branchcode" },
781   { cascade_copy => 0, cascade_delete => 0 },
782 );
783
784 =head2 repeatable_holidays
785
786 Type: has_many
787
788 Related object: L<Koha::Schema::Result::RepeatableHoliday>
789
790 =cut
791
792 __PACKAGE__->has_many(
793   "repeatable_holidays",
794   "Koha::Schema::Result::RepeatableHoliday",
795   { "foreign.branchcode" => "self.branchcode" },
796   { cascade_copy => 0, cascade_delete => 0 },
797 );
798
799 =head2 reserves
800
801 Type: has_many
802
803 Related object: L<Koha::Schema::Result::Reserve>
804
805 =cut
806
807 __PACKAGE__->has_many(
808   "reserves",
809   "Koha::Schema::Result::Reserve",
810   { "foreign.branchcode" => "self.branchcode" },
811   { cascade_copy => 0, cascade_delete => 0 },
812 );
813
814 =head2 special_holidays
815
816 Type: has_many
817
818 Related object: L<Koha::Schema::Result::SpecialHoliday>
819
820 =cut
821
822 __PACKAGE__->has_many(
823   "special_holidays",
824   "Koha::Schema::Result::SpecialHoliday",
825   { "foreign.branchcode" => "self.branchcode" },
826   { cascade_copy => 0, cascade_delete => 0 },
827 );
828
829 =head2 stockrotationstages
830
831 Type: has_many
832
833 Related object: L<Koha::Schema::Result::Stockrotationstage>
834
835 =cut
836
837 __PACKAGE__->has_many(
838   "stockrotationstages",
839   "Koha::Schema::Result::Stockrotationstage",
840   { "foreign.branchcode_id" => "self.branchcode" },
841   { cascade_copy => 0, cascade_delete => 0 },
842 );
843
844 =head2 suggestions
845
846 Type: has_many
847
848 Related object: L<Koha::Schema::Result::Suggestion>
849
850 =cut
851
852 __PACKAGE__->has_many(
853   "suggestions",
854   "Koha::Schema::Result::Suggestion",
855   { "foreign.branchcode" => "self.branchcode" },
856   { cascade_copy => 0, cascade_delete => 0 },
857 );
858
859 =head2 transport_cost_frombranches
860
861 Type: has_many
862
863 Related object: L<Koha::Schema::Result::TransportCost>
864
865 =cut
866
867 __PACKAGE__->has_many(
868   "transport_cost_frombranches",
869   "Koha::Schema::Result::TransportCost",
870   { "foreign.frombranch" => "self.branchcode" },
871   { cascade_copy => 0, cascade_delete => 0 },
872 );
873
874 =head2 transport_cost_tobranches
875
876 Type: has_many
877
878 Related object: L<Koha::Schema::Result::TransportCost>
879
880 =cut
881
882 __PACKAGE__->has_many(
883   "transport_cost_tobranches",
884   "Koha::Schema::Result::TransportCost",
885   { "foreign.tobranch" => "self.branchcode" },
886   { cascade_copy => 0, cascade_delete => 0 },
887 );
888
889
890 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
891 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uu8m3hyDhM50oTSeNTJbdg
892
893 __PACKAGE__->add_columns(
894     '+pickup_location' => { is_boolean => 1 }
895 );
896
897 sub koha_object_class {
898     'Koha::Library';
899 }
900 sub koha_objects_class {
901     'Koha::Libraries';
902 }
903
904 1;