Bug 23152: Implement koha_object[s]_class when needed
[koha-equinox.git] / Koha / Schema / Result / Branch.pm
1 use utf8;
2 package Koha::Schema::Result::Branch;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Koha::Schema::Result::Branch
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<branches>
19
20 =cut
21
22 __PACKAGE__->table("branches");
23
24 =head1 ACCESSORS
25
26 =head2 branchcode
27
28   data_type: 'varchar'
29   default_value: (empty string)
30   is_nullable: 0
31   size: 10
32
33 =head2 branchname
34
35   data_type: 'longtext'
36   is_nullable: 0
37
38 =head2 branchaddress1
39
40   data_type: 'longtext'
41   is_nullable: 1
42
43 =head2 branchaddress2
44
45   data_type: 'longtext'
46   is_nullable: 1
47
48 =head2 branchaddress3
49
50   data_type: 'longtext'
51   is_nullable: 1
52
53 =head2 branchzip
54
55   data_type: 'varchar'
56   is_nullable: 1
57   size: 25
58
59 =head2 branchcity
60
61   data_type: 'longtext'
62   is_nullable: 1
63
64 =head2 branchstate
65
66   data_type: 'longtext'
67   is_nullable: 1
68
69 =head2 branchcountry
70
71   data_type: 'mediumtext'
72   is_nullable: 1
73
74 =head2 branchphone
75
76   data_type: 'longtext'
77   is_nullable: 1
78
79 =head2 branchfax
80
81   data_type: 'longtext'
82   is_nullable: 1
83
84 =head2 branchemail
85
86   data_type: 'longtext'
87   is_nullable: 1
88
89 =head2 branchreplyto
90
91   data_type: 'longtext'
92   is_nullable: 1
93
94 =head2 branchreturnpath
95
96   data_type: 'longtext'
97   is_nullable: 1
98
99 =head2 branchurl
100
101   data_type: 'longtext'
102   is_nullable: 1
103
104 =head2 issuing
105
106   data_type: 'tinyint'
107   is_nullable: 1
108
109 =head2 branchip
110
111   data_type: 'varchar'
112   is_nullable: 1
113   size: 15
114
115 =head2 branchprinter
116
117   data_type: 'varchar'
118   is_nullable: 1
119   size: 100
120
121 =head2 branchnotes
122
123   data_type: 'longtext'
124   is_nullable: 1
125
126 =head2 opac_info
127
128   data_type: 'mediumtext'
129   is_nullable: 1
130
131 =head2 geolocation
132
133   data_type: 'varchar'
134   is_nullable: 1
135   size: 255
136
137 =head2 marcorgcode
138
139   data_type: 'varchar'
140   is_nullable: 1
141   size: 16
142
143 =head2 pickup_location
144
145   data_type: 'tinyint'
146   default_value: 1
147   is_nullable: 0
148
149 =cut
150
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 },
198 );
199
200 =head1 PRIMARY KEY
201
202 =over 4
203
204 =item * L</branchcode>
205
206 =back
207
208 =cut
209
210 __PACKAGE__->set_primary_key("branchcode");
211
212 =head1 RELATIONS
213
214 =head2 accountlines
215
216 Type: has_many
217
218 Related object: L<Koha::Schema::Result::Accountline>
219
220 =cut
221
222 __PACKAGE__->has_many(
223   "accountlines",
224   "Koha::Schema::Result::Accountline",
225   { "foreign.branchcode" => "self.branchcode" },
226   { cascade_copy => 0, cascade_delete => 0 },
227 );
228
229 =head2 aqbaskets
230
231 Type: has_many
232
233 Related object: L<Koha::Schema::Result::Aqbasket>
234
235 =cut
236
237 __PACKAGE__->has_many(
238   "aqbaskets",
239   "Koha::Schema::Result::Aqbasket",
240   { "foreign.branch" => "self.branchcode" },
241   { cascade_copy => 0, cascade_delete => 0 },
242 );
243
244 =head2 article_requests
245
246 Type: has_many
247
248 Related object: L<Koha::Schema::Result::ArticleRequest>
249
250 =cut
251
252 __PACKAGE__->has_many(
253   "article_requests",
254   "Koha::Schema::Result::ArticleRequest",
255   { "foreign.branchcode" => "self.branchcode" },
256   { cascade_copy => 0, cascade_delete => 0 },
257 );
258
259 =head2 authorised_values_branches
260
261 Type: has_many
262
263 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
264
265 =cut
266
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 },
272 );
273
274 =head2 borrower_attribute_types_branches
275
276 Type: has_many
277
278 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
279
280 =cut
281
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 },
287 );
288
289 =head2 borrowers
290
291 Type: has_many
292
293 Related object: L<Koha::Schema::Result::Borrower>
294
295 =cut
296
297 __PACKAGE__->has_many(
298   "borrowers",
299   "Koha::Schema::Result::Borrower",
300   { "foreign.branchcode" => "self.branchcode" },
301   { cascade_copy => 0, cascade_delete => 0 },
302 );
303
304 =head2 branch_item_rules
305
306 Type: has_many
307
308 Related object: L<Koha::Schema::Result::BranchItemRule>
309
310 =cut
311
312 __PACKAGE__->has_many(
313   "branch_item_rules",
314   "Koha::Schema::Result::BranchItemRule",
315   { "foreign.branchcode" => "self.branchcode" },
316   { cascade_copy => 0, cascade_delete => 0 },
317 );
318
319 =head2 branches_overdrive
320
321 Type: might_have
322
323 Related object: L<Koha::Schema::Result::BranchesOverdrive>
324
325 =cut
326
327 __PACKAGE__->might_have(
328   "branches_overdrive",
329   "Koha::Schema::Result::BranchesOverdrive",
330   { "foreign.branchcode" => "self.branchcode" },
331   { cascade_copy => 0, cascade_delete => 0 },
332 );
333
334 =head2 branchtransfers_frombranches
335
336 Type: has_many
337
338 Related object: L<Koha::Schema::Result::Branchtransfer>
339
340 =cut
341
342 __PACKAGE__->has_many(
343   "branchtransfers_frombranches",
344   "Koha::Schema::Result::Branchtransfer",
345   { "foreign.frombranch" => "self.branchcode" },
346   { cascade_copy => 0, cascade_delete => 0 },
347 );
348
349 =head2 branchtransfers_tobranches
350
351 Type: has_many
352
353 Related object: L<Koha::Schema::Result::Branchtransfer>
354
355 =cut
356
357 __PACKAGE__->has_many(
358   "branchtransfers_tobranches",
359   "Koha::Schema::Result::Branchtransfer",
360   { "foreign.tobranch" => "self.branchcode" },
361   { cascade_copy => 0, cascade_delete => 0 },
362 );
363
364 =head2 categories_branches
365
366 Type: has_many
367
368 Related object: L<Koha::Schema::Result::CategoriesBranch>
369
370 =cut
371
372 __PACKAGE__->has_many(
373   "categories_branches",
374   "Koha::Schema::Result::CategoriesBranch",
375   { "foreign.branchcode" => "self.branchcode" },
376   { cascade_copy => 0, cascade_delete => 0 },
377 );
378
379 =head2 circulation_rules
380
381 Type: has_many
382
383 Related object: L<Koha::Schema::Result::CirculationRule>
384
385 =cut
386
387 __PACKAGE__->has_many(
388   "circulation_rules",
389   "Koha::Schema::Result::CirculationRule",
390   { "foreign.branchcode" => "self.branchcode" },
391   { cascade_copy => 0, cascade_delete => 0 },
392 );
393
394 =head2 club_enrollments
395
396 Type: has_many
397
398 Related object: L<Koha::Schema::Result::ClubEnrollment>
399
400 =cut
401
402 __PACKAGE__->has_many(
403   "club_enrollments",
404   "Koha::Schema::Result::ClubEnrollment",
405   { "foreign.branchcode" => "self.branchcode" },
406   { cascade_copy => 0, cascade_delete => 0 },
407 );
408
409 =head2 club_templates
410
411 Type: has_many
412
413 Related object: L<Koha::Schema::Result::ClubTemplate>
414
415 =cut
416
417 __PACKAGE__->has_many(
418   "club_templates",
419   "Koha::Schema::Result::ClubTemplate",
420   { "foreign.branchcode" => "self.branchcode" },
421   { cascade_copy => 0, cascade_delete => 0 },
422 );
423
424 =head2 clubs
425
426 Type: has_many
427
428 Related object: L<Koha::Schema::Result::Club>
429
430 =cut
431
432 __PACKAGE__->has_many(
433   "clubs",
434   "Koha::Schema::Result::Club",
435   { "foreign.branchcode" => "self.branchcode" },
436   { cascade_copy => 0, cascade_delete => 0 },
437 );
438
439 =head2 collections
440
441 Type: has_many
442
443 Related object: L<Koha::Schema::Result::Collection>
444
445 =cut
446
447 __PACKAGE__->has_many(
448   "collections",
449   "Koha::Schema::Result::Collection",
450   { "foreign.colBranchcode" => "self.branchcode" },
451   { cascade_copy => 0, cascade_delete => 0 },
452 );
453
454 =head2 course_items
455
456 Type: has_many
457
458 Related object: L<Koha::Schema::Result::CourseItem>
459
460 =cut
461
462 __PACKAGE__->has_many(
463   "course_items",
464   "Koha::Schema::Result::CourseItem",
465   { "foreign.holdingbranch" => "self.branchcode" },
466   { cascade_copy => 0, cascade_delete => 0 },
467 );
468
469 =head2 creator_batches
470
471 Type: has_many
472
473 Related object: L<Koha::Schema::Result::CreatorBatch>
474
475 =cut
476
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 },
482 );
483
484 =head2 default_branch_circ_rule
485
486 Type: might_have
487
488 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
489
490 =cut
491
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 },
497 );
498
499 =head2 edifact_eans
500
501 Type: has_many
502
503 Related object: L<Koha::Schema::Result::EdifactEan>
504
505 =cut
506
507 __PACKAGE__->has_many(
508   "edifact_eans",
509   "Koha::Schema::Result::EdifactEan",
510   { "foreign.branchcode" => "self.branchcode" },
511   { cascade_copy => 0, cascade_delete => 0 },
512 );
513
514 =head2 hold_fill_targets
515
516 Type: has_many
517
518 Related object: L<Koha::Schema::Result::HoldFillTarget>
519
520 =cut
521
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 },
527 );
528
529 =head2 illrequests
530
531 Type: has_many
532
533 Related object: L<Koha::Schema::Result::Illrequest>
534
535 =cut
536
537 __PACKAGE__->has_many(
538   "illrequests",
539   "Koha::Schema::Result::Illrequest",
540   { "foreign.branchcode" => "self.branchcode" },
541   { cascade_copy => 0, cascade_delete => 0 },
542 );
543
544 =head2 items_holdingbranches
545
546 Type: has_many
547
548 Related object: L<Koha::Schema::Result::Item>
549
550 =cut
551
552 __PACKAGE__->has_many(
553   "items_holdingbranches",
554   "Koha::Schema::Result::Item",
555   { "foreign.holdingbranch" => "self.branchcode" },
556   { cascade_copy => 0, cascade_delete => 0 },
557 );
558
559 =head2 items_homebranches
560
561 Type: has_many
562
563 Related object: L<Koha::Schema::Result::Item>
564
565 =cut
566
567 __PACKAGE__->has_many(
568   "items_homebranches",
569   "Koha::Schema::Result::Item",
570   { "foreign.homebranch" => "self.branchcode" },
571   { cascade_copy => 0, cascade_delete => 0 },
572 );
573
574 =head2 library_groups
575
576 Type: has_many
577
578 Related object: L<Koha::Schema::Result::LibraryGroup>
579
580 =cut
581
582 __PACKAGE__->has_many(
583   "library_groups",
584   "Koha::Schema::Result::LibraryGroup",
585   { "foreign.branchcode" => "self.branchcode" },
586   { cascade_copy => 0, cascade_delete => 0 },
587 );
588
589 =head2 opac_news
590
591 Type: has_many
592
593 Related object: L<Koha::Schema::Result::OpacNews>
594
595 =cut
596
597 __PACKAGE__->has_many(
598   "opac_news",
599   "Koha::Schema::Result::OpacNews",
600   { "foreign.branchcode" => "self.branchcode" },
601   { cascade_copy => 0, cascade_delete => 0 },
602 );
603
604 =head2 reserves
605
606 Type: has_many
607
608 Related object: L<Koha::Schema::Result::Reserve>
609
610 =cut
611
612 __PACKAGE__->has_many(
613   "reserves",
614   "Koha::Schema::Result::Reserve",
615   { "foreign.branchcode" => "self.branchcode" },
616   { cascade_copy => 0, cascade_delete => 0 },
617 );
618
619 =head2 stockrotationstages
620
621 Type: has_many
622
623 Related object: L<Koha::Schema::Result::Stockrotationstage>
624
625 =cut
626
627 __PACKAGE__->has_many(
628   "stockrotationstages",
629   "Koha::Schema::Result::Stockrotationstage",
630   { "foreign.branchcode_id" => "self.branchcode" },
631   { cascade_copy => 0, cascade_delete => 0 },
632 );
633
634 =head2 suggestions
635
636 Type: has_many
637
638 Related object: L<Koha::Schema::Result::Suggestion>
639
640 =cut
641
642 __PACKAGE__->has_many(
643   "suggestions",
644   "Koha::Schema::Result::Suggestion",
645   { "foreign.branchcode" => "self.branchcode" },
646   { cascade_copy => 0, cascade_delete => 0 },
647 );
648
649 =head2 transport_cost_frombranches
650
651 Type: has_many
652
653 Related object: L<Koha::Schema::Result::TransportCost>
654
655 =cut
656
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 },
662 );
663
664 =head2 transport_cost_tobranches
665
666 Type: has_many
667
668 Related object: L<Koha::Schema::Result::TransportCost>
669
670 =cut
671
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 },
677 );
678
679
680 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-03-11 12:56:41
681 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pKohWwsuUHcZSlGDj7zmcw
682
683 __PACKAGE__->add_columns(
684     '+pickup_location' => { is_boolean => 1 }
685 );
686
687 sub koha_object_class {
688     'Koha::Library';
689 }
690 sub koha_objects_class {
691     'Koha::Librarys';
692 }
693
694 1;