Bug 16735: DBIC Schema files
[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: 'mediumtext'
36   is_nullable: 0
37
38 =head2 branchaddress1
39
40   data_type: 'mediumtext'
41   is_nullable: 1
42
43 =head2 branchaddress2
44
45   data_type: 'mediumtext'
46   is_nullable: 1
47
48 =head2 branchaddress3
49
50   data_type: 'mediumtext'
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: 'mediumtext'
62   is_nullable: 1
63
64 =head2 branchstate
65
66   data_type: 'mediumtext'
67   is_nullable: 1
68
69 =head2 branchcountry
70
71   data_type: 'text'
72   is_nullable: 1
73
74 =head2 branchphone
75
76   data_type: 'mediumtext'
77   is_nullable: 1
78
79 =head2 branchfax
80
81   data_type: 'mediumtext'
82   is_nullable: 1
83
84 =head2 branchemail
85
86   data_type: 'mediumtext'
87   is_nullable: 1
88
89 =head2 branchreplyto
90
91   data_type: 'mediumtext'
92   is_nullable: 1
93
94 =head2 branchreturnpath
95
96   data_type: 'mediumtext'
97   is_nullable: 1
98
99 =head2 branchurl
100
101   data_type: 'mediumtext'
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: 'mediumtext'
124   is_nullable: 1
125
126 =head2 opac_info
127
128   data_type: 'text'
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 =cut
144
145 __PACKAGE__->add_columns(
146   "branchcode",
147   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
148   "branchname",
149   { data_type => "mediumtext", is_nullable => 0 },
150   "branchaddress1",
151   { data_type => "mediumtext", is_nullable => 1 },
152   "branchaddress2",
153   { data_type => "mediumtext", is_nullable => 1 },
154   "branchaddress3",
155   { data_type => "mediumtext", is_nullable => 1 },
156   "branchzip",
157   { data_type => "varchar", is_nullable => 1, size => 25 },
158   "branchcity",
159   { data_type => "mediumtext", is_nullable => 1 },
160   "branchstate",
161   { data_type => "mediumtext", is_nullable => 1 },
162   "branchcountry",
163   { data_type => "text", is_nullable => 1 },
164   "branchphone",
165   { data_type => "mediumtext", is_nullable => 1 },
166   "branchfax",
167   { data_type => "mediumtext", is_nullable => 1 },
168   "branchemail",
169   { data_type => "mediumtext", is_nullable => 1 },
170   "branchreplyto",
171   { data_type => "mediumtext", is_nullable => 1 },
172   "branchreturnpath",
173   { data_type => "mediumtext", is_nullable => 1 },
174   "branchurl",
175   { data_type => "mediumtext", is_nullable => 1 },
176   "issuing",
177   { data_type => "tinyint", is_nullable => 1 },
178   "branchip",
179   { data_type => "varchar", is_nullable => 1, size => 15 },
180   "branchprinter",
181   { data_type => "varchar", is_nullable => 1, size => 100 },
182   "branchnotes",
183   { data_type => "mediumtext", is_nullable => 1 },
184   "opac_info",
185   { data_type => "text", is_nullable => 1 },
186   "geolocation",
187   { data_type => "varchar", is_nullable => 1, size => 255 },
188   "marcorgcode",
189   { data_type => "varchar", is_nullable => 1, size => 16 },
190 );
191
192 =head1 PRIMARY KEY
193
194 =over 4
195
196 =item * L</branchcode>
197
198 =back
199
200 =cut
201
202 __PACKAGE__->set_primary_key("branchcode");
203
204 =head1 RELATIONS
205
206 =head2 aqbaskets
207
208 Type: has_many
209
210 Related object: L<Koha::Schema::Result::Aqbasket>
211
212 =cut
213
214 __PACKAGE__->has_many(
215   "aqbaskets",
216   "Koha::Schema::Result::Aqbasket",
217   { "foreign.branch" => "self.branchcode" },
218   { cascade_copy => 0, cascade_delete => 0 },
219 );
220
221 =head2 article_requests
222
223 Type: has_many
224
225 Related object: L<Koha::Schema::Result::ArticleRequest>
226
227 =cut
228
229 __PACKAGE__->has_many(
230   "article_requests",
231   "Koha::Schema::Result::ArticleRequest",
232   { "foreign.branchcode" => "self.branchcode" },
233   { cascade_copy => 0, cascade_delete => 0 },
234 );
235
236 =head2 authorised_values_branches
237
238 Type: has_many
239
240 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
241
242 =cut
243
244 __PACKAGE__->has_many(
245   "authorised_values_branches",
246   "Koha::Schema::Result::AuthorisedValuesBranch",
247   { "foreign.branchcode" => "self.branchcode" },
248   { cascade_copy => 0, cascade_delete => 0 },
249 );
250
251 =head2 borrower_attribute_types_branches
252
253 Type: has_many
254
255 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
256
257 =cut
258
259 __PACKAGE__->has_many(
260   "borrower_attribute_types_branches",
261   "Koha::Schema::Result::BorrowerAttributeTypesBranch",
262   { "foreign.b_branchcode" => "self.branchcode" },
263   { cascade_copy => 0, cascade_delete => 0 },
264 );
265
266 =head2 borrowers
267
268 Type: has_many
269
270 Related object: L<Koha::Schema::Result::Borrower>
271
272 =cut
273
274 __PACKAGE__->has_many(
275   "borrowers",
276   "Koha::Schema::Result::Borrower",
277   { "foreign.branchcode" => "self.branchcode" },
278   { cascade_copy => 0, cascade_delete => 0 },
279 );
280
281 =head2 branch_borrower_circ_rules
282
283 Type: has_many
284
285 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
286
287 =cut
288
289 __PACKAGE__->has_many(
290   "branch_borrower_circ_rules",
291   "Koha::Schema::Result::BranchBorrowerCircRule",
292   { "foreign.branchcode" => "self.branchcode" },
293   { cascade_copy => 0, cascade_delete => 0 },
294 );
295
296 =head2 branch_item_rules
297
298 Type: has_many
299
300 Related object: L<Koha::Schema::Result::BranchItemRule>
301
302 =cut
303
304 __PACKAGE__->has_many(
305   "branch_item_rules",
306   "Koha::Schema::Result::BranchItemRule",
307   { "foreign.branchcode" => "self.branchcode" },
308   { cascade_copy => 0, cascade_delete => 0 },
309 );
310
311 =head2 branchtransfers_frombranches
312
313 Type: has_many
314
315 Related object: L<Koha::Schema::Result::Branchtransfer>
316
317 =cut
318
319 __PACKAGE__->has_many(
320   "branchtransfers_frombranches",
321   "Koha::Schema::Result::Branchtransfer",
322   { "foreign.frombranch" => "self.branchcode" },
323   { cascade_copy => 0, cascade_delete => 0 },
324 );
325
326 =head2 branchtransfers_tobranches
327
328 Type: has_many
329
330 Related object: L<Koha::Schema::Result::Branchtransfer>
331
332 =cut
333
334 __PACKAGE__->has_many(
335   "branchtransfers_tobranches",
336   "Koha::Schema::Result::Branchtransfer",
337   { "foreign.tobranch" => "self.branchcode" },
338   { cascade_copy => 0, cascade_delete => 0 },
339 );
340
341 =head2 categories_branches
342
343 Type: has_many
344
345 Related object: L<Koha::Schema::Result::CategoriesBranch>
346
347 =cut
348
349 __PACKAGE__->has_many(
350   "categories_branches",
351   "Koha::Schema::Result::CategoriesBranch",
352   { "foreign.branchcode" => "self.branchcode" },
353   { cascade_copy => 0, cascade_delete => 0 },
354 );
355
356 =head2 club_enrollments
357
358 Type: has_many
359
360 Related object: L<Koha::Schema::Result::ClubEnrollment>
361
362 =cut
363
364 __PACKAGE__->has_many(
365   "club_enrollments",
366   "Koha::Schema::Result::ClubEnrollment",
367   { "foreign.branchcode" => "self.branchcode" },
368   { cascade_copy => 0, cascade_delete => 0 },
369 );
370
371 =head2 club_templates
372
373 Type: has_many
374
375 Related object: L<Koha::Schema::Result::ClubTemplate>
376
377 =cut
378
379 __PACKAGE__->has_many(
380   "club_templates",
381   "Koha::Schema::Result::ClubTemplate",
382   { "foreign.branchcode" => "self.branchcode" },
383   { cascade_copy => 0, cascade_delete => 0 },
384 );
385
386 =head2 clubs
387
388 Type: has_many
389
390 Related object: L<Koha::Schema::Result::Club>
391
392 =cut
393
394 __PACKAGE__->has_many(
395   "clubs",
396   "Koha::Schema::Result::Club",
397   { "foreign.branchcode" => "self.branchcode" },
398   { cascade_copy => 0, cascade_delete => 0 },
399 );
400
401 =head2 collections
402
403 Type: has_many
404
405 Related object: L<Koha::Schema::Result::Collection>
406
407 =cut
408
409 __PACKAGE__->has_many(
410   "collections",
411   "Koha::Schema::Result::Collection",
412   { "foreign.colBranchcode" => "self.branchcode" },
413   { cascade_copy => 0, cascade_delete => 0 },
414 );
415
416 =head2 course_items
417
418 Type: has_many
419
420 Related object: L<Koha::Schema::Result::CourseItem>
421
422 =cut
423
424 __PACKAGE__->has_many(
425   "course_items",
426   "Koha::Schema::Result::CourseItem",
427   { "foreign.holdingbranch" => "self.branchcode" },
428   { cascade_copy => 0, cascade_delete => 0 },
429 );
430
431 =head2 creator_batches
432
433 Type: has_many
434
435 Related object: L<Koha::Schema::Result::CreatorBatch>
436
437 =cut
438
439 __PACKAGE__->has_many(
440   "creator_batches",
441   "Koha::Schema::Result::CreatorBatch",
442   { "foreign.branch_code" => "self.branchcode" },
443   { cascade_copy => 0, cascade_delete => 0 },
444 );
445
446 =head2 default_branch_circ_rule
447
448 Type: might_have
449
450 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
451
452 =cut
453
454 __PACKAGE__->might_have(
455   "default_branch_circ_rule",
456   "Koha::Schema::Result::DefaultBranchCircRule",
457   { "foreign.branchcode" => "self.branchcode" },
458   { cascade_copy => 0, cascade_delete => 0 },
459 );
460
461 =head2 edifact_eans
462
463 Type: has_many
464
465 Related object: L<Koha::Schema::Result::EdifactEan>
466
467 =cut
468
469 __PACKAGE__->has_many(
470   "edifact_eans",
471   "Koha::Schema::Result::EdifactEan",
472   { "foreign.branchcode" => "self.branchcode" },
473   { cascade_copy => 0, cascade_delete => 0 },
474 );
475
476 =head2 hold_fill_targets
477
478 Type: has_many
479
480 Related object: L<Koha::Schema::Result::HoldFillTarget>
481
482 =cut
483
484 __PACKAGE__->has_many(
485   "hold_fill_targets",
486   "Koha::Schema::Result::HoldFillTarget",
487   { "foreign.source_branchcode" => "self.branchcode" },
488   { cascade_copy => 0, cascade_delete => 0 },
489 );
490
491 =head2 illrequests
492
493 Type: has_many
494
495 Related object: L<Koha::Schema::Result::Illrequest>
496
497 =cut
498
499 __PACKAGE__->has_many(
500   "illrequests",
501   "Koha::Schema::Result::Illrequest",
502   { "foreign.branchcode" => "self.branchcode" },
503   { cascade_copy => 0, cascade_delete => 0 },
504 );
505
506 =head2 items_holdingbranches
507
508 Type: has_many
509
510 Related object: L<Koha::Schema::Result::Item>
511
512 =cut
513
514 __PACKAGE__->has_many(
515   "items_holdingbranches",
516   "Koha::Schema::Result::Item",
517   { "foreign.holdingbranch" => "self.branchcode" },
518   { cascade_copy => 0, cascade_delete => 0 },
519 );
520
521 =head2 items_homebranches
522
523 Type: has_many
524
525 Related object: L<Koha::Schema::Result::Item>
526
527 =cut
528
529 __PACKAGE__->has_many(
530   "items_homebranches",
531   "Koha::Schema::Result::Item",
532   { "foreign.homebranch" => "self.branchcode" },
533   { cascade_copy => 0, cascade_delete => 0 },
534 );
535
536 =head2 library_groups
537
538 Type: has_many
539
540 Related object: L<Koha::Schema::Result::LibraryGroup>
541
542 =cut
543
544 __PACKAGE__->has_many(
545   "library_groups",
546   "Koha::Schema::Result::LibraryGroup",
547   { "foreign.branchcode" => "self.branchcode" },
548   { cascade_copy => 0, cascade_delete => 0 },
549 );
550
551 =head2 opac_news
552
553 Type: has_many
554
555 Related object: L<Koha::Schema::Result::OpacNews>
556
557 =cut
558
559 __PACKAGE__->has_many(
560   "opac_news",
561   "Koha::Schema::Result::OpacNews",
562   { "foreign.branchcode" => "self.branchcode" },
563   { cascade_copy => 0, cascade_delete => 0 },
564 );
565
566 =head2 reserves
567
568 Type: has_many
569
570 Related object: L<Koha::Schema::Result::Reserve>
571
572 =cut
573
574 __PACKAGE__->has_many(
575   "reserves",
576   "Koha::Schema::Result::Reserve",
577   { "foreign.branchcode" => "self.branchcode" },
578   { cascade_copy => 0, cascade_delete => 0 },
579 );
580
581 =head2 transport_cost_frombranches
582
583 Type: has_many
584
585 Related object: L<Koha::Schema::Result::TransportCost>
586
587 =cut
588
589 __PACKAGE__->has_many(
590   "transport_cost_frombranches",
591   "Koha::Schema::Result::TransportCost",
592   { "foreign.frombranch" => "self.branchcode" },
593   { cascade_copy => 0, cascade_delete => 0 },
594 );
595
596 =head2 transport_cost_tobranches
597
598 Type: has_many
599
600 Related object: L<Koha::Schema::Result::TransportCost>
601
602 =cut
603
604 __PACKAGE__->has_many(
605   "transport_cost_tobranches",
606   "Koha::Schema::Result::TransportCost",
607   { "foreign.tobranch" => "self.branchcode" },
608   { cascade_copy => 0, cascade_delete => 0 },
609 );
610
611
612 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-12-05 14:08:18
613 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g+WicMjGntjAgcKrbn4IdQ
614
615
616 # You can replace this text with custom code or comments, and it will be preserved on regeneration
617
618 sub koha_objects_class {
619     'Koha::Libraries';
620 }
621
622 1;