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'
123 data_type: 'longtext'
128 data_type: 'mediumtext'
143 =head2 pickup_location
151 __PACKAGE__->add_columns(
153 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
155 { data_type => "longtext", is_nullable => 0 },
157 { data_type => "longtext", is_nullable => 1 },
159 { data_type => "longtext", is_nullable => 1 },
161 { data_type => "longtext", is_nullable => 1 },
163 { data_type => "varchar", is_nullable => 1, size => 25 },
165 { data_type => "longtext", is_nullable => 1 },
167 { data_type => "longtext", is_nullable => 1 },
169 { data_type => "mediumtext", 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 => "longtext", is_nullable => 1 },
179 { data_type => "longtext", is_nullable => 1 },
181 { data_type => "longtext", is_nullable => 1 },
183 { data_type => "tinyint", is_nullable => 1 },
185 { data_type => "varchar", is_nullable => 1, size => 15 },
187 { data_type => "varchar", is_nullable => 1, size => 100 },
189 { data_type => "longtext", is_nullable => 1 },
191 { data_type => "mediumtext", is_nullable => 1 },
193 { data_type => "varchar", is_nullable => 1, size => 255 },
195 { data_type => "varchar", is_nullable => 1, size => 16 },
197 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
204 =item * L</branchcode>
210 __PACKAGE__->set_primary_key("branchcode");
214 =head2 account_credit_types_branches
218 Related object: L<Koha::Schema::Result::AccountCreditTypesBranch>
222 __PACKAGE__->has_many(
223 "account_credit_types_branches",
224 "Koha::Schema::Result::AccountCreditTypesBranch",
225 { "foreign.branchcode" => "self.branchcode" },
226 { cascade_copy => 0, cascade_delete => 0 },
229 =head2 account_debit_types_branches
233 Related object: L<Koha::Schema::Result::AccountDebitTypesBranch>
237 __PACKAGE__->has_many(
238 "account_debit_types_branches",
239 "Koha::Schema::Result::AccountDebitTypesBranch",
240 { "foreign.branchcode" => "self.branchcode" },
241 { cascade_copy => 0, cascade_delete => 0 },
248 Related object: L<Koha::Schema::Result::Accountline>
252 __PACKAGE__->has_many(
254 "Koha::Schema::Result::Accountline",
255 { "foreign.branchcode" => "self.branchcode" },
256 { cascade_copy => 0, cascade_delete => 0 },
263 Related object: L<Koha::Schema::Result::Aqbasket>
267 __PACKAGE__->has_many(
269 "Koha::Schema::Result::Aqbasket",
270 { "foreign.branch" => "self.branchcode" },
271 { cascade_copy => 0, cascade_delete => 0 },
274 =head2 article_requests
278 Related object: L<Koha::Schema::Result::ArticleRequest>
282 __PACKAGE__->has_many(
284 "Koha::Schema::Result::ArticleRequest",
285 { "foreign.branchcode" => "self.branchcode" },
286 { cascade_copy => 0, cascade_delete => 0 },
289 =head2 authorised_values_branches
293 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
297 __PACKAGE__->has_many(
298 "authorised_values_branches",
299 "Koha::Schema::Result::AuthorisedValuesBranch",
300 { "foreign.branchcode" => "self.branchcode" },
301 { cascade_copy => 0, cascade_delete => 0 },
304 =head2 borrower_attribute_types_branches
308 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
312 __PACKAGE__->has_many(
313 "borrower_attribute_types_branches",
314 "Koha::Schema::Result::BorrowerAttributeTypesBranch",
315 { "foreign.b_branchcode" => "self.branchcode" },
316 { cascade_copy => 0, cascade_delete => 0 },
323 Related object: L<Koha::Schema::Result::Borrower>
327 __PACKAGE__->has_many(
329 "Koha::Schema::Result::Borrower",
330 { "foreign.branchcode" => "self.branchcode" },
331 { cascade_copy => 0, cascade_delete => 0 },
334 =head2 branches_overdrive
338 Related object: L<Koha::Schema::Result::BranchesOverdrive>
342 __PACKAGE__->might_have(
343 "branches_overdrive",
344 "Koha::Schema::Result::BranchesOverdrive",
345 { "foreign.branchcode" => "self.branchcode" },
346 { cascade_copy => 0, cascade_delete => 0 },
349 =head2 branchtransfers_frombranches
353 Related object: L<Koha::Schema::Result::Branchtransfer>
357 __PACKAGE__->has_many(
358 "branchtransfers_frombranches",
359 "Koha::Schema::Result::Branchtransfer",
360 { "foreign.frombranch" => "self.branchcode" },
361 { cascade_copy => 0, cascade_delete => 0 },
364 =head2 branchtransfers_tobranches
368 Related object: L<Koha::Schema::Result::Branchtransfer>
372 __PACKAGE__->has_many(
373 "branchtransfers_tobranches",
374 "Koha::Schema::Result::Branchtransfer",
375 { "foreign.tobranch" => "self.branchcode" },
376 { cascade_copy => 0, cascade_delete => 0 },
379 =head2 cash_registers
383 Related object: L<Koha::Schema::Result::CashRegister>
387 __PACKAGE__->has_many(
389 "Koha::Schema::Result::CashRegister",
390 { "foreign.branch" => "self.branchcode" },
391 { cascade_copy => 0, cascade_delete => 0 },
394 =head2 categories_branches
398 Related object: L<Koha::Schema::Result::CategoriesBranch>
402 __PACKAGE__->has_many(
403 "categories_branches",
404 "Koha::Schema::Result::CategoriesBranch",
405 { "foreign.branchcode" => "self.branchcode" },
406 { cascade_copy => 0, cascade_delete => 0 },
409 =head2 circulation_rules
413 Related object: L<Koha::Schema::Result::CirculationRule>
417 __PACKAGE__->has_many(
419 "Koha::Schema::Result::CirculationRule",
420 { "foreign.branchcode" => "self.branchcode" },
421 { cascade_copy => 0, cascade_delete => 0 },
424 =head2 club_enrollments
428 Related object: L<Koha::Schema::Result::ClubEnrollment>
432 __PACKAGE__->has_many(
434 "Koha::Schema::Result::ClubEnrollment",
435 { "foreign.branchcode" => "self.branchcode" },
436 { cascade_copy => 0, cascade_delete => 0 },
439 =head2 club_templates
443 Related object: L<Koha::Schema::Result::ClubTemplate>
447 __PACKAGE__->has_many(
449 "Koha::Schema::Result::ClubTemplate",
450 { "foreign.branchcode" => "self.branchcode" },
451 { cascade_copy => 0, cascade_delete => 0 },
458 Related object: L<Koha::Schema::Result::Club>
462 __PACKAGE__->has_many(
464 "Koha::Schema::Result::Club",
465 { "foreign.branchcode" => "self.branchcode" },
466 { cascade_copy => 0, cascade_delete => 0 },
473 Related object: L<Koha::Schema::Result::Collection>
477 __PACKAGE__->has_many(
479 "Koha::Schema::Result::Collection",
480 { "foreign.colBranchcode" => "self.branchcode" },
481 { cascade_copy => 0, cascade_delete => 0 },
488 Related object: L<Koha::Schema::Result::CourseItem>
492 __PACKAGE__->has_many(
494 "Koha::Schema::Result::CourseItem",
495 { "foreign.holdingbranch" => "self.branchcode" },
496 { cascade_copy => 0, cascade_delete => 0 },
499 =head2 creator_batches
503 Related object: L<Koha::Schema::Result::CreatorBatch>
507 __PACKAGE__->has_many(
509 "Koha::Schema::Result::CreatorBatch",
510 { "foreign.branch_code" => "self.branchcode" },
511 { cascade_copy => 0, cascade_delete => 0 },
518 Related object: L<Koha::Schema::Result::EdifactEan>
522 __PACKAGE__->has_many(
524 "Koha::Schema::Result::EdifactEan",
525 { "foreign.branchcode" => "self.branchcode" },
526 { cascade_copy => 0, cascade_delete => 0 },
529 =head2 hold_fill_targets
533 Related object: L<Koha::Schema::Result::HoldFillTarget>
537 __PACKAGE__->has_many(
539 "Koha::Schema::Result::HoldFillTarget",
540 { "foreign.source_branchcode" => "self.branchcode" },
541 { cascade_copy => 0, cascade_delete => 0 },
548 Related object: L<Koha::Schema::Result::Illrequest>
552 __PACKAGE__->has_many(
554 "Koha::Schema::Result::Illrequest",
555 { "foreign.branchcode" => "self.branchcode" },
556 { cascade_copy => 0, cascade_delete => 0 },
559 =head2 items_holdingbranches
563 Related object: L<Koha::Schema::Result::Item>
567 __PACKAGE__->has_many(
568 "items_holdingbranches",
569 "Koha::Schema::Result::Item",
570 { "foreign.holdingbranch" => "self.branchcode" },
571 { cascade_copy => 0, cascade_delete => 0 },
574 =head2 items_homebranches
578 Related object: L<Koha::Schema::Result::Item>
582 __PACKAGE__->has_many(
583 "items_homebranches",
584 "Koha::Schema::Result::Item",
585 { "foreign.homebranch" => "self.branchcode" },
586 { cascade_copy => 0, cascade_delete => 0 },
589 =head2 itemtypes_branches
593 Related object: L<Koha::Schema::Result::ItemtypesBranch>
597 __PACKAGE__->has_many(
598 "itemtypes_branches",
599 "Koha::Schema::Result::ItemtypesBranch",
600 { "foreign.branchcode" => "self.branchcode" },
601 { cascade_copy => 0, cascade_delete => 0 },
604 =head2 library_groups
608 Related object: L<Koha::Schema::Result::LibraryGroup>
612 __PACKAGE__->has_many(
614 "Koha::Schema::Result::LibraryGroup",
615 { "foreign.branchcode" => "self.branchcode" },
616 { cascade_copy => 0, cascade_delete => 0 },
623 Related object: L<Koha::Schema::Result::OpacNews>
627 __PACKAGE__->has_many(
629 "Koha::Schema::Result::OpacNews",
630 { "foreign.branchcode" => "self.branchcode" },
631 { cascade_copy => 0, cascade_delete => 0 },
638 Related object: L<Koha::Schema::Result::Reserve>
642 __PACKAGE__->has_many(
644 "Koha::Schema::Result::Reserve",
645 { "foreign.branchcode" => "self.branchcode" },
646 { cascade_copy => 0, cascade_delete => 0 },
649 =head2 stockrotationstages
653 Related object: L<Koha::Schema::Result::Stockrotationstage>
657 __PACKAGE__->has_many(
658 "stockrotationstages",
659 "Koha::Schema::Result::Stockrotationstage",
660 { "foreign.branchcode_id" => "self.branchcode" },
661 { cascade_copy => 0, cascade_delete => 0 },
668 Related object: L<Koha::Schema::Result::Suggestion>
672 __PACKAGE__->has_many(
674 "Koha::Schema::Result::Suggestion",
675 { "foreign.branchcode" => "self.branchcode" },
676 { cascade_copy => 0, cascade_delete => 0 },
679 =head2 transport_cost_frombranches
683 Related object: L<Koha::Schema::Result::TransportCost>
687 __PACKAGE__->has_many(
688 "transport_cost_frombranches",
689 "Koha::Schema::Result::TransportCost",
690 { "foreign.frombranch" => "self.branchcode" },
691 { cascade_copy => 0, cascade_delete => 0 },
694 =head2 transport_cost_tobranches
698 Related object: L<Koha::Schema::Result::TransportCost>
702 __PACKAGE__->has_many(
703 "transport_cost_tobranches",
704 "Koha::Schema::Result::TransportCost",
705 { "foreign.tobranch" => "self.branchcode" },
706 { cascade_copy => 0, cascade_delete => 0 },
710 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-14 09:59:52
711 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vWDJAm3K2jiyRS3htyip6A
713 __PACKAGE__->add_columns(
714 '+pickup_location' => { is_boolean => 1 }
717 sub koha_object_class {
720 sub koha_objects_class {