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::Aqbasket>
222 __PACKAGE__->has_many(
224 "Koha::Schema::Result::Aqbasket",
225 { "foreign.branch" => "self.branchcode" },
226 { cascade_copy => 0, cascade_delete => 0 },
229 =head2 article_requests
233 Related object: L<Koha::Schema::Result::ArticleRequest>
237 __PACKAGE__->has_many(
239 "Koha::Schema::Result::ArticleRequest",
240 { "foreign.branchcode" => "self.branchcode" },
241 { cascade_copy => 0, cascade_delete => 0 },
244 =head2 authorised_values_branches
248 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
252 __PACKAGE__->has_many(
253 "authorised_values_branches",
254 "Koha::Schema::Result::AuthorisedValuesBranch",
255 { "foreign.branchcode" => "self.branchcode" },
256 { cascade_copy => 0, cascade_delete => 0 },
259 =head2 borrower_attribute_types_branches
263 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
267 __PACKAGE__->has_many(
268 "borrower_attribute_types_branches",
269 "Koha::Schema::Result::BorrowerAttributeTypesBranch",
270 { "foreign.b_branchcode" => "self.branchcode" },
271 { cascade_copy => 0, cascade_delete => 0 },
278 Related object: L<Koha::Schema::Result::Borrower>
282 __PACKAGE__->has_many(
284 "Koha::Schema::Result::Borrower",
285 { "foreign.branchcode" => "self.branchcode" },
286 { cascade_copy => 0, cascade_delete => 0 },
289 =head2 branch_borrower_circ_rules
293 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
297 __PACKAGE__->has_many(
298 "branch_borrower_circ_rules",
299 "Koha::Schema::Result::BranchBorrowerCircRule",
300 { "foreign.branchcode" => "self.branchcode" },
301 { cascade_copy => 0, cascade_delete => 0 },
304 =head2 branch_item_rules
308 Related object: L<Koha::Schema::Result::BranchItemRule>
312 __PACKAGE__->has_many(
314 "Koha::Schema::Result::BranchItemRule",
315 { "foreign.branchcode" => "self.branchcode" },
316 { cascade_copy => 0, cascade_delete => 0 },
319 =head2 branches_overdrive
323 Related object: L<Koha::Schema::Result::BranchesOverdrive>
327 __PACKAGE__->might_have(
328 "branches_overdrive",
329 "Koha::Schema::Result::BranchesOverdrive",
330 { "foreign.branchcode" => "self.branchcode" },
331 { cascade_copy => 0, cascade_delete => 0 },
334 =head2 branchtransfers_frombranches
338 Related object: L<Koha::Schema::Result::Branchtransfer>
342 __PACKAGE__->has_many(
343 "branchtransfers_frombranches",
344 "Koha::Schema::Result::Branchtransfer",
345 { "foreign.frombranch" => "self.branchcode" },
346 { cascade_copy => 0, cascade_delete => 0 },
349 =head2 branchtransfers_tobranches
353 Related object: L<Koha::Schema::Result::Branchtransfer>
357 __PACKAGE__->has_many(
358 "branchtransfers_tobranches",
359 "Koha::Schema::Result::Branchtransfer",
360 { "foreign.tobranch" => "self.branchcode" },
361 { cascade_copy => 0, cascade_delete => 0 },
364 =head2 categories_branches
368 Related object: L<Koha::Schema::Result::CategoriesBranch>
372 __PACKAGE__->has_many(
373 "categories_branches",
374 "Koha::Schema::Result::CategoriesBranch",
375 { "foreign.branchcode" => "self.branchcode" },
376 { cascade_copy => 0, cascade_delete => 0 },
379 =head2 circulation_rules
383 Related object: L<Koha::Schema::Result::CirculationRule>
387 __PACKAGE__->has_many(
389 "Koha::Schema::Result::CirculationRule",
390 { "foreign.branchcode" => "self.branchcode" },
391 { cascade_copy => 0, cascade_delete => 0 },
394 =head2 club_enrollments
398 Related object: L<Koha::Schema::Result::ClubEnrollment>
402 __PACKAGE__->has_many(
404 "Koha::Schema::Result::ClubEnrollment",
405 { "foreign.branchcode" => "self.branchcode" },
406 { cascade_copy => 0, cascade_delete => 0 },
409 =head2 club_templates
413 Related object: L<Koha::Schema::Result::ClubTemplate>
417 __PACKAGE__->has_many(
419 "Koha::Schema::Result::ClubTemplate",
420 { "foreign.branchcode" => "self.branchcode" },
421 { cascade_copy => 0, cascade_delete => 0 },
428 Related object: L<Koha::Schema::Result::Club>
432 __PACKAGE__->has_many(
434 "Koha::Schema::Result::Club",
435 { "foreign.branchcode" => "self.branchcode" },
436 { cascade_copy => 0, cascade_delete => 0 },
443 Related object: L<Koha::Schema::Result::Collection>
447 __PACKAGE__->has_many(
449 "Koha::Schema::Result::Collection",
450 { "foreign.colBranchcode" => "self.branchcode" },
451 { cascade_copy => 0, cascade_delete => 0 },
458 Related object: L<Koha::Schema::Result::CourseItem>
462 __PACKAGE__->has_many(
464 "Koha::Schema::Result::CourseItem",
465 { "foreign.holdingbranch" => "self.branchcode" },
466 { cascade_copy => 0, cascade_delete => 0 },
469 =head2 creator_batches
473 Related object: L<Koha::Schema::Result::CreatorBatch>
477 __PACKAGE__->has_many(
479 "Koha::Schema::Result::CreatorBatch",
480 { "foreign.branch_code" => "self.branchcode" },
481 { cascade_copy => 0, cascade_delete => 0 },
484 =head2 default_branch_circ_rule
488 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
492 __PACKAGE__->might_have(
493 "default_branch_circ_rule",
494 "Koha::Schema::Result::DefaultBranchCircRule",
495 { "foreign.branchcode" => "self.branchcode" },
496 { cascade_copy => 0, cascade_delete => 0 },
503 Related object: L<Koha::Schema::Result::EdifactEan>
507 __PACKAGE__->has_many(
509 "Koha::Schema::Result::EdifactEan",
510 { "foreign.branchcode" => "self.branchcode" },
511 { cascade_copy => 0, cascade_delete => 0 },
514 =head2 hold_fill_targets
518 Related object: L<Koha::Schema::Result::HoldFillTarget>
522 __PACKAGE__->has_many(
524 "Koha::Schema::Result::HoldFillTarget",
525 { "foreign.source_branchcode" => "self.branchcode" },
526 { cascade_copy => 0, cascade_delete => 0 },
533 Related object: L<Koha::Schema::Result::Illrequest>
537 __PACKAGE__->has_many(
539 "Koha::Schema::Result::Illrequest",
540 { "foreign.branchcode" => "self.branchcode" },
541 { cascade_copy => 0, cascade_delete => 0 },
544 =head2 items_holdingbranches
548 Related object: L<Koha::Schema::Result::Item>
552 __PACKAGE__->has_many(
553 "items_holdingbranches",
554 "Koha::Schema::Result::Item",
555 { "foreign.holdingbranch" => "self.branchcode" },
556 { cascade_copy => 0, cascade_delete => 0 },
559 =head2 items_homebranches
563 Related object: L<Koha::Schema::Result::Item>
567 __PACKAGE__->has_many(
568 "items_homebranches",
569 "Koha::Schema::Result::Item",
570 { "foreign.homebranch" => "self.branchcode" },
571 { cascade_copy => 0, cascade_delete => 0 },
574 =head2 library_groups
578 Related object: L<Koha::Schema::Result::LibraryGroup>
582 __PACKAGE__->has_many(
584 "Koha::Schema::Result::LibraryGroup",
585 { "foreign.branchcode" => "self.branchcode" },
586 { cascade_copy => 0, cascade_delete => 0 },
593 Related object: L<Koha::Schema::Result::OpacNews>
597 __PACKAGE__->has_many(
599 "Koha::Schema::Result::OpacNews",
600 { "foreign.branchcode" => "self.branchcode" },
601 { cascade_copy => 0, cascade_delete => 0 },
608 Related object: L<Koha::Schema::Result::Reserve>
612 __PACKAGE__->has_many(
614 "Koha::Schema::Result::Reserve",
615 { "foreign.branchcode" => "self.branchcode" },
616 { cascade_copy => 0, cascade_delete => 0 },
619 =head2 stockrotationstages
623 Related object: L<Koha::Schema::Result::Stockrotationstage>
627 __PACKAGE__->has_many(
628 "stockrotationstages",
629 "Koha::Schema::Result::Stockrotationstage",
630 { "foreign.branchcode_id" => "self.branchcode" },
631 { cascade_copy => 0, cascade_delete => 0 },
634 =head2 transport_cost_frombranches
638 Related object: L<Koha::Schema::Result::TransportCost>
642 __PACKAGE__->has_many(
643 "transport_cost_frombranches",
644 "Koha::Schema::Result::TransportCost",
645 { "foreign.frombranch" => "self.branchcode" },
646 { cascade_copy => 0, cascade_delete => 0 },
649 =head2 transport_cost_tobranches
653 Related object: L<Koha::Schema::Result::TransportCost>
657 __PACKAGE__->has_many(
658 "transport_cost_tobranches",
659 "Koha::Schema::Result::TransportCost",
660 { "foreign.tobranch" => "self.branchcode" },
661 { cascade_copy => 0, cascade_delete => 0 },
665 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-09 15:50:42
666 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0yMUX1UukdV7eMol06JXTQ
669 # You can replace this text with custom code or comments, and it will be preserved on regeneration
671 sub koha_objects_class {