Bug 22630: Schema Update
[koha.git] / Koha / Schema / Result / Branch.pm
blob478c06fc0e8308c7f02f1f0b74fd2e53907db844
1 use utf8;
2 package Koha::Schema::Result::Branch;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Branch
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<branches>
20 =cut
22 __PACKAGE__->table("branches");
24 =head1 ACCESSORS
26 =head2 branchcode
28 data_type: 'varchar'
29 default_value: (empty string)
30 is_nullable: 0
31 size: 10
33 =head2 branchname
35 data_type: 'longtext'
36 is_nullable: 0
38 =head2 branchaddress1
40 data_type: 'longtext'
41 is_nullable: 1
43 =head2 branchaddress2
45 data_type: 'longtext'
46 is_nullable: 1
48 =head2 branchaddress3
50 data_type: 'longtext'
51 is_nullable: 1
53 =head2 branchzip
55 data_type: 'varchar'
56 is_nullable: 1
57 size: 25
59 =head2 branchcity
61 data_type: 'longtext'
62 is_nullable: 1
64 =head2 branchstate
66 data_type: 'longtext'
67 is_nullable: 1
69 =head2 branchcountry
71 data_type: 'mediumtext'
72 is_nullable: 1
74 =head2 branchphone
76 data_type: 'longtext'
77 is_nullable: 1
79 =head2 branchfax
81 data_type: 'longtext'
82 is_nullable: 1
84 =head2 branchemail
86 data_type: 'longtext'
87 is_nullable: 1
89 =head2 branchreplyto
91 data_type: 'longtext'
92 is_nullable: 1
94 =head2 branchreturnpath
96 data_type: 'longtext'
97 is_nullable: 1
99 =head2 branchurl
101 data_type: 'longtext'
102 is_nullable: 1
104 =head2 issuing
106 data_type: 'tinyint'
107 is_nullable: 1
109 =head2 branchip
111 data_type: 'varchar'
112 is_nullable: 1
113 size: 15
115 =head2 branchnotes
117 data_type: 'longtext'
118 is_nullable: 1
120 =head2 opac_info
122 data_type: 'mediumtext'
123 is_nullable: 1
125 =head2 geolocation
127 data_type: 'varchar'
128 is_nullable: 1
129 size: 255
131 =head2 marcorgcode
133 data_type: 'varchar'
134 is_nullable: 1
135 size: 16
137 =head2 pickup_location
139 data_type: 'tinyint'
140 default_value: 1
141 is_nullable: 0
143 =cut
145 __PACKAGE__->add_columns(
146 "branchcode",
147 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
148 "branchname",
149 { data_type => "longtext", is_nullable => 0 },
150 "branchaddress1",
151 { data_type => "longtext", is_nullable => 1 },
152 "branchaddress2",
153 { data_type => "longtext", is_nullable => 1 },
154 "branchaddress3",
155 { data_type => "longtext", is_nullable => 1 },
156 "branchzip",
157 { data_type => "varchar", is_nullable => 1, size => 25 },
158 "branchcity",
159 { data_type => "longtext", is_nullable => 1 },
160 "branchstate",
161 { data_type => "longtext", is_nullable => 1 },
162 "branchcountry",
163 { data_type => "mediumtext", is_nullable => 1 },
164 "branchphone",
165 { data_type => "longtext", is_nullable => 1 },
166 "branchfax",
167 { data_type => "longtext", is_nullable => 1 },
168 "branchemail",
169 { data_type => "longtext", is_nullable => 1 },
170 "branchreplyto",
171 { data_type => "longtext", is_nullable => 1 },
172 "branchreturnpath",
173 { data_type => "longtext", is_nullable => 1 },
174 "branchurl",
175 { data_type => "longtext", is_nullable => 1 },
176 "issuing",
177 { data_type => "tinyint", is_nullable => 1 },
178 "branchip",
179 { data_type => "varchar", is_nullable => 1, size => 15 },
180 "branchnotes",
181 { data_type => "longtext", is_nullable => 1 },
182 "opac_info",
183 { data_type => "mediumtext", is_nullable => 1 },
184 "geolocation",
185 { data_type => "varchar", is_nullable => 1, size => 255 },
186 "marcorgcode",
187 { data_type => "varchar", is_nullable => 1, size => 16 },
188 "pickup_location",
189 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
192 =head1 PRIMARY KEY
194 =over 4
196 =item * L</branchcode>
198 =back
200 =cut
202 __PACKAGE__->set_primary_key("branchcode");
204 =head1 RELATIONS
206 =head2 account_credit_types_branches
208 Type: has_many
210 Related object: L<Koha::Schema::Result::AccountCreditTypesBranch>
212 =cut
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
223 Type: has_many
225 Related object: L<Koha::Schema::Result::AccountDebitTypesBranch>
227 =cut
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 },
236 =head2 accountlines
238 Type: has_many
240 Related object: L<Koha::Schema::Result::Accountline>
242 =cut
244 __PACKAGE__->has_many(
245 "accountlines",
246 "Koha::Schema::Result::Accountline",
247 { "foreign.branchcode" => "self.branchcode" },
248 { cascade_copy => 0, cascade_delete => 0 },
251 =head2 aqbaskets
253 Type: has_many
255 Related object: L<Koha::Schema::Result::Aqbasket>
257 =cut
259 __PACKAGE__->has_many(
260 "aqbaskets",
261 "Koha::Schema::Result::Aqbasket",
262 { "foreign.branch" => "self.branchcode" },
263 { cascade_copy => 0, cascade_delete => 0 },
266 =head2 article_requests
268 Type: has_many
270 Related object: L<Koha::Schema::Result::ArticleRequest>
272 =cut
274 __PACKAGE__->has_many(
275 "article_requests",
276 "Koha::Schema::Result::ArticleRequest",
277 { "foreign.branchcode" => "self.branchcode" },
278 { cascade_copy => 0, cascade_delete => 0 },
281 =head2 authorised_values_branches
283 Type: has_many
285 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
287 =cut
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
298 Type: has_many
300 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
302 =cut
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 },
311 =head2 borrowers
313 Type: has_many
315 Related object: L<Koha::Schema::Result::Borrower>
317 =cut
319 __PACKAGE__->has_many(
320 "borrowers",
321 "Koha::Schema::Result::Borrower",
322 { "foreign.branchcode" => "self.branchcode" },
323 { cascade_copy => 0, cascade_delete => 0 },
326 =head2 branches_overdrive
328 Type: might_have
330 Related object: L<Koha::Schema::Result::BranchesOverdrive>
332 =cut
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
343 Type: has_many
345 Related object: L<Koha::Schema::Result::Branchtransfer>
347 =cut
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
358 Type: has_many
360 Related object: L<Koha::Schema::Result::Branchtransfer>
362 =cut
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
373 Type: has_many
375 Related object: L<Koha::Schema::Result::CashRegister>
377 =cut
379 __PACKAGE__->has_many(
380 "cash_registers",
381 "Koha::Schema::Result::CashRegister",
382 { "foreign.branch" => "self.branchcode" },
383 { cascade_copy => 0, cascade_delete => 0 },
386 =head2 categories_branches
388 Type: has_many
390 Related object: L<Koha::Schema::Result::CategoriesBranch>
392 =cut
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
403 Type: has_many
405 Related object: L<Koha::Schema::Result::CirculationRule>
407 =cut
409 __PACKAGE__->has_many(
410 "circulation_rules",
411 "Koha::Schema::Result::CirculationRule",
412 { "foreign.branchcode" => "self.branchcode" },
413 { cascade_copy => 0, cascade_delete => 0 },
416 =head2 club_enrollments
418 Type: has_many
420 Related object: L<Koha::Schema::Result::ClubEnrollment>
422 =cut
424 __PACKAGE__->has_many(
425 "club_enrollments",
426 "Koha::Schema::Result::ClubEnrollment",
427 { "foreign.branchcode" => "self.branchcode" },
428 { cascade_copy => 0, cascade_delete => 0 },
431 =head2 club_templates
433 Type: has_many
435 Related object: L<Koha::Schema::Result::ClubTemplate>
437 =cut
439 __PACKAGE__->has_many(
440 "club_templates",
441 "Koha::Schema::Result::ClubTemplate",
442 { "foreign.branchcode" => "self.branchcode" },
443 { cascade_copy => 0, cascade_delete => 0 },
446 =head2 clubs
448 Type: has_many
450 Related object: L<Koha::Schema::Result::Club>
452 =cut
454 __PACKAGE__->has_many(
455 "clubs",
456 "Koha::Schema::Result::Club",
457 { "foreign.branchcode" => "self.branchcode" },
458 { cascade_copy => 0, cascade_delete => 0 },
461 =head2 collections
463 Type: has_many
465 Related object: L<Koha::Schema::Result::Collection>
467 =cut
469 __PACKAGE__->has_many(
470 "collections",
471 "Koha::Schema::Result::Collection",
472 { "foreign.colBranchcode" => "self.branchcode" },
473 { cascade_copy => 0, cascade_delete => 0 },
476 =head2 course_items
478 Type: has_many
480 Related object: L<Koha::Schema::Result::CourseItem>
482 =cut
484 __PACKAGE__->has_many(
485 "course_items",
486 "Koha::Schema::Result::CourseItem",
487 { "foreign.holdingbranch" => "self.branchcode" },
488 { cascade_copy => 0, cascade_delete => 0 },
491 =head2 course_items_homebranch_storages
493 Type: has_many
495 Related object: L<Koha::Schema::Result::CourseItem>
497 =cut
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
508 Type: has_many
510 Related object: L<Koha::Schema::Result::CourseItem>
512 =cut
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
523 Type: has_many
525 Related object: L<Koha::Schema::Result::CreatorBatch>
527 =cut
529 __PACKAGE__->has_many(
530 "creator_batches",
531 "Koha::Schema::Result::CreatorBatch",
532 { "foreign.branch_code" => "self.branchcode" },
533 { cascade_copy => 0, cascade_delete => 0 },
536 =head2 desks
538 Type: has_many
540 Related object: L<Koha::Schema::Result::Desk>
542 =cut
544 __PACKAGE__->has_many(
545 "desks",
546 "Koha::Schema::Result::Desk",
547 { "foreign.branchcode" => "self.branchcode" },
548 { cascade_copy => 0, cascade_delete => 0 },
551 =head2 edifact_eans
553 Type: has_many
555 Related object: L<Koha::Schema::Result::EdifactEan>
557 =cut
559 __PACKAGE__->has_many(
560 "edifact_eans",
561 "Koha::Schema::Result::EdifactEan",
562 { "foreign.branchcode" => "self.branchcode" },
563 { cascade_copy => 0, cascade_delete => 0 },
566 =head2 hold_fill_targets
568 Type: has_many
570 Related object: L<Koha::Schema::Result::HoldFillTarget>
572 =cut
574 __PACKAGE__->has_many(
575 "hold_fill_targets",
576 "Koha::Schema::Result::HoldFillTarget",
577 { "foreign.source_branchcode" => "self.branchcode" },
578 { cascade_copy => 0, cascade_delete => 0 },
581 =head2 illrequests
583 Type: has_many
585 Related object: L<Koha::Schema::Result::Illrequest>
587 =cut
589 __PACKAGE__->has_many(
590 "illrequests",
591 "Koha::Schema::Result::Illrequest",
592 { "foreign.branchcode" => "self.branchcode" },
593 { cascade_copy => 0, cascade_delete => 0 },
596 =head2 items_holdingbranches
598 Type: has_many
600 Related object: L<Koha::Schema::Result::Item>
602 =cut
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
613 Type: has_many
615 Related object: L<Koha::Schema::Result::Item>
617 =cut
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
628 Type: has_many
630 Related object: L<Koha::Schema::Result::ItemtypesBranch>
632 =cut
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
643 Type: has_many
645 Related object: L<Koha::Schema::Result::LibraryGroup>
647 =cut
649 __PACKAGE__->has_many(
650 "library_groups",
651 "Koha::Schema::Result::LibraryGroup",
652 { "foreign.branchcode" => "self.branchcode" },
653 { cascade_copy => 0, cascade_delete => 0 },
656 =head2 opac_news
658 Type: has_many
660 Related object: L<Koha::Schema::Result::OpacNews>
662 =cut
664 __PACKAGE__->has_many(
665 "opac_news",
666 "Koha::Schema::Result::OpacNews",
667 { "foreign.branchcode" => "self.branchcode" },
668 { cascade_copy => 0, cascade_delete => 0 },
671 =head2 problem_reports
673 Type: has_many
675 Related object: L<Koha::Schema::Result::ProblemReport>
677 =cut
679 __PACKAGE__->has_many(
680 "problem_reports",
681 "Koha::Schema::Result::ProblemReport",
682 { "foreign.branchcode" => "self.branchcode" },
683 { cascade_copy => 0, cascade_delete => 0 },
686 =head2 repeatable_holidays
688 Type: has_many
690 Related object: L<Koha::Schema::Result::RepeatableHoliday>
692 =cut
694 __PACKAGE__->has_many(
695 "repeatable_holidays",
696 "Koha::Schema::Result::RepeatableHoliday",
697 { "foreign.branchcode" => "self.branchcode" },
698 { cascade_copy => 0, cascade_delete => 0 },
701 =head2 reserves
703 Type: has_many
705 Related object: L<Koha::Schema::Result::Reserve>
707 =cut
709 __PACKAGE__->has_many(
710 "reserves",
711 "Koha::Schema::Result::Reserve",
712 { "foreign.branchcode" => "self.branchcode" },
713 { cascade_copy => 0, cascade_delete => 0 },
716 =head2 special_holidays
718 Type: has_many
720 Related object: L<Koha::Schema::Result::SpecialHoliday>
722 =cut
724 __PACKAGE__->has_many(
725 "special_holidays",
726 "Koha::Schema::Result::SpecialHoliday",
727 { "foreign.branchcode" => "self.branchcode" },
728 { cascade_copy => 0, cascade_delete => 0 },
731 =head2 stockrotationstages
733 Type: has_many
735 Related object: L<Koha::Schema::Result::Stockrotationstage>
737 =cut
739 __PACKAGE__->has_many(
740 "stockrotationstages",
741 "Koha::Schema::Result::Stockrotationstage",
742 { "foreign.branchcode_id" => "self.branchcode" },
743 { cascade_copy => 0, cascade_delete => 0 },
746 =head2 suggestions
748 Type: has_many
750 Related object: L<Koha::Schema::Result::Suggestion>
752 =cut
754 __PACKAGE__->has_many(
755 "suggestions",
756 "Koha::Schema::Result::Suggestion",
757 { "foreign.branchcode" => "self.branchcode" },
758 { cascade_copy => 0, cascade_delete => 0 },
761 =head2 transport_cost_frombranches
763 Type: has_many
765 Related object: L<Koha::Schema::Result::TransportCost>
767 =cut
769 __PACKAGE__->has_many(
770 "transport_cost_frombranches",
771 "Koha::Schema::Result::TransportCost",
772 { "foreign.frombranch" => "self.branchcode" },
773 { cascade_copy => 0, cascade_delete => 0 },
776 =head2 transport_cost_tobranches
778 Type: has_many
780 Related object: L<Koha::Schema::Result::TransportCost>
782 =cut
784 __PACKAGE__->has_many(
785 "transport_cost_tobranches",
786 "Koha::Schema::Result::TransportCost",
787 { "foreign.tobranch" => "self.branchcode" },
788 { cascade_copy => 0, cascade_delete => 0 },
792 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-29 16:09:25
793 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9f0Crr57ffdoe8syXgawng
795 __PACKAGE__->add_columns(
796 '+pickup_location' => { is_boolean => 1 }
799 sub koha_object_class {
800 'Koha::Library';
802 sub koha_objects_class {
803 'Koha::Libraries';