Bug 14610 - Update 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 =cut
132
133 __PACKAGE__->add_columns(
134   "branchcode",
135   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
136   "branchname",
137   { data_type => "mediumtext", is_nullable => 0 },
138   "branchaddress1",
139   { data_type => "mediumtext", is_nullable => 1 },
140   "branchaddress2",
141   { data_type => "mediumtext", is_nullable => 1 },
142   "branchaddress3",
143   { data_type => "mediumtext", is_nullable => 1 },
144   "branchzip",
145   { data_type => "varchar", is_nullable => 1, size => 25 },
146   "branchcity",
147   { data_type => "mediumtext", is_nullable => 1 },
148   "branchstate",
149   { data_type => "mediumtext", is_nullable => 1 },
150   "branchcountry",
151   { data_type => "text", is_nullable => 1 },
152   "branchphone",
153   { data_type => "mediumtext", is_nullable => 1 },
154   "branchfax",
155   { data_type => "mediumtext", is_nullable => 1 },
156   "branchemail",
157   { data_type => "mediumtext", is_nullable => 1 },
158   "branchreplyto",
159   { data_type => "mediumtext", is_nullable => 1 },
160   "branchreturnpath",
161   { data_type => "mediumtext", is_nullable => 1 },
162   "branchurl",
163   { data_type => "mediumtext", is_nullable => 1 },
164   "issuing",
165   { data_type => "tinyint", is_nullable => 1 },
166   "branchip",
167   { data_type => "varchar", is_nullable => 1, size => 15 },
168   "branchprinter",
169   { data_type => "varchar", is_nullable => 1, size => 100 },
170   "branchnotes",
171   { data_type => "mediumtext", is_nullable => 1 },
172   "opac_info",
173   { data_type => "text", is_nullable => 1 },
174 );
175
176 =head1 PRIMARY KEY
177
178 =over 4
179
180 =item * L</branchcode>
181
182 =back
183
184 =cut
185
186 __PACKAGE__->set_primary_key("branchcode");
187
188 =head1 RELATIONS
189
190 =head2 aqbaskets
191
192 Type: has_many
193
194 Related object: L<Koha::Schema::Result::Aqbasket>
195
196 =cut
197
198 __PACKAGE__->has_many(
199   "aqbaskets",
200   "Koha::Schema::Result::Aqbasket",
201   { "foreign.branch" => "self.branchcode" },
202   { cascade_copy => 0, cascade_delete => 0 },
203 );
204
205 =head2 article_requests
206
207 Type: has_many
208
209 Related object: L<Koha::Schema::Result::ArticleRequest>
210
211 =cut
212
213 __PACKAGE__->has_many(
214   "article_requests",
215   "Koha::Schema::Result::ArticleRequest",
216   { "foreign.branchcode" => "self.branchcode" },
217   { cascade_copy => 0, cascade_delete => 0 },
218 );
219
220 =head2 authorised_values_branches
221
222 Type: has_many
223
224 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
225
226 =cut
227
228 __PACKAGE__->has_many(
229   "authorised_values_branches",
230   "Koha::Schema::Result::AuthorisedValuesBranch",
231   { "foreign.branchcode" => "self.branchcode" },
232   { cascade_copy => 0, cascade_delete => 0 },
233 );
234
235 =head2 borrower_attribute_types_branches
236
237 Type: has_many
238
239 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
240
241 =cut
242
243 __PACKAGE__->has_many(
244   "borrower_attribute_types_branches",
245   "Koha::Schema::Result::BorrowerAttributeTypesBranch",
246   { "foreign.b_branchcode" => "self.branchcode" },
247   { cascade_copy => 0, cascade_delete => 0 },
248 );
249
250 =head2 borrowers
251
252 Type: has_many
253
254 Related object: L<Koha::Schema::Result::Borrower>
255
256 =cut
257
258 __PACKAGE__->has_many(
259   "borrowers",
260   "Koha::Schema::Result::Borrower",
261   { "foreign.branchcode" => "self.branchcode" },
262   { cascade_copy => 0, cascade_delete => 0 },
263 );
264
265 =head2 branch_borrower_circ_rules
266
267 Type: has_many
268
269 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
270
271 =cut
272
273 __PACKAGE__->has_many(
274   "branch_borrower_circ_rules",
275   "Koha::Schema::Result::BranchBorrowerCircRule",
276   { "foreign.branchcode" => "self.branchcode" },
277   { cascade_copy => 0, cascade_delete => 0 },
278 );
279
280 =head2 branch_item_rules
281
282 Type: has_many
283
284 Related object: L<Koha::Schema::Result::BranchItemRule>
285
286 =cut
287
288 __PACKAGE__->has_many(
289   "branch_item_rules",
290   "Koha::Schema::Result::BranchItemRule",
291   { "foreign.branchcode" => "self.branchcode" },
292   { cascade_copy => 0, cascade_delete => 0 },
293 );
294
295 =head2 branchrelations
296
297 Type: has_many
298
299 Related object: L<Koha::Schema::Result::Branchrelation>
300
301 =cut
302
303 __PACKAGE__->has_many(
304   "branchrelations",
305   "Koha::Schema::Result::Branchrelation",
306   { "foreign.branchcode" => "self.branchcode" },
307   { cascade_copy => 0, cascade_delete => 0 },
308 );
309
310 =head2 branchtransfers_frombranches
311
312 Type: has_many
313
314 Related object: L<Koha::Schema::Result::Branchtransfer>
315
316 =cut
317
318 __PACKAGE__->has_many(
319   "branchtransfers_frombranches",
320   "Koha::Schema::Result::Branchtransfer",
321   { "foreign.frombranch" => "self.branchcode" },
322   { cascade_copy => 0, cascade_delete => 0 },
323 );
324
325 =head2 branchtransfers_tobranches
326
327 Type: has_many
328
329 Related object: L<Koha::Schema::Result::Branchtransfer>
330
331 =cut
332
333 __PACKAGE__->has_many(
334   "branchtransfers_tobranches",
335   "Koha::Schema::Result::Branchtransfer",
336   { "foreign.tobranch" => "self.branchcode" },
337   { cascade_copy => 0, cascade_delete => 0 },
338 );
339
340 =head2 categories_branches
341
342 Type: has_many
343
344 Related object: L<Koha::Schema::Result::CategoriesBranch>
345
346 =cut
347
348 __PACKAGE__->has_many(
349   "categories_branches",
350   "Koha::Schema::Result::CategoriesBranch",
351   { "foreign.branchcode" => "self.branchcode" },
352   { cascade_copy => 0, cascade_delete => 0 },
353 );
354
355 =head2 collections
356
357 Type: has_many
358
359 Related object: L<Koha::Schema::Result::Collection>
360
361 =cut
362
363 __PACKAGE__->has_many(
364   "collections",
365   "Koha::Schema::Result::Collection",
366   { "foreign.colBranchcode" => "self.branchcode" },
367   { cascade_copy => 0, cascade_delete => 0 },
368 );
369
370 =head2 course_items
371
372 Type: has_many
373
374 Related object: L<Koha::Schema::Result::CourseItem>
375
376 =cut
377
378 __PACKAGE__->has_many(
379   "course_items",
380   "Koha::Schema::Result::CourseItem",
381   { "foreign.holdingbranch" => "self.branchcode" },
382   { cascade_copy => 0, cascade_delete => 0 },
383 );
384
385 =head2 creator_batches
386
387 Type: has_many
388
389 Related object: L<Koha::Schema::Result::CreatorBatch>
390
391 =cut
392
393 __PACKAGE__->has_many(
394   "creator_batches",
395   "Koha::Schema::Result::CreatorBatch",
396   { "foreign.branch_code" => "self.branchcode" },
397   { cascade_copy => 0, cascade_delete => 0 },
398 );
399
400 =head2 default_branch_circ_rule
401
402 Type: might_have
403
404 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
405
406 =cut
407
408 __PACKAGE__->might_have(
409   "default_branch_circ_rule",
410   "Koha::Schema::Result::DefaultBranchCircRule",
411   { "foreign.branchcode" => "self.branchcode" },
412   { cascade_copy => 0, cascade_delete => 0 },
413 );
414
415 =head2 edifact_eans
416
417 Type: has_many
418
419 Related object: L<Koha::Schema::Result::EdifactEan>
420
421 =cut
422
423 __PACKAGE__->has_many(
424   "edifact_eans",
425   "Koha::Schema::Result::EdifactEan",
426   { "foreign.branchcode" => "self.branchcode" },
427   { cascade_copy => 0, cascade_delete => 0 },
428 );
429
430 =head2 hold_fill_targets
431
432 Type: has_many
433
434 Related object: L<Koha::Schema::Result::HoldFillTarget>
435
436 =cut
437
438 __PACKAGE__->has_many(
439   "hold_fill_targets",
440   "Koha::Schema::Result::HoldFillTarget",
441   { "foreign.source_branchcode" => "self.branchcode" },
442   { cascade_copy => 0, cascade_delete => 0 },
443 );
444
445 =head2 items_holdingbranches
446
447 Type: has_many
448
449 Related object: L<Koha::Schema::Result::Item>
450
451 =cut
452
453 __PACKAGE__->has_many(
454   "items_holdingbranches",
455   "Koha::Schema::Result::Item",
456   { "foreign.holdingbranch" => "self.branchcode" },
457   { cascade_copy => 0, cascade_delete => 0 },
458 );
459
460 =head2 items_homebranches
461
462 Type: has_many
463
464 Related object: L<Koha::Schema::Result::Item>
465
466 =cut
467
468 __PACKAGE__->has_many(
469   "items_homebranches",
470   "Koha::Schema::Result::Item",
471   { "foreign.homebranch" => "self.branchcode" },
472   { cascade_copy => 0, cascade_delete => 0 },
473 );
474
475 =head2 opac_news
476
477 Type: has_many
478
479 Related object: L<Koha::Schema::Result::OpacNews>
480
481 =cut
482
483 __PACKAGE__->has_many(
484   "opac_news",
485   "Koha::Schema::Result::OpacNews",
486   { "foreign.branchcode" => "self.branchcode" },
487   { cascade_copy => 0, cascade_delete => 0 },
488 );
489
490 =head2 reserves
491
492 Type: has_many
493
494 Related object: L<Koha::Schema::Result::Reserve>
495
496 =cut
497
498 __PACKAGE__->has_many(
499   "reserves",
500   "Koha::Schema::Result::Reserve",
501   { "foreign.branchcode" => "self.branchcode" },
502   { cascade_copy => 0, cascade_delete => 0 },
503 );
504
505 =head2 transport_cost_frombranches
506
507 Type: has_many
508
509 Related object: L<Koha::Schema::Result::TransportCost>
510
511 =cut
512
513 __PACKAGE__->has_many(
514   "transport_cost_frombranches",
515   "Koha::Schema::Result::TransportCost",
516   { "foreign.frombranch" => "self.branchcode" },
517   { cascade_copy => 0, cascade_delete => 0 },
518 );
519
520 =head2 transport_cost_tobranches
521
522 Type: has_many
523
524 Related object: L<Koha::Schema::Result::TransportCost>
525
526 =cut
527
528 __PACKAGE__->has_many(
529   "transport_cost_tobranches",
530   "Koha::Schema::Result::TransportCost",
531   { "foreign.tobranch" => "self.branchcode" },
532   { cascade_copy => 0, cascade_delete => 0 },
533 );
534
535 =head2 categorycodes
536
537 Type: many_to_many
538
539 Composing rels: L</branchrelations> -> categorycode
540
541 =cut
542
543 __PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
544
545
546 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21
547 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/9YwsU+GXK+fzc6IX2Tj5g
548
549
550 # You can replace this text with custom code or comments, and it will be preserved on regeneration
551
552 sub koha_objects_class {
553     'Koha::Libraries';
554 }
555
556 1;