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 branchtransfers_frombranches
323 Related object: L<Koha::Schema::Result::Branchtransfer>
327 __PACKAGE__->has_many(
328 "branchtransfers_frombranches",
329 "Koha::Schema::Result::Branchtransfer",
330 { "foreign.frombranch" => "self.branchcode" },
331 { cascade_copy => 0, cascade_delete => 0 },
334 =head2 branchtransfers_tobranches
338 Related object: L<Koha::Schema::Result::Branchtransfer>
342 __PACKAGE__->has_many(
343 "branchtransfers_tobranches",
344 "Koha::Schema::Result::Branchtransfer",
345 { "foreign.tobranch" => "self.branchcode" },
346 { cascade_copy => 0, cascade_delete => 0 },
349 =head2 categories_branches
353 Related object: L<Koha::Schema::Result::CategoriesBranch>
357 __PACKAGE__->has_many(
358 "categories_branches",
359 "Koha::Schema::Result::CategoriesBranch",
360 { "foreign.branchcode" => "self.branchcode" },
361 { cascade_copy => 0, cascade_delete => 0 },
364 =head2 circulation_rules
368 Related object: L<Koha::Schema::Result::CirculationRule>
372 __PACKAGE__->has_many(
374 "Koha::Schema::Result::CirculationRule",
375 { "foreign.branchcode" => "self.branchcode" },
376 { cascade_copy => 0, cascade_delete => 0 },
379 =head2 club_enrollments
383 Related object: L<Koha::Schema::Result::ClubEnrollment>
387 __PACKAGE__->has_many(
389 "Koha::Schema::Result::ClubEnrollment",
390 { "foreign.branchcode" => "self.branchcode" },
391 { cascade_copy => 0, cascade_delete => 0 },
394 =head2 club_templates
398 Related object: L<Koha::Schema::Result::ClubTemplate>
402 __PACKAGE__->has_many(
404 "Koha::Schema::Result::ClubTemplate",
405 { "foreign.branchcode" => "self.branchcode" },
406 { cascade_copy => 0, cascade_delete => 0 },
413 Related object: L<Koha::Schema::Result::Club>
417 __PACKAGE__->has_many(
419 "Koha::Schema::Result::Club",
420 { "foreign.branchcode" => "self.branchcode" },
421 { cascade_copy => 0, cascade_delete => 0 },
428 Related object: L<Koha::Schema::Result::Collection>
432 __PACKAGE__->has_many(
434 "Koha::Schema::Result::Collection",
435 { "foreign.colBranchcode" => "self.branchcode" },
436 { cascade_copy => 0, cascade_delete => 0 },
443 Related object: L<Koha::Schema::Result::CourseItem>
447 __PACKAGE__->has_many(
449 "Koha::Schema::Result::CourseItem",
450 { "foreign.holdingbranch" => "self.branchcode" },
451 { cascade_copy => 0, cascade_delete => 0 },
454 =head2 creator_batches
458 Related object: L<Koha::Schema::Result::CreatorBatch>
462 __PACKAGE__->has_many(
464 "Koha::Schema::Result::CreatorBatch",
465 { "foreign.branch_code" => "self.branchcode" },
466 { cascade_copy => 0, cascade_delete => 0 },
469 =head2 default_branch_circ_rule
473 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
477 __PACKAGE__->might_have(
478 "default_branch_circ_rule",
479 "Koha::Schema::Result::DefaultBranchCircRule",
480 { "foreign.branchcode" => "self.branchcode" },
481 { cascade_copy => 0, cascade_delete => 0 },
488 Related object: L<Koha::Schema::Result::EdifactEan>
492 __PACKAGE__->has_many(
494 "Koha::Schema::Result::EdifactEan",
495 { "foreign.branchcode" => "self.branchcode" },
496 { cascade_copy => 0, cascade_delete => 0 },
499 =head2 hold_fill_targets
503 Related object: L<Koha::Schema::Result::HoldFillTarget>
507 __PACKAGE__->has_many(
509 "Koha::Schema::Result::HoldFillTarget",
510 { "foreign.source_branchcode" => "self.branchcode" },
511 { cascade_copy => 0, cascade_delete => 0 },
518 Related object: L<Koha::Schema::Result::Illrequest>
522 __PACKAGE__->has_many(
524 "Koha::Schema::Result::Illrequest",
525 { "foreign.branchcode" => "self.branchcode" },
526 { cascade_copy => 0, cascade_delete => 0 },
529 =head2 items_holdingbranches
533 Related object: L<Koha::Schema::Result::Item>
537 __PACKAGE__->has_many(
538 "items_holdingbranches",
539 "Koha::Schema::Result::Item",
540 { "foreign.holdingbranch" => "self.branchcode" },
541 { cascade_copy => 0, cascade_delete => 0 },
544 =head2 items_homebranches
548 Related object: L<Koha::Schema::Result::Item>
552 __PACKAGE__->has_many(
553 "items_homebranches",
554 "Koha::Schema::Result::Item",
555 { "foreign.homebranch" => "self.branchcode" },
556 { cascade_copy => 0, cascade_delete => 0 },
559 =head2 library_groups
563 Related object: L<Koha::Schema::Result::LibraryGroup>
567 __PACKAGE__->has_many(
569 "Koha::Schema::Result::LibraryGroup",
570 { "foreign.branchcode" => "self.branchcode" },
571 { cascade_copy => 0, cascade_delete => 0 },
578 Related object: L<Koha::Schema::Result::OpacNews>
582 __PACKAGE__->has_many(
584 "Koha::Schema::Result::OpacNews",
585 { "foreign.branchcode" => "self.branchcode" },
586 { cascade_copy => 0, cascade_delete => 0 },
593 Related object: L<Koha::Schema::Result::Reserve>
597 __PACKAGE__->has_many(
599 "Koha::Schema::Result::Reserve",
600 { "foreign.branchcode" => "self.branchcode" },
601 { cascade_copy => 0, cascade_delete => 0 },
604 =head2 transport_cost_frombranches
608 Related object: L<Koha::Schema::Result::TransportCost>
612 __PACKAGE__->has_many(
613 "transport_cost_frombranches",
614 "Koha::Schema::Result::TransportCost",
615 { "foreign.frombranch" => "self.branchcode" },
616 { cascade_copy => 0, cascade_delete => 0 },
619 =head2 transport_cost_tobranches
623 Related object: L<Koha::Schema::Result::TransportCost>
627 __PACKAGE__->has_many(
628 "transport_cost_tobranches",
629 "Koha::Schema::Result::TransportCost",
630 { "foreign.tobranch" => "self.branchcode" },
631 { cascade_copy => 0, cascade_delete => 0 },
635 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-05 14:29:17
636 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:L/zUeW5lNf5oJcZ/bES7rw
639 # You can replace this text with custom code or comments, and it will be preserved on regeneration
641 sub koha_objects_class {