Bug 20434: Update UNIMARC framework - auth (SAUTTIT)
[koha.git] / Koha / Schema / Result / Branch.pm
blob6191b31a65ba3dbbdec791e9fa5f976a330aa4de
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 accountlines
216 Type: has_many
218 Related object: L<Koha::Schema::Result::Accountline>
220 =cut
222 __PACKAGE__->has_many(
223 "accountlines",
224 "Koha::Schema::Result::Accountline",
225 { "foreign.branchcode" => "self.branchcode" },
226 { cascade_copy => 0, cascade_delete => 0 },
229 =head2 aqbaskets
231 Type: has_many
233 Related object: L<Koha::Schema::Result::Aqbasket>
235 =cut
237 __PACKAGE__->has_many(
238 "aqbaskets",
239 "Koha::Schema::Result::Aqbasket",
240 { "foreign.branch" => "self.branchcode" },
241 { cascade_copy => 0, cascade_delete => 0 },
244 =head2 article_requests
246 Type: has_many
248 Related object: L<Koha::Schema::Result::ArticleRequest>
250 =cut
252 __PACKAGE__->has_many(
253 "article_requests",
254 "Koha::Schema::Result::ArticleRequest",
255 { "foreign.branchcode" => "self.branchcode" },
256 { cascade_copy => 0, cascade_delete => 0 },
259 =head2 authorised_values_branches
261 Type: has_many
263 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
265 =cut
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
276 Type: has_many
278 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
280 =cut
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 },
289 =head2 borrowers
291 Type: has_many
293 Related object: L<Koha::Schema::Result::Borrower>
295 =cut
297 __PACKAGE__->has_many(
298 "borrowers",
299 "Koha::Schema::Result::Borrower",
300 { "foreign.branchcode" => "self.branchcode" },
301 { cascade_copy => 0, cascade_delete => 0 },
304 =head2 branches_overdrive
306 Type: might_have
308 Related object: L<Koha::Schema::Result::BranchesOverdrive>
310 =cut
312 __PACKAGE__->might_have(
313 "branches_overdrive",
314 "Koha::Schema::Result::BranchesOverdrive",
315 { "foreign.branchcode" => "self.branchcode" },
316 { cascade_copy => 0, cascade_delete => 0 },
319 =head2 branchtransfers_frombranches
321 Type: has_many
323 Related object: L<Koha::Schema::Result::Branchtransfer>
325 =cut
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
336 Type: has_many
338 Related object: L<Koha::Schema::Result::Branchtransfer>
340 =cut
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 cash_registers
351 Type: has_many
353 Related object: L<Koha::Schema::Result::CashRegister>
355 =cut
357 __PACKAGE__->has_many(
358 "cash_registers",
359 "Koha::Schema::Result::CashRegister",
360 { "foreign.branch" => "self.branchcode" },
361 { cascade_copy => 0, cascade_delete => 0 },
364 =head2 categories_branches
366 Type: has_many
368 Related object: L<Koha::Schema::Result::CategoriesBranch>
370 =cut
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
381 Type: has_many
383 Related object: L<Koha::Schema::Result::CirculationRule>
385 =cut
387 __PACKAGE__->has_many(
388 "circulation_rules",
389 "Koha::Schema::Result::CirculationRule",
390 { "foreign.branchcode" => "self.branchcode" },
391 { cascade_copy => 0, cascade_delete => 0 },
394 =head2 club_enrollments
396 Type: has_many
398 Related object: L<Koha::Schema::Result::ClubEnrollment>
400 =cut
402 __PACKAGE__->has_many(
403 "club_enrollments",
404 "Koha::Schema::Result::ClubEnrollment",
405 { "foreign.branchcode" => "self.branchcode" },
406 { cascade_copy => 0, cascade_delete => 0 },
409 =head2 club_templates
411 Type: has_many
413 Related object: L<Koha::Schema::Result::ClubTemplate>
415 =cut
417 __PACKAGE__->has_many(
418 "club_templates",
419 "Koha::Schema::Result::ClubTemplate",
420 { "foreign.branchcode" => "self.branchcode" },
421 { cascade_copy => 0, cascade_delete => 0 },
424 =head2 clubs
426 Type: has_many
428 Related object: L<Koha::Schema::Result::Club>
430 =cut
432 __PACKAGE__->has_many(
433 "clubs",
434 "Koha::Schema::Result::Club",
435 { "foreign.branchcode" => "self.branchcode" },
436 { cascade_copy => 0, cascade_delete => 0 },
439 =head2 collections
441 Type: has_many
443 Related object: L<Koha::Schema::Result::Collection>
445 =cut
447 __PACKAGE__->has_many(
448 "collections",
449 "Koha::Schema::Result::Collection",
450 { "foreign.colBranchcode" => "self.branchcode" },
451 { cascade_copy => 0, cascade_delete => 0 },
454 =head2 course_items
456 Type: has_many
458 Related object: L<Koha::Schema::Result::CourseItem>
460 =cut
462 __PACKAGE__->has_many(
463 "course_items",
464 "Koha::Schema::Result::CourseItem",
465 { "foreign.holdingbranch" => "self.branchcode" },
466 { cascade_copy => 0, cascade_delete => 0 },
469 =head2 creator_batches
471 Type: has_many
473 Related object: L<Koha::Schema::Result::CreatorBatch>
475 =cut
477 __PACKAGE__->has_many(
478 "creator_batches",
479 "Koha::Schema::Result::CreatorBatch",
480 { "foreign.branch_code" => "self.branchcode" },
481 { cascade_copy => 0, cascade_delete => 0 },
484 =head2 edifact_eans
486 Type: has_many
488 Related object: L<Koha::Schema::Result::EdifactEan>
490 =cut
492 __PACKAGE__->has_many(
493 "edifact_eans",
494 "Koha::Schema::Result::EdifactEan",
495 { "foreign.branchcode" => "self.branchcode" },
496 { cascade_copy => 0, cascade_delete => 0 },
499 =head2 hold_fill_targets
501 Type: has_many
503 Related object: L<Koha::Schema::Result::HoldFillTarget>
505 =cut
507 __PACKAGE__->has_many(
508 "hold_fill_targets",
509 "Koha::Schema::Result::HoldFillTarget",
510 { "foreign.source_branchcode" => "self.branchcode" },
511 { cascade_copy => 0, cascade_delete => 0 },
514 =head2 illrequests
516 Type: has_many
518 Related object: L<Koha::Schema::Result::Illrequest>
520 =cut
522 __PACKAGE__->has_many(
523 "illrequests",
524 "Koha::Schema::Result::Illrequest",
525 { "foreign.branchcode" => "self.branchcode" },
526 { cascade_copy => 0, cascade_delete => 0 },
529 =head2 items_holdingbranches
531 Type: has_many
533 Related object: L<Koha::Schema::Result::Item>
535 =cut
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
546 Type: has_many
548 Related object: L<Koha::Schema::Result::Item>
550 =cut
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 itemtypes_branches
561 Type: has_many
563 Related object: L<Koha::Schema::Result::ItemtypesBranch>
565 =cut
567 __PACKAGE__->has_many(
568 "itemtypes_branches",
569 "Koha::Schema::Result::ItemtypesBranch",
570 { "foreign.branchcode" => "self.branchcode" },
571 { cascade_copy => 0, cascade_delete => 0 },
574 =head2 library_groups
576 Type: has_many
578 Related object: L<Koha::Schema::Result::LibraryGroup>
580 =cut
582 __PACKAGE__->has_many(
583 "library_groups",
584 "Koha::Schema::Result::LibraryGroup",
585 { "foreign.branchcode" => "self.branchcode" },
586 { cascade_copy => 0, cascade_delete => 0 },
589 =head2 opac_news
591 Type: has_many
593 Related object: L<Koha::Schema::Result::OpacNews>
595 =cut
597 __PACKAGE__->has_many(
598 "opac_news",
599 "Koha::Schema::Result::OpacNews",
600 { "foreign.branchcode" => "self.branchcode" },
601 { cascade_copy => 0, cascade_delete => 0 },
604 =head2 reserves
606 Type: has_many
608 Related object: L<Koha::Schema::Result::Reserve>
610 =cut
612 __PACKAGE__->has_many(
613 "reserves",
614 "Koha::Schema::Result::Reserve",
615 { "foreign.branchcode" => "self.branchcode" },
616 { cascade_copy => 0, cascade_delete => 0 },
619 =head2 stockrotationstages
621 Type: has_many
623 Related object: L<Koha::Schema::Result::Stockrotationstage>
625 =cut
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 suggestions
636 Type: has_many
638 Related object: L<Koha::Schema::Result::Suggestion>
640 =cut
642 __PACKAGE__->has_many(
643 "suggestions",
644 "Koha::Schema::Result::Suggestion",
645 { "foreign.branchcode" => "self.branchcode" },
646 { cascade_copy => 0, cascade_delete => 0 },
649 =head2 transport_cost_frombranches
651 Type: has_many
653 Related object: L<Koha::Schema::Result::TransportCost>
655 =cut
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
666 Type: has_many
668 Related object: L<Koha::Schema::Result::TransportCost>
670 =cut
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-09-23 10:45:22
681 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KDg4i49bpMxXQ1LP6OZFWQ
683 __PACKAGE__->add_columns(
684 '+pickup_location' => { is_boolean => 1 }
687 sub koha_object_class {
688 'Koha::Library';
690 sub koha_objects_class {
691 'Koha::Libraries';