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
165 data_type: 'mediumtext'
168 HTML that displays in OPAC
176 geolocation of your library
184 MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode
186 =head2 pickup_location
192 the ability to act as a pickup location
196 __PACKAGE__->add_columns(
198 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
200 { data_type => "longtext", is_nullable => 0 },
202 { data_type => "longtext", is_nullable => 1 },
204 { data_type => "longtext", is_nullable => 1 },
206 { data_type => "longtext", is_nullable => 1 },
208 { data_type => "varchar", is_nullable => 1, size => 25 },
210 { data_type => "longtext", is_nullable => 1 },
212 { data_type => "longtext", is_nullable => 1 },
214 { data_type => "mediumtext", is_nullable => 1 },
216 { data_type => "longtext", is_nullable => 1 },
218 { data_type => "longtext", is_nullable => 1 },
220 { data_type => "longtext", is_nullable => 1 },
222 { data_type => "longtext", is_nullable => 1 },
224 { data_type => "longtext", is_nullable => 1 },
226 { data_type => "longtext", is_nullable => 1 },
228 { data_type => "longtext", is_nullable => 1 },
230 { data_type => "tinyint", is_nullable => 1 },
232 { data_type => "varchar", is_nullable => 1, size => 15 },
234 { data_type => "longtext", is_nullable => 1 },
236 { data_type => "mediumtext", is_nullable => 1 },
238 { data_type => "varchar", is_nullable => 1, size => 255 },
240 { data_type => "varchar", is_nullable => 1, size => 16 },
242 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
249 =item * L</branchcode>
255 __PACKAGE__->set_primary_key("branchcode");
259 =head2 account_credit_types_branches
263 Related object: L<Koha::Schema::Result::AccountCreditTypesBranch>
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 },
274 =head2 account_debit_types_branches
278 Related object: L<Koha::Schema::Result::AccountDebitTypesBranch>
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 },
293 Related object: L<Koha::Schema::Result::Accountline>
297 __PACKAGE__->has_many(
299 "Koha::Schema::Result::Accountline",
300 { "foreign.branchcode" => "self.branchcode" },
301 { cascade_copy => 0, cascade_delete => 0 },
308 Related object: L<Koha::Schema::Result::Aqbasket>
312 __PACKAGE__->has_many(
314 "Koha::Schema::Result::Aqbasket",
315 { "foreign.branch" => "self.branchcode" },
316 { cascade_copy => 0, cascade_delete => 0 },
319 =head2 article_requests
323 Related object: L<Koha::Schema::Result::ArticleRequest>
327 __PACKAGE__->has_many(
329 "Koha::Schema::Result::ArticleRequest",
330 { "foreign.branchcode" => "self.branchcode" },
331 { cascade_copy => 0, cascade_delete => 0 },
334 =head2 authorised_values_branches
338 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
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 },
349 =head2 borrower_attribute_types_branches
353 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
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 },
368 Related object: L<Koha::Schema::Result::Borrower>
372 __PACKAGE__->has_many(
374 "Koha::Schema::Result::Borrower",
375 { "foreign.branchcode" => "self.branchcode" },
376 { cascade_copy => 0, cascade_delete => 0 },
379 =head2 branches_overdrive
383 Related object: L<Koha::Schema::Result::BranchesOverdrive>
387 __PACKAGE__->might_have(
388 "branches_overdrive",
389 "Koha::Schema::Result::BranchesOverdrive",
390 { "foreign.branchcode" => "self.branchcode" },
391 { cascade_copy => 0, cascade_delete => 0 },
394 =head2 branchtransfers_frombranches
398 Related object: L<Koha::Schema::Result::Branchtransfer>
402 __PACKAGE__->has_many(
403 "branchtransfers_frombranches",
404 "Koha::Schema::Result::Branchtransfer",
405 { "foreign.frombranch" => "self.branchcode" },
406 { cascade_copy => 0, cascade_delete => 0 },
409 =head2 branchtransfers_tobranches
413 Related object: L<Koha::Schema::Result::Branchtransfer>
417 __PACKAGE__->has_many(
418 "branchtransfers_tobranches",
419 "Koha::Schema::Result::Branchtransfer",
420 { "foreign.tobranch" => "self.branchcode" },
421 { cascade_copy => 0, cascade_delete => 0 },
424 =head2 cash_registers
428 Related object: L<Koha::Schema::Result::CashRegister>
432 __PACKAGE__->has_many(
434 "Koha::Schema::Result::CashRegister",
435 { "foreign.branch" => "self.branchcode" },
436 { cascade_copy => 0, cascade_delete => 0 },
439 =head2 categories_branches
443 Related object: L<Koha::Schema::Result::CategoriesBranch>
447 __PACKAGE__->has_many(
448 "categories_branches",
449 "Koha::Schema::Result::CategoriesBranch",
450 { "foreign.branchcode" => "self.branchcode" },
451 { cascade_copy => 0, cascade_delete => 0 },
454 =head2 circulation_rules
458 Related object: L<Koha::Schema::Result::CirculationRule>
462 __PACKAGE__->has_many(
464 "Koha::Schema::Result::CirculationRule",
465 { "foreign.branchcode" => "self.branchcode" },
466 { cascade_copy => 0, cascade_delete => 0 },
469 =head2 club_enrollments
473 Related object: L<Koha::Schema::Result::ClubEnrollment>
477 __PACKAGE__->has_many(
479 "Koha::Schema::Result::ClubEnrollment",
480 { "foreign.branchcode" => "self.branchcode" },
481 { cascade_copy => 0, cascade_delete => 0 },
484 =head2 club_templates
488 Related object: L<Koha::Schema::Result::ClubTemplate>
492 __PACKAGE__->has_many(
494 "Koha::Schema::Result::ClubTemplate",
495 { "foreign.branchcode" => "self.branchcode" },
496 { cascade_copy => 0, cascade_delete => 0 },
503 Related object: L<Koha::Schema::Result::Club>
507 __PACKAGE__->has_many(
509 "Koha::Schema::Result::Club",
510 { "foreign.branchcode" => "self.branchcode" },
511 { cascade_copy => 0, cascade_delete => 0 },
518 Related object: L<Koha::Schema::Result::Collection>
522 __PACKAGE__->has_many(
524 "Koha::Schema::Result::Collection",
525 { "foreign.colBranchcode" => "self.branchcode" },
526 { cascade_copy => 0, cascade_delete => 0 },
533 Related object: L<Koha::Schema::Result::CourseItem>
537 __PACKAGE__->has_many(
539 "Koha::Schema::Result::CourseItem",
540 { "foreign.holdingbranch" => "self.branchcode" },
541 { cascade_copy => 0, cascade_delete => 0 },
544 =head2 course_items_homebranch_storages
548 Related object: L<Koha::Schema::Result::CourseItem>
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 },
559 =head2 course_items_homebranches
563 Related object: L<Koha::Schema::Result::CourseItem>
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 },
574 =head2 creator_batches
578 Related object: L<Koha::Schema::Result::CreatorBatch>
582 __PACKAGE__->has_many(
584 "Koha::Schema::Result::CreatorBatch",
585 { "foreign.branch_code" => "self.branchcode" },
586 { cascade_copy => 0, cascade_delete => 0 },
593 Related object: L<Koha::Schema::Result::Desk>
597 __PACKAGE__->has_many(
599 "Koha::Schema::Result::Desk",
600 { "foreign.branchcode" => "self.branchcode" },
601 { cascade_copy => 0, cascade_delete => 0 },
608 Related object: L<Koha::Schema::Result::EdifactEan>
612 __PACKAGE__->has_many(
614 "Koha::Schema::Result::EdifactEan",
615 { "foreign.branchcode" => "self.branchcode" },
616 { cascade_copy => 0, cascade_delete => 0 },
619 =head2 hold_fill_targets
623 Related object: L<Koha::Schema::Result::HoldFillTarget>
627 __PACKAGE__->has_many(
629 "Koha::Schema::Result::HoldFillTarget",
630 { "foreign.source_branchcode" => "self.branchcode" },
631 { cascade_copy => 0, cascade_delete => 0 },
638 Related object: L<Koha::Schema::Result::Illrequest>
642 __PACKAGE__->has_many(
644 "Koha::Schema::Result::Illrequest",
645 { "foreign.branchcode" => "self.branchcode" },
646 { cascade_copy => 0, cascade_delete => 0 },
649 =head2 items_holdingbranches
653 Related object: L<Koha::Schema::Result::Item>
657 __PACKAGE__->has_many(
658 "items_holdingbranches",
659 "Koha::Schema::Result::Item",
660 { "foreign.holdingbranch" => "self.branchcode" },
661 { cascade_copy => 0, cascade_delete => 0 },
664 =head2 items_homebranches
668 Related object: L<Koha::Schema::Result::Item>
672 __PACKAGE__->has_many(
673 "items_homebranches",
674 "Koha::Schema::Result::Item",
675 { "foreign.homebranch" => "self.branchcode" },
676 { cascade_copy => 0, cascade_delete => 0 },
679 =head2 itemtypes_branches
683 Related object: L<Koha::Schema::Result::ItemtypesBranch>
687 __PACKAGE__->has_many(
688 "itemtypes_branches",
689 "Koha::Schema::Result::ItemtypesBranch",
690 { "foreign.branchcode" => "self.branchcode" },
691 { cascade_copy => 0, cascade_delete => 0 },
694 =head2 library_groups
698 Related object: L<Koha::Schema::Result::LibraryGroup>
702 __PACKAGE__->has_many(
704 "Koha::Schema::Result::LibraryGroup",
705 { "foreign.branchcode" => "self.branchcode" },
706 { cascade_copy => 0, cascade_delete => 0 },
709 =head2 library_smtp_server
713 Related object: L<Koha::Schema::Result::LibrarySmtpServer>
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 },
728 Related object: L<Koha::Schema::Result::OpacNews>
732 __PACKAGE__->has_many(
734 "Koha::Schema::Result::OpacNews",
735 { "foreign.branchcode" => "self.branchcode" },
736 { cascade_copy => 0, cascade_delete => 0 },
739 =head2 problem_reports
743 Related object: L<Koha::Schema::Result::ProblemReport>
747 __PACKAGE__->has_many(
749 "Koha::Schema::Result::ProblemReport",
750 { "foreign.branchcode" => "self.branchcode" },
751 { cascade_copy => 0, cascade_delete => 0 },
754 =head2 pseudonymized_transactions_branchcodes
758 Related object: L<Koha::Schema::Result::PseudonymizedTransaction>
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 },
769 =head2 pseudonymized_transactions_transaction_branchcodes
773 Related object: L<Koha::Schema::Result::PseudonymizedTransaction>
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 },
784 =head2 repeatable_holidays
788 Related object: L<Koha::Schema::Result::RepeatableHoliday>
792 __PACKAGE__->has_many(
793 "repeatable_holidays",
794 "Koha::Schema::Result::RepeatableHoliday",
795 { "foreign.branchcode" => "self.branchcode" },
796 { cascade_copy => 0, cascade_delete => 0 },
803 Related object: L<Koha::Schema::Result::Reserve>
807 __PACKAGE__->has_many(
809 "Koha::Schema::Result::Reserve",
810 { "foreign.branchcode" => "self.branchcode" },
811 { cascade_copy => 0, cascade_delete => 0 },
814 =head2 special_holidays
818 Related object: L<Koha::Schema::Result::SpecialHoliday>
822 __PACKAGE__->has_many(
824 "Koha::Schema::Result::SpecialHoliday",
825 { "foreign.branchcode" => "self.branchcode" },
826 { cascade_copy => 0, cascade_delete => 0 },
829 =head2 stockrotationstages
833 Related object: L<Koha::Schema::Result::Stockrotationstage>
837 __PACKAGE__->has_many(
838 "stockrotationstages",
839 "Koha::Schema::Result::Stockrotationstage",
840 { "foreign.branchcode_id" => "self.branchcode" },
841 { cascade_copy => 0, cascade_delete => 0 },
848 Related object: L<Koha::Schema::Result::Suggestion>
852 __PACKAGE__->has_many(
854 "Koha::Schema::Result::Suggestion",
855 { "foreign.branchcode" => "self.branchcode" },
856 { cascade_copy => 0, cascade_delete => 0 },
859 =head2 transport_cost_frombranches
863 Related object: L<Koha::Schema::Result::TransportCost>
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 },
874 =head2 transport_cost_tobranches
878 Related object: L<Koha::Schema::Result::TransportCost>
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 },
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
893 __PACKAGE__->add_columns(
894 '+pickup_location' => { is_boolean => 1 }
897 sub koha_object_class {
900 sub koha_objects_class {