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");
218 Related object: L<Koha::Schema::Result::Accountline>
222 __PACKAGE__->has_many(
224 "Koha::Schema::Result::Accountline",
225 { "foreign.branchcode" => "self.branchcode" },
226 { cascade_copy => 0, cascade_delete => 0 },
233 Related object: L<Koha::Schema::Result::Aqbasket>
237 __PACKAGE__->has_many(
239 "Koha::Schema::Result::Aqbasket",
240 { "foreign.branch" => "self.branchcode" },
241 { cascade_copy => 0, cascade_delete => 0 },
244 =head2 article_requests
248 Related object: L<Koha::Schema::Result::ArticleRequest>
252 __PACKAGE__->has_many(
254 "Koha::Schema::Result::ArticleRequest",
255 { "foreign.branchcode" => "self.branchcode" },
256 { cascade_copy => 0, cascade_delete => 0 },
259 =head2 authorised_values_branches
263 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
267 __PACKAGE__->has_many(
268 "authorised_values_branches",
269 "Koha::Schema::Result::AuthorisedValuesBranch",
270 { "foreign.branchcode" => "self.branchcode" },
271 { cascade_copy => 0, cascade_delete => 0 },
274 =head2 borrower_attribute_types_branches
278 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
282 __PACKAGE__->has_many(
283 "borrower_attribute_types_branches",
284 "Koha::Schema::Result::BorrowerAttributeTypesBranch",
285 { "foreign.b_branchcode" => "self.branchcode" },
286 { cascade_copy => 0, cascade_delete => 0 },
293 Related object: L<Koha::Schema::Result::Borrower>
297 __PACKAGE__->has_many(
299 "Koha::Schema::Result::Borrower",
300 { "foreign.branchcode" => "self.branchcode" },
301 { cascade_copy => 0, cascade_delete => 0 },
304 =head2 branch_borrower_circ_rules
308 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
312 __PACKAGE__->has_many(
313 "branch_borrower_circ_rules",
314 "Koha::Schema::Result::BranchBorrowerCircRule",
315 { "foreign.branchcode" => "self.branchcode" },
316 { cascade_copy => 0, cascade_delete => 0 },
319 =head2 branch_item_rules
323 Related object: L<Koha::Schema::Result::BranchItemRule>
327 __PACKAGE__->has_many(
329 "Koha::Schema::Result::BranchItemRule",
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 categories_branches
383 Related object: L<Koha::Schema::Result::CategoriesBranch>
387 __PACKAGE__->has_many(
388 "categories_branches",
389 "Koha::Schema::Result::CategoriesBranch",
390 { "foreign.branchcode" => "self.branchcode" },
391 { cascade_copy => 0, cascade_delete => 0 },
394 =head2 circulation_rules
398 Related object: L<Koha::Schema::Result::CirculationRule>
402 __PACKAGE__->has_many(
404 "Koha::Schema::Result::CirculationRule",
405 { "foreign.branchcode" => "self.branchcode" },
406 { cascade_copy => 0, cascade_delete => 0 },
409 =head2 club_enrollments
413 Related object: L<Koha::Schema::Result::ClubEnrollment>
417 __PACKAGE__->has_many(
419 "Koha::Schema::Result::ClubEnrollment",
420 { "foreign.branchcode" => "self.branchcode" },
421 { cascade_copy => 0, cascade_delete => 0 },
424 =head2 club_templates
428 Related object: L<Koha::Schema::Result::ClubTemplate>
432 __PACKAGE__->has_many(
434 "Koha::Schema::Result::ClubTemplate",
435 { "foreign.branchcode" => "self.branchcode" },
436 { cascade_copy => 0, cascade_delete => 0 },
443 Related object: L<Koha::Schema::Result::Club>
447 __PACKAGE__->has_many(
449 "Koha::Schema::Result::Club",
450 { "foreign.branchcode" => "self.branchcode" },
451 { cascade_copy => 0, cascade_delete => 0 },
458 Related object: L<Koha::Schema::Result::Collection>
462 __PACKAGE__->has_many(
464 "Koha::Schema::Result::Collection",
465 { "foreign.colBranchcode" => "self.branchcode" },
466 { cascade_copy => 0, cascade_delete => 0 },
473 Related object: L<Koha::Schema::Result::CourseItem>
477 __PACKAGE__->has_many(
479 "Koha::Schema::Result::CourseItem",
480 { "foreign.holdingbranch" => "self.branchcode" },
481 { cascade_copy => 0, cascade_delete => 0 },
484 =head2 creator_batches
488 Related object: L<Koha::Schema::Result::CreatorBatch>
492 __PACKAGE__->has_many(
494 "Koha::Schema::Result::CreatorBatch",
495 { "foreign.branch_code" => "self.branchcode" },
496 { cascade_copy => 0, cascade_delete => 0 },
499 =head2 default_branch_circ_rule
503 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
507 __PACKAGE__->might_have(
508 "default_branch_circ_rule",
509 "Koha::Schema::Result::DefaultBranchCircRule",
510 { "foreign.branchcode" => "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 library_groups
593 Related object: L<Koha::Schema::Result::LibraryGroup>
597 __PACKAGE__->has_many(
599 "Koha::Schema::Result::LibraryGroup",
600 { "foreign.branchcode" => "self.branchcode" },
601 { cascade_copy => 0, cascade_delete => 0 },
608 Related object: L<Koha::Schema::Result::OpacNews>
612 __PACKAGE__->has_many(
614 "Koha::Schema::Result::OpacNews",
615 { "foreign.branchcode" => "self.branchcode" },
616 { cascade_copy => 0, cascade_delete => 0 },
623 Related object: L<Koha::Schema::Result::Reserve>
627 __PACKAGE__->has_many(
629 "Koha::Schema::Result::Reserve",
630 { "foreign.branchcode" => "self.branchcode" },
631 { cascade_copy => 0, cascade_delete => 0 },
634 =head2 stockrotationstages
638 Related object: L<Koha::Schema::Result::Stockrotationstage>
642 __PACKAGE__->has_many(
643 "stockrotationstages",
644 "Koha::Schema::Result::Stockrotationstage",
645 { "foreign.branchcode_id" => "self.branchcode" },
646 { cascade_copy => 0, cascade_delete => 0 },
649 =head2 transport_cost_frombranches
653 Related object: L<Koha::Schema::Result::TransportCost>
657 __PACKAGE__->has_many(
658 "transport_cost_frombranches",
659 "Koha::Schema::Result::TransportCost",
660 { "foreign.frombranch" => "self.branchcode" },
661 { cascade_copy => 0, cascade_delete => 0 },
664 =head2 transport_cost_tobranches
668 Related object: L<Koha::Schema::Result::TransportCost>
672 __PACKAGE__->has_many(
673 "transport_cost_tobranches",
674 "Koha::Schema::Result::TransportCost",
675 { "foreign.tobranch" => "self.branchcode" },
676 { cascade_copy => 0, cascade_delete => 0 },
680 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-01-03 16:10:04
681 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WyXH3sMlyuJIx0fd31RswA
683 __PACKAGE__->add_columns(
684 '+pickup_location' => { is_boolean => 1 }
687 sub koha_objects_class {