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)
71 data_type: 'mediumtext'
94 =head2 branchreturnpath
101 data_type: 'longtext'
117 data_type: 'longtext'
122 data_type: 'mediumtext'
137 =head2 pickup_location
145 __PACKAGE__->add_columns(
147 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
149 { data_type => "longtext", is_nullable => 0 },
151 { data_type => "longtext", is_nullable => 1 },
153 { data_type => "longtext", is_nullable => 1 },
155 { data_type => "longtext", is_nullable => 1 },
157 { data_type => "varchar", is_nullable => 1, size => 25 },
159 { data_type => "longtext", is_nullable => 1 },
161 { data_type => "longtext", is_nullable => 1 },
163 { data_type => "mediumtext", is_nullable => 1 },
165 { data_type => "longtext", is_nullable => 1 },
167 { data_type => "longtext", is_nullable => 1 },
169 { data_type => "longtext", is_nullable => 1 },
171 { data_type => "longtext", is_nullable => 1 },
173 { data_type => "longtext", is_nullable => 1 },
175 { data_type => "longtext", is_nullable => 1 },
177 { data_type => "tinyint", is_nullable => 1 },
179 { data_type => "varchar", is_nullable => 1, size => 15 },
181 { data_type => "longtext", is_nullable => 1 },
183 { data_type => "mediumtext", is_nullable => 1 },
185 { data_type => "varchar", is_nullable => 1, size => 255 },
187 { data_type => "varchar", is_nullable => 1, size => 16 },
189 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
196 =item * L</branchcode>
202 __PACKAGE__->set_primary_key("branchcode");
206 =head2 account_credit_types_branches
210 Related object: L<Koha::Schema::Result::AccountCreditTypesBranch>
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 },
221 =head2 account_debit_types_branches
225 Related object: L<Koha::Schema::Result::AccountDebitTypesBranch>
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 },
240 Related object: L<Koha::Schema::Result::Accountline>
244 __PACKAGE__->has_many(
246 "Koha::Schema::Result::Accountline",
247 { "foreign.branchcode" => "self.branchcode" },
248 { cascade_copy => 0, cascade_delete => 0 },
255 Related object: L<Koha::Schema::Result::Aqbasket>
259 __PACKAGE__->has_many(
261 "Koha::Schema::Result::Aqbasket",
262 { "foreign.branch" => "self.branchcode" },
263 { cascade_copy => 0, cascade_delete => 0 },
266 =head2 article_requests
270 Related object: L<Koha::Schema::Result::ArticleRequest>
274 __PACKAGE__->has_many(
276 "Koha::Schema::Result::ArticleRequest",
277 { "foreign.branchcode" => "self.branchcode" },
278 { cascade_copy => 0, cascade_delete => 0 },
281 =head2 authorised_values_branches
285 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
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 },
296 =head2 borrower_attribute_types_branches
300 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
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 },
315 Related object: L<Koha::Schema::Result::Borrower>
319 __PACKAGE__->has_many(
321 "Koha::Schema::Result::Borrower",
322 { "foreign.branchcode" => "self.branchcode" },
323 { cascade_copy => 0, cascade_delete => 0 },
326 =head2 branches_overdrive
330 Related object: L<Koha::Schema::Result::BranchesOverdrive>
334 __PACKAGE__->might_have(
335 "branches_overdrive",
336 "Koha::Schema::Result::BranchesOverdrive",
337 { "foreign.branchcode" => "self.branchcode" },
338 { cascade_copy => 0, cascade_delete => 0 },
341 =head2 branchtransfers_frombranches
345 Related object: L<Koha::Schema::Result::Branchtransfer>
349 __PACKAGE__->has_many(
350 "branchtransfers_frombranches",
351 "Koha::Schema::Result::Branchtransfer",
352 { "foreign.frombranch" => "self.branchcode" },
353 { cascade_copy => 0, cascade_delete => 0 },
356 =head2 branchtransfers_tobranches
360 Related object: L<Koha::Schema::Result::Branchtransfer>
364 __PACKAGE__->has_many(
365 "branchtransfers_tobranches",
366 "Koha::Schema::Result::Branchtransfer",
367 { "foreign.tobranch" => "self.branchcode" },
368 { cascade_copy => 0, cascade_delete => 0 },
371 =head2 cash_registers
375 Related object: L<Koha::Schema::Result::CashRegister>
379 __PACKAGE__->has_many(
381 "Koha::Schema::Result::CashRegister",
382 { "foreign.branch" => "self.branchcode" },
383 { cascade_copy => 0, cascade_delete => 0 },
386 =head2 categories_branches
390 Related object: L<Koha::Schema::Result::CategoriesBranch>
394 __PACKAGE__->has_many(
395 "categories_branches",
396 "Koha::Schema::Result::CategoriesBranch",
397 { "foreign.branchcode" => "self.branchcode" },
398 { cascade_copy => 0, cascade_delete => 0 },
401 =head2 circulation_rules
405 Related object: L<Koha::Schema::Result::CirculationRule>
409 __PACKAGE__->has_many(
411 "Koha::Schema::Result::CirculationRule",
412 { "foreign.branchcode" => "self.branchcode" },
413 { cascade_copy => 0, cascade_delete => 0 },
416 =head2 club_enrollments
420 Related object: L<Koha::Schema::Result::ClubEnrollment>
424 __PACKAGE__->has_many(
426 "Koha::Schema::Result::ClubEnrollment",
427 { "foreign.branchcode" => "self.branchcode" },
428 { cascade_copy => 0, cascade_delete => 0 },
431 =head2 club_templates
435 Related object: L<Koha::Schema::Result::ClubTemplate>
439 __PACKAGE__->has_many(
441 "Koha::Schema::Result::ClubTemplate",
442 { "foreign.branchcode" => "self.branchcode" },
443 { cascade_copy => 0, cascade_delete => 0 },
450 Related object: L<Koha::Schema::Result::Club>
454 __PACKAGE__->has_many(
456 "Koha::Schema::Result::Club",
457 { "foreign.branchcode" => "self.branchcode" },
458 { cascade_copy => 0, cascade_delete => 0 },
465 Related object: L<Koha::Schema::Result::Collection>
469 __PACKAGE__->has_many(
471 "Koha::Schema::Result::Collection",
472 { "foreign.colBranchcode" => "self.branchcode" },
473 { cascade_copy => 0, cascade_delete => 0 },
480 Related object: L<Koha::Schema::Result::CourseItem>
484 __PACKAGE__->has_many(
486 "Koha::Schema::Result::CourseItem",
487 { "foreign.holdingbranch" => "self.branchcode" },
488 { cascade_copy => 0, cascade_delete => 0 },
491 =head2 course_items_homebranch_storages
495 Related object: L<Koha::Schema::Result::CourseItem>
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 },
506 =head2 course_items_homebranches
510 Related object: L<Koha::Schema::Result::CourseItem>
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 },
521 =head2 creator_batches
525 Related object: L<Koha::Schema::Result::CreatorBatch>
529 __PACKAGE__->has_many(
531 "Koha::Schema::Result::CreatorBatch",
532 { "foreign.branch_code" => "self.branchcode" },
533 { cascade_copy => 0, cascade_delete => 0 },
540 Related object: L<Koha::Schema::Result::Desk>
544 __PACKAGE__->has_many(
546 "Koha::Schema::Result::Desk",
547 { "foreign.branchcode" => "self.branchcode" },
548 { cascade_copy => 0, cascade_delete => 0 },
555 Related object: L<Koha::Schema::Result::EdifactEan>
559 __PACKAGE__->has_many(
561 "Koha::Schema::Result::EdifactEan",
562 { "foreign.branchcode" => "self.branchcode" },
563 { cascade_copy => 0, cascade_delete => 0 },
566 =head2 hold_fill_targets
570 Related object: L<Koha::Schema::Result::HoldFillTarget>
574 __PACKAGE__->has_many(
576 "Koha::Schema::Result::HoldFillTarget",
577 { "foreign.source_branchcode" => "self.branchcode" },
578 { cascade_copy => 0, cascade_delete => 0 },
585 Related object: L<Koha::Schema::Result::Illrequest>
589 __PACKAGE__->has_many(
591 "Koha::Schema::Result::Illrequest",
592 { "foreign.branchcode" => "self.branchcode" },
593 { cascade_copy => 0, cascade_delete => 0 },
596 =head2 items_holdingbranches
600 Related object: L<Koha::Schema::Result::Item>
604 __PACKAGE__->has_many(
605 "items_holdingbranches",
606 "Koha::Schema::Result::Item",
607 { "foreign.holdingbranch" => "self.branchcode" },
608 { cascade_copy => 0, cascade_delete => 0 },
611 =head2 items_homebranches
615 Related object: L<Koha::Schema::Result::Item>
619 __PACKAGE__->has_many(
620 "items_homebranches",
621 "Koha::Schema::Result::Item",
622 { "foreign.homebranch" => "self.branchcode" },
623 { cascade_copy => 0, cascade_delete => 0 },
626 =head2 itemtypes_branches
630 Related object: L<Koha::Schema::Result::ItemtypesBranch>
634 __PACKAGE__->has_many(
635 "itemtypes_branches",
636 "Koha::Schema::Result::ItemtypesBranch",
637 { "foreign.branchcode" => "self.branchcode" },
638 { cascade_copy => 0, cascade_delete => 0 },
641 =head2 library_groups
645 Related object: L<Koha::Schema::Result::LibraryGroup>
649 __PACKAGE__->has_many(
651 "Koha::Schema::Result::LibraryGroup",
652 { "foreign.branchcode" => "self.branchcode" },
653 { cascade_copy => 0, cascade_delete => 0 },
656 =head2 library_smtp_server
660 Related object: L<Koha::Schema::Result::LibrarySmtpServer>
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 },
675 Related object: L<Koha::Schema::Result::OpacNews>
679 __PACKAGE__->has_many(
681 "Koha::Schema::Result::OpacNews",
682 { "foreign.branchcode" => "self.branchcode" },
683 { cascade_copy => 0, cascade_delete => 0 },
686 =head2 problem_reports
690 Related object: L<Koha::Schema::Result::ProblemReport>
694 __PACKAGE__->has_many(
696 "Koha::Schema::Result::ProblemReport",
697 { "foreign.branchcode" => "self.branchcode" },
698 { cascade_copy => 0, cascade_delete => 0 },
701 =head2 pseudonymized_transactions_branchcodes
705 Related object: L<Koha::Schema::Result::PseudonymizedTransaction>
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 },
716 =head2 pseudonymized_transactions_transaction_branchcodes
720 Related object: L<Koha::Schema::Result::PseudonymizedTransaction>
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 },
731 =head2 repeatable_holidays
735 Related object: L<Koha::Schema::Result::RepeatableHoliday>
739 __PACKAGE__->has_many(
740 "repeatable_holidays",
741 "Koha::Schema::Result::RepeatableHoliday",
742 { "foreign.branchcode" => "self.branchcode" },
743 { cascade_copy => 0, cascade_delete => 0 },
750 Related object: L<Koha::Schema::Result::Reserve>
754 __PACKAGE__->has_many(
756 "Koha::Schema::Result::Reserve",
757 { "foreign.branchcode" => "self.branchcode" },
758 { cascade_copy => 0, cascade_delete => 0 },
761 =head2 special_holidays
765 Related object: L<Koha::Schema::Result::SpecialHoliday>
769 __PACKAGE__->has_many(
771 "Koha::Schema::Result::SpecialHoliday",
772 { "foreign.branchcode" => "self.branchcode" },
773 { cascade_copy => 0, cascade_delete => 0 },
776 =head2 stockrotationstages
780 Related object: L<Koha::Schema::Result::Stockrotationstage>
784 __PACKAGE__->has_many(
785 "stockrotationstages",
786 "Koha::Schema::Result::Stockrotationstage",
787 { "foreign.branchcode_id" => "self.branchcode" },
788 { cascade_copy => 0, cascade_delete => 0 },
795 Related object: L<Koha::Schema::Result::Suggestion>
799 __PACKAGE__->has_many(
801 "Koha::Schema::Result::Suggestion",
802 { "foreign.branchcode" => "self.branchcode" },
803 { cascade_copy => 0, cascade_delete => 0 },
806 =head2 transport_cost_frombranches
810 Related object: L<Koha::Schema::Result::TransportCost>
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 },
821 =head2 transport_cost_tobranches
825 Related object: L<Koha::Schema::Result::TransportCost>
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 },
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
840 __PACKAGE__->add_columns(
841 '+pickup_location' => { is_boolean => 1 }
844 sub koha_object_class {
847 sub koha_objects_class {