Bug 23049: (follow-up) VARCHAR(80) + ac -> account
[koha.git] / Koha / Schema / Result / Branch.pm
blob579edb8e39fe723c8c43362ccca7f30976f5ee0d
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 branchprinter
117 data_type: 'varchar'
118 is_nullable: 1
119 size: 100
121 =head2 branchnotes
123 data_type: 'longtext'
124 is_nullable: 1
126 =head2 opac_info
128 data_type: 'mediumtext'
129 is_nullable: 1
131 =head2 geolocation
133 data_type: 'varchar'
134 is_nullable: 1
135 size: 255
137 =head2 marcorgcode
139 data_type: 'varchar'
140 is_nullable: 1
141 size: 16
143 =head2 pickup_location
145 data_type: 'tinyint'
146 default_value: 1
147 is_nullable: 0
149 =cut
151 __PACKAGE__->add_columns(
152 "branchcode",
153 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
154 "branchname",
155 { data_type => "longtext", is_nullable => 0 },
156 "branchaddress1",
157 { data_type => "longtext", is_nullable => 1 },
158 "branchaddress2",
159 { data_type => "longtext", is_nullable => 1 },
160 "branchaddress3",
161 { data_type => "longtext", is_nullable => 1 },
162 "branchzip",
163 { data_type => "varchar", is_nullable => 1, size => 25 },
164 "branchcity",
165 { data_type => "longtext", is_nullable => 1 },
166 "branchstate",
167 { data_type => "longtext", is_nullable => 1 },
168 "branchcountry",
169 { data_type => "mediumtext", is_nullable => 1 },
170 "branchphone",
171 { data_type => "longtext", is_nullable => 1 },
172 "branchfax",
173 { data_type => "longtext", is_nullable => 1 },
174 "branchemail",
175 { data_type => "longtext", is_nullable => 1 },
176 "branchreplyto",
177 { data_type => "longtext", is_nullable => 1 },
178 "branchreturnpath",
179 { data_type => "longtext", is_nullable => 1 },
180 "branchurl",
181 { data_type => "longtext", is_nullable => 1 },
182 "issuing",
183 { data_type => "tinyint", is_nullable => 1 },
184 "branchip",
185 { data_type => "varchar", is_nullable => 1, size => 15 },
186 "branchprinter",
187 { data_type => "varchar", is_nullable => 1, size => 100 },
188 "branchnotes",
189 { data_type => "longtext", is_nullable => 1 },
190 "opac_info",
191 { data_type => "mediumtext", is_nullable => 1 },
192 "geolocation",
193 { data_type => "varchar", is_nullable => 1, size => 255 },
194 "marcorgcode",
195 { data_type => "varchar", is_nullable => 1, size => 16 },
196 "pickup_location",
197 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
200 =head1 PRIMARY KEY
202 =over 4
204 =item * L</branchcode>
206 =back
208 =cut
210 __PACKAGE__->set_primary_key("branchcode");
212 =head1 RELATIONS
214 =head2 account_debit_types_branches
216 Type: has_many
218 Related object: L<Koha::Schema::Result::AccountDebitTypesBranch>
220 =cut
222 __PACKAGE__->has_many(
223 "account_debit_types_branches",
224 "Koha::Schema::Result::AccountDebitTypesBranch",
225 { "foreign.branchcode" => "self.branchcode" },
226 { cascade_copy => 0, cascade_delete => 0 },
229 =head2 accountlines
231 Type: has_many
233 Related object: L<Koha::Schema::Result::Accountline>
235 =cut
237 __PACKAGE__->has_many(
238 "accountlines",
239 "Koha::Schema::Result::Accountline",
240 { "foreign.branchcode" => "self.branchcode" },
241 { cascade_copy => 0, cascade_delete => 0 },
244 =head2 aqbaskets
246 Type: has_many
248 Related object: L<Koha::Schema::Result::Aqbasket>
250 =cut
252 __PACKAGE__->has_many(
253 "aqbaskets",
254 "Koha::Schema::Result::Aqbasket",
255 { "foreign.branch" => "self.branchcode" },
256 { cascade_copy => 0, cascade_delete => 0 },
259 =head2 article_requests
261 Type: has_many
263 Related object: L<Koha::Schema::Result::ArticleRequest>
265 =cut
267 __PACKAGE__->has_many(
268 "article_requests",
269 "Koha::Schema::Result::ArticleRequest",
270 { "foreign.branchcode" => "self.branchcode" },
271 { cascade_copy => 0, cascade_delete => 0 },
274 =head2 authorised_values_branches
276 Type: has_many
278 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
280 =cut
282 __PACKAGE__->has_many(
283 "authorised_values_branches",
284 "Koha::Schema::Result::AuthorisedValuesBranch",
285 { "foreign.branchcode" => "self.branchcode" },
286 { cascade_copy => 0, cascade_delete => 0 },
289 =head2 borrower_attribute_types_branches
291 Type: has_many
293 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
295 =cut
297 __PACKAGE__->has_many(
298 "borrower_attribute_types_branches",
299 "Koha::Schema::Result::BorrowerAttributeTypesBranch",
300 { "foreign.b_branchcode" => "self.branchcode" },
301 { cascade_copy => 0, cascade_delete => 0 },
304 =head2 borrowers
306 Type: has_many
308 Related object: L<Koha::Schema::Result::Borrower>
310 =cut
312 __PACKAGE__->has_many(
313 "borrowers",
314 "Koha::Schema::Result::Borrower",
315 { "foreign.branchcode" => "self.branchcode" },
316 { cascade_copy => 0, cascade_delete => 0 },
319 =head2 branches_overdrive
321 Type: might_have
323 Related object: L<Koha::Schema::Result::BranchesOverdrive>
325 =cut
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
336 Type: has_many
338 Related object: L<Koha::Schema::Result::Branchtransfer>
340 =cut
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
351 Type: has_many
353 Related object: L<Koha::Schema::Result::Branchtransfer>
355 =cut
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 cash_registers
366 Type: has_many
368 Related object: L<Koha::Schema::Result::CashRegister>
370 =cut
372 __PACKAGE__->has_many(
373 "cash_registers",
374 "Koha::Schema::Result::CashRegister",
375 { "foreign.branch" => "self.branchcode" },
376 { cascade_copy => 0, cascade_delete => 0 },
379 =head2 categories_branches
381 Type: has_many
383 Related object: L<Koha::Schema::Result::CategoriesBranch>
385 =cut
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
396 Type: has_many
398 Related object: L<Koha::Schema::Result::CirculationRule>
400 =cut
402 __PACKAGE__->has_many(
403 "circulation_rules",
404 "Koha::Schema::Result::CirculationRule",
405 { "foreign.branchcode" => "self.branchcode" },
406 { cascade_copy => 0, cascade_delete => 0 },
409 =head2 club_enrollments
411 Type: has_many
413 Related object: L<Koha::Schema::Result::ClubEnrollment>
415 =cut
417 __PACKAGE__->has_many(
418 "club_enrollments",
419 "Koha::Schema::Result::ClubEnrollment",
420 { "foreign.branchcode" => "self.branchcode" },
421 { cascade_copy => 0, cascade_delete => 0 },
424 =head2 club_templates
426 Type: has_many
428 Related object: L<Koha::Schema::Result::ClubTemplate>
430 =cut
432 __PACKAGE__->has_many(
433 "club_templates",
434 "Koha::Schema::Result::ClubTemplate",
435 { "foreign.branchcode" => "self.branchcode" },
436 { cascade_copy => 0, cascade_delete => 0 },
439 =head2 clubs
441 Type: has_many
443 Related object: L<Koha::Schema::Result::Club>
445 =cut
447 __PACKAGE__->has_many(
448 "clubs",
449 "Koha::Schema::Result::Club",
450 { "foreign.branchcode" => "self.branchcode" },
451 { cascade_copy => 0, cascade_delete => 0 },
454 =head2 collections
456 Type: has_many
458 Related object: L<Koha::Schema::Result::Collection>
460 =cut
462 __PACKAGE__->has_many(
463 "collections",
464 "Koha::Schema::Result::Collection",
465 { "foreign.colBranchcode" => "self.branchcode" },
466 { cascade_copy => 0, cascade_delete => 0 },
469 =head2 course_items
471 Type: has_many
473 Related object: L<Koha::Schema::Result::CourseItem>
475 =cut
477 __PACKAGE__->has_many(
478 "course_items",
479 "Koha::Schema::Result::CourseItem",
480 { "foreign.holdingbranch" => "self.branchcode" },
481 { cascade_copy => 0, cascade_delete => 0 },
484 =head2 creator_batches
486 Type: has_many
488 Related object: L<Koha::Schema::Result::CreatorBatch>
490 =cut
492 __PACKAGE__->has_many(
493 "creator_batches",
494 "Koha::Schema::Result::CreatorBatch",
495 { "foreign.branch_code" => "self.branchcode" },
496 { cascade_copy => 0, cascade_delete => 0 },
499 =head2 edifact_eans
501 Type: has_many
503 Related object: L<Koha::Schema::Result::EdifactEan>
505 =cut
507 __PACKAGE__->has_many(
508 "edifact_eans",
509 "Koha::Schema::Result::EdifactEan",
510 { "foreign.branchcode" => "self.branchcode" },
511 { cascade_copy => 0, cascade_delete => 0 },
514 =head2 hold_fill_targets
516 Type: has_many
518 Related object: L<Koha::Schema::Result::HoldFillTarget>
520 =cut
522 __PACKAGE__->has_many(
523 "hold_fill_targets",
524 "Koha::Schema::Result::HoldFillTarget",
525 { "foreign.source_branchcode" => "self.branchcode" },
526 { cascade_copy => 0, cascade_delete => 0 },
529 =head2 illrequests
531 Type: has_many
533 Related object: L<Koha::Schema::Result::Illrequest>
535 =cut
537 __PACKAGE__->has_many(
538 "illrequests",
539 "Koha::Schema::Result::Illrequest",
540 { "foreign.branchcode" => "self.branchcode" },
541 { cascade_copy => 0, cascade_delete => 0 },
544 =head2 items_holdingbranches
546 Type: has_many
548 Related object: L<Koha::Schema::Result::Item>
550 =cut
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
561 Type: has_many
563 Related object: L<Koha::Schema::Result::Item>
565 =cut
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 itemtypes_branches
576 Type: has_many
578 Related object: L<Koha::Schema::Result::ItemtypesBranch>
580 =cut
582 __PACKAGE__->has_many(
583 "itemtypes_branches",
584 "Koha::Schema::Result::ItemtypesBranch",
585 { "foreign.branchcode" => "self.branchcode" },
586 { cascade_copy => 0, cascade_delete => 0 },
589 =head2 library_groups
591 Type: has_many
593 Related object: L<Koha::Schema::Result::LibraryGroup>
595 =cut
597 __PACKAGE__->has_many(
598 "library_groups",
599 "Koha::Schema::Result::LibraryGroup",
600 { "foreign.branchcode" => "self.branchcode" },
601 { cascade_copy => 0, cascade_delete => 0 },
604 =head2 opac_news
606 Type: has_many
608 Related object: L<Koha::Schema::Result::OpacNews>
610 =cut
612 __PACKAGE__->has_many(
613 "opac_news",
614 "Koha::Schema::Result::OpacNews",
615 { "foreign.branchcode" => "self.branchcode" },
616 { cascade_copy => 0, cascade_delete => 0 },
619 =head2 reserves
621 Type: has_many
623 Related object: L<Koha::Schema::Result::Reserve>
625 =cut
627 __PACKAGE__->has_many(
628 "reserves",
629 "Koha::Schema::Result::Reserve",
630 { "foreign.branchcode" => "self.branchcode" },
631 { cascade_copy => 0, cascade_delete => 0 },
634 =head2 stockrotationstages
636 Type: has_many
638 Related object: L<Koha::Schema::Result::Stockrotationstage>
640 =cut
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 suggestions
651 Type: has_many
653 Related object: L<Koha::Schema::Result::Suggestion>
655 =cut
657 __PACKAGE__->has_many(
658 "suggestions",
659 "Koha::Schema::Result::Suggestion",
660 { "foreign.branchcode" => "self.branchcode" },
661 { cascade_copy => 0, cascade_delete => 0 },
664 =head2 transport_cost_frombranches
666 Type: has_many
668 Related object: L<Koha::Schema::Result::TransportCost>
670 =cut
672 __PACKAGE__->has_many(
673 "transport_cost_frombranches",
674 "Koha::Schema::Result::TransportCost",
675 { "foreign.frombranch" => "self.branchcode" },
676 { cascade_copy => 0, cascade_delete => 0 },
679 =head2 transport_cost_tobranches
681 Type: has_many
683 Related object: L<Koha::Schema::Result::TransportCost>
685 =cut
687 __PACKAGE__->has_many(
688 "transport_cost_tobranches",
689 "Koha::Schema::Result::TransportCost",
690 { "foreign.tobranch" => "self.branchcode" },
691 { cascade_copy => 0, cascade_delete => 0 },
695 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-11 11:36:33
696 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HCQKMSgKhVKtDSrvs1IeRg
698 __PACKAGE__->add_columns(
699 '+pickup_location' => { is_boolean => 1 }
702 sub koha_object_class {
703 'Koha::Library';
705 sub koha_objects_class {
706 'Koha::Libraries';