Bug 18887: DBRev 18.06.00.036
[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 aqbaskets
215
216 Type: has_many
217
218 Related object: L<Koha::Schema::Result::Aqbasket>
219
220 =cut
221
222 __PACKAGE__->has_many(
223   "aqbaskets",
224   "Koha::Schema::Result::Aqbasket",
225   { "foreign.branch" => "self.branchcode" },
226   { cascade_copy => 0, cascade_delete => 0 },
227 );
228
229 =head2 article_requests
230
231 Type: has_many
232
233 Related object: L<Koha::Schema::Result::ArticleRequest>
234
235 =cut
236
237 __PACKAGE__->has_many(
238   "article_requests",
239   "Koha::Schema::Result::ArticleRequest",
240   { "foreign.branchcode" => "self.branchcode" },
241   { cascade_copy => 0, cascade_delete => 0 },
242 );
243
244 =head2 authorised_values_branches
245
246 Type: has_many
247
248 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
249
250 =cut
251
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 },
257 );
258
259 =head2 borrower_attribute_types_branches
260
261 Type: has_many
262
263 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
264
265 =cut
266
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 },
272 );
273
274 =head2 borrowers
275
276 Type: has_many
277
278 Related object: L<Koha::Schema::Result::Borrower>
279
280 =cut
281
282 __PACKAGE__->has_many(
283   "borrowers",
284   "Koha::Schema::Result::Borrower",
285   { "foreign.branchcode" => "self.branchcode" },
286   { cascade_copy => 0, cascade_delete => 0 },
287 );
288
289 =head2 branch_borrower_circ_rules
290
291 Type: has_many
292
293 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
294
295 =cut
296
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 },
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 branchtransfers_frombranches
320
321 Type: has_many
322
323 Related object: L<Koha::Schema::Result::Branchtransfer>
324
325 =cut
326
327 __PACKAGE__->has_many(
328   "branchtransfers_frombranches",
329   "Koha::Schema::Result::Branchtransfer",
330   { "foreign.frombranch" => "self.branchcode" },
331   { cascade_copy => 0, cascade_delete => 0 },
332 );
333
334 =head2 branchtransfers_tobranches
335
336 Type: has_many
337
338 Related object: L<Koha::Schema::Result::Branchtransfer>
339
340 =cut
341
342 __PACKAGE__->has_many(
343   "branchtransfers_tobranches",
344   "Koha::Schema::Result::Branchtransfer",
345   { "foreign.tobranch" => "self.branchcode" },
346   { cascade_copy => 0, cascade_delete => 0 },
347 );
348
349 =head2 categories_branches
350
351 Type: has_many
352
353 Related object: L<Koha::Schema::Result::CategoriesBranch>
354
355 =cut
356
357 __PACKAGE__->has_many(
358   "categories_branches",
359   "Koha::Schema::Result::CategoriesBranch",
360   { "foreign.branchcode" => "self.branchcode" },
361   { cascade_copy => 0, cascade_delete => 0 },
362 );
363
364 =head2 circulation_rules
365
366 Type: has_many
367
368 Related object: L<Koha::Schema::Result::CirculationRule>
369
370 =cut
371
372 __PACKAGE__->has_many(
373   "circulation_rules",
374   "Koha::Schema::Result::CirculationRule",
375   { "foreign.branchcode" => "self.branchcode" },
376   { cascade_copy => 0, cascade_delete => 0 },
377 );
378
379 =head2 club_enrollments
380
381 Type: has_many
382
383 Related object: L<Koha::Schema::Result::ClubEnrollment>
384
385 =cut
386
387 __PACKAGE__->has_many(
388   "club_enrollments",
389   "Koha::Schema::Result::ClubEnrollment",
390   { "foreign.branchcode" => "self.branchcode" },
391   { cascade_copy => 0, cascade_delete => 0 },
392 );
393
394 =head2 club_templates
395
396 Type: has_many
397
398 Related object: L<Koha::Schema::Result::ClubTemplate>
399
400 =cut
401
402 __PACKAGE__->has_many(
403   "club_templates",
404   "Koha::Schema::Result::ClubTemplate",
405   { "foreign.branchcode" => "self.branchcode" },
406   { cascade_copy => 0, cascade_delete => 0 },
407 );
408
409 =head2 clubs
410
411 Type: has_many
412
413 Related object: L<Koha::Schema::Result::Club>
414
415 =cut
416
417 __PACKAGE__->has_many(
418   "clubs",
419   "Koha::Schema::Result::Club",
420   { "foreign.branchcode" => "self.branchcode" },
421   { cascade_copy => 0, cascade_delete => 0 },
422 );
423
424 =head2 collections
425
426 Type: has_many
427
428 Related object: L<Koha::Schema::Result::Collection>
429
430 =cut
431
432 __PACKAGE__->has_many(
433   "collections",
434   "Koha::Schema::Result::Collection",
435   { "foreign.colBranchcode" => "self.branchcode" },
436   { cascade_copy => 0, cascade_delete => 0 },
437 );
438
439 =head2 course_items
440
441 Type: has_many
442
443 Related object: L<Koha::Schema::Result::CourseItem>
444
445 =cut
446
447 __PACKAGE__->has_many(
448   "course_items",
449   "Koha::Schema::Result::CourseItem",
450   { "foreign.holdingbranch" => "self.branchcode" },
451   { cascade_copy => 0, cascade_delete => 0 },
452 );
453
454 =head2 creator_batches
455
456 Type: has_many
457
458 Related object: L<Koha::Schema::Result::CreatorBatch>
459
460 =cut
461
462 __PACKAGE__->has_many(
463   "creator_batches",
464   "Koha::Schema::Result::CreatorBatch",
465   { "foreign.branch_code" => "self.branchcode" },
466   { cascade_copy => 0, cascade_delete => 0 },
467 );
468
469 =head2 default_branch_circ_rule
470
471 Type: might_have
472
473 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
474
475 =cut
476
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 },
482 );
483
484 =head2 edifact_eans
485
486 Type: has_many
487
488 Related object: L<Koha::Schema::Result::EdifactEan>
489
490 =cut
491
492 __PACKAGE__->has_many(
493   "edifact_eans",
494   "Koha::Schema::Result::EdifactEan",
495   { "foreign.branchcode" => "self.branchcode" },
496   { cascade_copy => 0, cascade_delete => 0 },
497 );
498
499 =head2 hold_fill_targets
500
501 Type: has_many
502
503 Related object: L<Koha::Schema::Result::HoldFillTarget>
504
505 =cut
506
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 },
512 );
513
514 =head2 illrequests
515
516 Type: has_many
517
518 Related object: L<Koha::Schema::Result::Illrequest>
519
520 =cut
521
522 __PACKAGE__->has_many(
523   "illrequests",
524   "Koha::Schema::Result::Illrequest",
525   { "foreign.branchcode" => "self.branchcode" },
526   { cascade_copy => 0, cascade_delete => 0 },
527 );
528
529 =head2 items_holdingbranches
530
531 Type: has_many
532
533 Related object: L<Koha::Schema::Result::Item>
534
535 =cut
536
537 __PACKAGE__->has_many(
538   "items_holdingbranches",
539   "Koha::Schema::Result::Item",
540   { "foreign.holdingbranch" => "self.branchcode" },
541   { cascade_copy => 0, cascade_delete => 0 },
542 );
543
544 =head2 items_homebranches
545
546 Type: has_many
547
548 Related object: L<Koha::Schema::Result::Item>
549
550 =cut
551
552 __PACKAGE__->has_many(
553   "items_homebranches",
554   "Koha::Schema::Result::Item",
555   { "foreign.homebranch" => "self.branchcode" },
556   { cascade_copy => 0, cascade_delete => 0 },
557 );
558
559 =head2 library_groups
560
561 Type: has_many
562
563 Related object: L<Koha::Schema::Result::LibraryGroup>
564
565 =cut
566
567 __PACKAGE__->has_many(
568   "library_groups",
569   "Koha::Schema::Result::LibraryGroup",
570   { "foreign.branchcode" => "self.branchcode" },
571   { cascade_copy => 0, cascade_delete => 0 },
572 );
573
574 =head2 opac_news
575
576 Type: has_many
577
578 Related object: L<Koha::Schema::Result::OpacNews>
579
580 =cut
581
582 __PACKAGE__->has_many(
583   "opac_news",
584   "Koha::Schema::Result::OpacNews",
585   { "foreign.branchcode" => "self.branchcode" },
586   { cascade_copy => 0, cascade_delete => 0 },
587 );
588
589 =head2 reserves
590
591 Type: has_many
592
593 Related object: L<Koha::Schema::Result::Reserve>
594
595 =cut
596
597 __PACKAGE__->has_many(
598   "reserves",
599   "Koha::Schema::Result::Reserve",
600   { "foreign.branchcode" => "self.branchcode" },
601   { cascade_copy => 0, cascade_delete => 0 },
602 );
603
604 =head2 transport_cost_frombranches
605
606 Type: has_many
607
608 Related object: L<Koha::Schema::Result::TransportCost>
609
610 =cut
611
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 },
617 );
618
619 =head2 transport_cost_tobranches
620
621 Type: has_many
622
623 Related object: L<Koha::Schema::Result::TransportCost>
624
625 =cut
626
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 },
632 );
633
634
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
637
638
639 # You can replace this text with custom code or comments, and it will be preserved on regeneration
640
641 sub koha_objects_class {
642     'Koha::Libraries';
643 }
644
645 1;