2 package Koha::Schema::Result::Branch;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Branch
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<branches>
22 __PACKAGE__->table("branches");
29 default_value: (empty string)
33 a unique key assigned to each branch
40 the name of your library or branch
47 the first address line of for your library or branch
54 the second address line of for your library or branch
61 the third address line of for your library or branch
69 the zip or postal code for your library or branch
76 the city or province for your library or branch
83 the state for your library or branch
87 data_type: 'mediumtext'
90 the county for your library or branch
97 the primary phone for your library or branch
101 data_type: 'longtext'
104 the fax number for your library or branch
108 data_type: 'longtext'
111 the primary email address for your library or branch
113 =head2 branchillemail
115 data_type: 'longtext'
118 the ILL staff email address for your library or branch
122 data_type: 'longtext'
125 the email to be used as a Reply-To
127 =head2 branchreturnpath
129 data_type: 'longtext'
132 the email to be used as Return-Path
136 data_type: 'longtext'
139 the URL for your library or branch's website
154 the IP address for your library or branch
158 data_type: 'longtext'
161 notes related to your library or branch
169 geolocation of your library
177 MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode
179 =head2 pickup_location
185 the ability to act as a pickup location
193 whether this library should show in the opac
197 __PACKAGE__->add_columns(
199 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
201 { data_type => "longtext", is_nullable => 0 },
203 { data_type => "longtext", is_nullable => 1 },
205 { data_type => "longtext", is_nullable => 1 },
207 { data_type => "longtext", is_nullable => 1 },
209 { data_type => "varchar", is_nullable => 1, size => 25 },
211 { data_type => "longtext", is_nullable => 1 },
213 { data_type => "longtext", is_nullable => 1 },
215 { data_type => "mediumtext", is_nullable => 1 },
217 { data_type => "longtext", is_nullable => 1 },
219 { data_type => "longtext", is_nullable => 1 },
221 { data_type => "longtext", is_nullable => 1 },
223 { data_type => "longtext", is_nullable => 1 },
225 { data_type => "longtext", is_nullable => 1 },
227 { data_type => "longtext", is_nullable => 1 },
229 { data_type => "longtext", is_nullable => 1 },
231 { data_type => "tinyint", is_nullable => 1 },
233 { data_type => "varchar", is_nullable => 1, size => 15 },
235 { data_type => "longtext", is_nullable => 1 },
237 { data_type => "varchar", is_nullable => 1, size => 255 },
239 { data_type => "varchar", is_nullable => 1, size => 16 },
241 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
243 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
250 =item * L</branchcode>
256 __PACKAGE__->set_primary_key("branchcode");
260 =head2 account_credit_types_branches
264 Related object: L<Koha::Schema::Result::AccountCreditTypesBranch>
268 __PACKAGE__->has_many(
269 "account_credit_types_branches",
270 "Koha::Schema::Result::AccountCreditTypesBranch",
271 { "foreign.branchcode" => "self.branchcode" },
272 { cascade_copy => 0, cascade_delete => 0 },
275 =head2 account_debit_types_branches
279 Related object: L<Koha::Schema::Result::AccountDebitTypesBranch>
283 __PACKAGE__->has_many(
284 "account_debit_types_branches",
285 "Koha::Schema::Result::AccountDebitTypesBranch",
286 { "foreign.branchcode" => "self.branchcode" },
287 { cascade_copy => 0, cascade_delete => 0 },
294 Related object: L<Koha::Schema::Result::Accountline>
298 __PACKAGE__->has_many(
300 "Koha::Schema::Result::Accountline",
301 { "foreign.branchcode" => "self.branchcode" },
302 { cascade_copy => 0, cascade_delete => 0 },
305 =head2 additional_contents
309 Related object: L<Koha::Schema::Result::AdditionalContent>
313 __PACKAGE__->has_many(
314 "additional_contents",
315 "Koha::Schema::Result::AdditionalContent",
316 { "foreign.branchcode" => "self.branchcode" },
317 { cascade_copy => 0, cascade_delete => 0 },
324 Related object: L<Koha::Schema::Result::Aqbasket>
328 __PACKAGE__->has_many(
330 "Koha::Schema::Result::Aqbasket",
331 { "foreign.branch" => "self.branchcode" },
332 { cascade_copy => 0, cascade_delete => 0 },
335 =head2 article_requests
339 Related object: L<Koha::Schema::Result::ArticleRequest>
343 __PACKAGE__->has_many(
345 "Koha::Schema::Result::ArticleRequest",
346 { "foreign.branchcode" => "self.branchcode" },
347 { cascade_copy => 0, cascade_delete => 0 },
350 =head2 authorised_values_branches
354 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
358 __PACKAGE__->has_many(
359 "authorised_values_branches",
360 "Koha::Schema::Result::AuthorisedValuesBranch",
361 { "foreign.branchcode" => "self.branchcode" },
362 { cascade_copy => 0, cascade_delete => 0 },
365 =head2 borrower_attribute_types_branches
369 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
373 __PACKAGE__->has_many(
374 "borrower_attribute_types_branches",
375 "Koha::Schema::Result::BorrowerAttributeTypesBranch",
376 { "foreign.b_branchcode" => "self.branchcode" },
377 { cascade_copy => 0, cascade_delete => 0 },
384 Related object: L<Koha::Schema::Result::Borrower>
388 __PACKAGE__->has_many(
390 "Koha::Schema::Result::Borrower",
391 { "foreign.branchcode" => "self.branchcode" },
392 { cascade_copy => 0, cascade_delete => 0 },
395 =head2 branches_overdrive
399 Related object: L<Koha::Schema::Result::BranchesOverdrive>
403 __PACKAGE__->might_have(
404 "branches_overdrive",
405 "Koha::Schema::Result::BranchesOverdrive",
406 { "foreign.branchcode" => "self.branchcode" },
407 { cascade_copy => 0, cascade_delete => 0 },
410 =head2 branchtransfers_frombranches
414 Related object: L<Koha::Schema::Result::Branchtransfer>
418 __PACKAGE__->has_many(
419 "branchtransfers_frombranches",
420 "Koha::Schema::Result::Branchtransfer",
421 { "foreign.frombranch" => "self.branchcode" },
422 { cascade_copy => 0, cascade_delete => 0 },
425 =head2 branchtransfers_tobranches
429 Related object: L<Koha::Schema::Result::Branchtransfer>
433 __PACKAGE__->has_many(
434 "branchtransfers_tobranches",
435 "Koha::Schema::Result::Branchtransfer",
436 { "foreign.tobranch" => "self.branchcode" },
437 { cascade_copy => 0, cascade_delete => 0 },
440 =head2 cash_registers
444 Related object: L<Koha::Schema::Result::CashRegister>
448 __PACKAGE__->has_many(
450 "Koha::Schema::Result::CashRegister",
451 { "foreign.branch" => "self.branchcode" },
452 { cascade_copy => 0, cascade_delete => 0 },
455 =head2 categories_branches
459 Related object: L<Koha::Schema::Result::CategoriesBranch>
463 __PACKAGE__->has_many(
464 "categories_branches",
465 "Koha::Schema::Result::CategoriesBranch",
466 { "foreign.branchcode" => "self.branchcode" },
467 { cascade_copy => 0, cascade_delete => 0 },
470 =head2 circulation_rules
474 Related object: L<Koha::Schema::Result::CirculationRule>
478 __PACKAGE__->has_many(
480 "Koha::Schema::Result::CirculationRule",
481 { "foreign.branchcode" => "self.branchcode" },
482 { cascade_copy => 0, cascade_delete => 0 },
485 =head2 club_enrollments
489 Related object: L<Koha::Schema::Result::ClubEnrollment>
493 __PACKAGE__->has_many(
495 "Koha::Schema::Result::ClubEnrollment",
496 { "foreign.branchcode" => "self.branchcode" },
497 { cascade_copy => 0, cascade_delete => 0 },
500 =head2 club_templates
504 Related object: L<Koha::Schema::Result::ClubTemplate>
508 __PACKAGE__->has_many(
510 "Koha::Schema::Result::ClubTemplate",
511 { "foreign.branchcode" => "self.branchcode" },
512 { cascade_copy => 0, cascade_delete => 0 },
519 Related object: L<Koha::Schema::Result::Club>
523 __PACKAGE__->has_many(
525 "Koha::Schema::Result::Club",
526 { "foreign.branchcode" => "self.branchcode" },
527 { cascade_copy => 0, cascade_delete => 0 },
534 Related object: L<Koha::Schema::Result::Collection>
538 __PACKAGE__->has_many(
540 "Koha::Schema::Result::Collection",
541 { "foreign.colBranchcode" => "self.branchcode" },
542 { cascade_copy => 0, cascade_delete => 0 },
549 Related object: L<Koha::Schema::Result::CourseItem>
553 __PACKAGE__->has_many(
555 "Koha::Schema::Result::CourseItem",
556 { "foreign.holdingbranch" => "self.branchcode" },
557 { cascade_copy => 0, cascade_delete => 0 },
560 =head2 course_items_homebranch_storages
564 Related object: L<Koha::Schema::Result::CourseItem>
568 __PACKAGE__->has_many(
569 "course_items_homebranch_storages",
570 "Koha::Schema::Result::CourseItem",
571 { "foreign.homebranch_storage" => "self.branchcode" },
572 { cascade_copy => 0, cascade_delete => 0 },
575 =head2 course_items_homebranches
579 Related object: L<Koha::Schema::Result::CourseItem>
583 __PACKAGE__->has_many(
584 "course_items_homebranches",
585 "Koha::Schema::Result::CourseItem",
586 { "foreign.homebranch" => "self.branchcode" },
587 { cascade_copy => 0, cascade_delete => 0 },
590 =head2 creator_batches
594 Related object: L<Koha::Schema::Result::CreatorBatch>
598 __PACKAGE__->has_many(
600 "Koha::Schema::Result::CreatorBatch",
601 { "foreign.branch_code" => "self.branchcode" },
602 { cascade_copy => 0, cascade_delete => 0 },
605 =head2 curbside_pickup_policy
609 Related object: L<Koha::Schema::Result::CurbsidePickupPolicy>
613 __PACKAGE__->might_have(
614 "curbside_pickup_policy",
615 "Koha::Schema::Result::CurbsidePickupPolicy",
616 { "foreign.branchcode" => "self.branchcode" },
617 { cascade_copy => 0, cascade_delete => 0 },
620 =head2 curbside_pickups
624 Related object: L<Koha::Schema::Result::CurbsidePickup>
628 __PACKAGE__->has_many(
630 "Koha::Schema::Result::CurbsidePickup",
631 { "foreign.branchcode" => "self.branchcode" },
632 { cascade_copy => 0, cascade_delete => 0 },
639 Related object: L<Koha::Schema::Result::Desk>
643 __PACKAGE__->has_many(
645 "Koha::Schema::Result::Desk",
646 { "foreign.branchcode" => "self.branchcode" },
647 { cascade_copy => 0, cascade_delete => 0 },
654 Related object: L<Koha::Schema::Result::EdifactEan>
658 __PACKAGE__->has_many(
660 "Koha::Schema::Result::EdifactEan",
661 { "foreign.branchcode" => "self.branchcode" },
662 { cascade_copy => 0, cascade_delete => 0 },
665 =head2 hold_fill_targets
669 Related object: L<Koha::Schema::Result::HoldFillTarget>
673 __PACKAGE__->has_many(
675 "Koha::Schema::Result::HoldFillTarget",
676 { "foreign.source_branchcode" => "self.branchcode" },
677 { cascade_copy => 0, cascade_delete => 0 },
680 =head2 identity_provider_domains
684 Related object: L<Koha::Schema::Result::IdentityProviderDomain>
688 __PACKAGE__->has_many(
689 "identity_provider_domains",
690 "Koha::Schema::Result::IdentityProviderDomain",
691 { "foreign.default_library_id" => "self.branchcode" },
692 { cascade_copy => 0, cascade_delete => 0 },
699 Related object: L<Koha::Schema::Result::Illrequest>
703 __PACKAGE__->has_many(
705 "Koha::Schema::Result::Illrequest",
706 { "foreign.branchcode" => "self.branchcode" },
707 { cascade_copy => 0, cascade_delete => 0 },
710 =head2 items_holdingbranches
714 Related object: L<Koha::Schema::Result::Item>
718 __PACKAGE__->has_many(
719 "items_holdingbranches",
720 "Koha::Schema::Result::Item",
721 { "foreign.holdingbranch" => "self.branchcode" },
722 { cascade_copy => 0, cascade_delete => 0 },
725 =head2 items_homebranches
729 Related object: L<Koha::Schema::Result::Item>
733 __PACKAGE__->has_many(
734 "items_homebranches",
735 "Koha::Schema::Result::Item",
736 { "foreign.homebranch" => "self.branchcode" },
737 { cascade_copy => 0, cascade_delete => 0 },
740 =head2 itemtypes_branches
744 Related object: L<Koha::Schema::Result::ItemtypesBranch>
748 __PACKAGE__->has_many(
749 "itemtypes_branches",
750 "Koha::Schema::Result::ItemtypesBranch",
751 { "foreign.branchcode" => "self.branchcode" },
752 { cascade_copy => 0, cascade_delete => 0 },
755 =head2 library_groups
759 Related object: L<Koha::Schema::Result::LibraryGroup>
763 __PACKAGE__->has_many(
765 "Koha::Schema::Result::LibraryGroup",
766 { "foreign.branchcode" => "self.branchcode" },
767 { cascade_copy => 0, cascade_delete => 0 },
770 =head2 library_smtp_server
774 Related object: L<Koha::Schema::Result::LibrarySmtpServer>
778 __PACKAGE__->might_have(
779 "library_smtp_server",
780 "Koha::Schema::Result::LibrarySmtpServer",
781 { "foreign.library_id" => "self.branchcode" },
782 { cascade_copy => 0, cascade_delete => 0 },
785 =head2 problem_reports
789 Related object: L<Koha::Schema::Result::ProblemReport>
793 __PACKAGE__->has_many(
795 "Koha::Schema::Result::ProblemReport",
796 { "foreign.branchcode" => "self.branchcode" },
797 { cascade_copy => 0, cascade_delete => 0 },
804 Related object: L<Koha::Schema::Result::Recall>
808 __PACKAGE__->has_many(
810 "Koha::Schema::Result::Recall",
811 { "foreign.pickup_library_id" => "self.branchcode" },
812 { cascade_copy => 0, cascade_delete => 0 },
815 =head2 repeatable_holidays
819 Related object: L<Koha::Schema::Result::RepeatableHoliday>
823 __PACKAGE__->has_many(
824 "repeatable_holidays",
825 "Koha::Schema::Result::RepeatableHoliday",
826 { "foreign.branchcode" => "self.branchcode" },
827 { cascade_copy => 0, cascade_delete => 0 },
834 Related object: L<Koha::Schema::Result::Reserve>
838 __PACKAGE__->has_many(
840 "Koha::Schema::Result::Reserve",
841 { "foreign.branchcode" => "self.branchcode" },
842 { cascade_copy => 0, cascade_delete => 0 },
845 =head2 special_holidays
849 Related object: L<Koha::Schema::Result::SpecialHoliday>
853 __PACKAGE__->has_many(
855 "Koha::Schema::Result::SpecialHoliday",
856 { "foreign.branchcode" => "self.branchcode" },
857 { cascade_copy => 0, cascade_delete => 0 },
860 =head2 stockrotationstages
864 Related object: L<Koha::Schema::Result::Stockrotationstage>
868 __PACKAGE__->has_many(
869 "stockrotationstages",
870 "Koha::Schema::Result::Stockrotationstage",
871 { "foreign.branchcode_id" => "self.branchcode" },
872 { cascade_copy => 0, cascade_delete => 0 },
879 Related object: L<Koha::Schema::Result::Suggestion>
883 __PACKAGE__->has_many(
885 "Koha::Schema::Result::Suggestion",
886 { "foreign.branchcode" => "self.branchcode" },
887 { cascade_copy => 0, cascade_delete => 0 },
890 =head2 transport_cost_frombranches
894 Related object: L<Koha::Schema::Result::TransportCost>
898 __PACKAGE__->has_many(
899 "transport_cost_frombranches",
900 "Koha::Schema::Result::TransportCost",
901 { "foreign.frombranch" => "self.branchcode" },
902 { cascade_copy => 0, cascade_delete => 0 },
905 =head2 transport_cost_tobranches
909 Related object: L<Koha::Schema::Result::TransportCost>
913 __PACKAGE__->has_many(
914 "transport_cost_tobranches",
915 "Koha::Schema::Result::TransportCost",
916 { "foreign.tobranch" => "self.branchcode" },
917 { cascade_copy => 0, cascade_delete => 0 },
921 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-08 17:35:26
922 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QPqXuEigMeIBb9NKMSkrNw
924 __PACKAGE__->add_columns(
925 '+pickup_location' => { is_boolean => 1 },
926 '+public' => { is_boolean => 1 }
929 sub koha_object_class {
932 sub koha_objects_class {