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