Bug 14279: Remove CGI::scrolling_list from issues_avg_stats.pl
[koha.git] / Koha / Schema / Result / Branch.pm
blob106123a8348b76d387249aa9a7fa47f2e0a57c4c
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: 'mediumtext'
36 is_nullable: 0
38 =head2 branchaddress1
40 data_type: 'mediumtext'
41 is_nullable: 1
43 =head2 branchaddress2
45 data_type: 'mediumtext'
46 is_nullable: 1
48 =head2 branchaddress3
50 data_type: 'mediumtext'
51 is_nullable: 1
53 =head2 branchzip
55 data_type: 'varchar'
56 is_nullable: 1
57 size: 25
59 =head2 branchcity
61 data_type: 'mediumtext'
62 is_nullable: 1
64 =head2 branchstate
66 data_type: 'mediumtext'
67 is_nullable: 1
69 =head2 branchcountry
71 data_type: 'text'
72 is_nullable: 1
74 =head2 branchphone
76 data_type: 'mediumtext'
77 is_nullable: 1
79 =head2 branchfax
81 data_type: 'mediumtext'
82 is_nullable: 1
84 =head2 branchemail
86 data_type: 'mediumtext'
87 is_nullable: 1
89 =head2 branchreplyto
91 data_type: 'mediumtext'
92 is_nullable: 1
94 =head2 branchreturnpath
96 data_type: 'mediumtext'
97 is_nullable: 1
99 =head2 branchurl
101 data_type: 'mediumtext'
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: 'mediumtext'
124 is_nullable: 1
126 =head2 opac_info
128 data_type: 'text'
129 is_nullable: 1
131 =cut
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 },
176 =head1 PRIMARY KEY
178 =over 4
180 =item * L</branchcode>
182 =back
184 =cut
186 __PACKAGE__->set_primary_key("branchcode");
188 =head1 RELATIONS
190 =head2 aqbaskets
192 Type: has_many
194 Related object: L<Koha::Schema::Result::Aqbasket>
196 =cut
198 __PACKAGE__->has_many(
199 "aqbaskets",
200 "Koha::Schema::Result::Aqbasket",
201 { "foreign.branch" => "self.branchcode" },
202 { cascade_copy => 0, cascade_delete => 0 },
205 =head2 authorised_values_branches
207 Type: has_many
209 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
211 =cut
213 __PACKAGE__->has_many(
214 "authorised_values_branches",
215 "Koha::Schema::Result::AuthorisedValuesBranch",
216 { "foreign.branchcode" => "self.branchcode" },
217 { cascade_copy => 0, cascade_delete => 0 },
220 =head2 borrower_attribute_types_branches
222 Type: has_many
224 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
226 =cut
228 __PACKAGE__->has_many(
229 "borrower_attribute_types_branches",
230 "Koha::Schema::Result::BorrowerAttributeTypesBranch",
231 { "foreign.b_branchcode" => "self.branchcode" },
232 { cascade_copy => 0, cascade_delete => 0 },
235 =head2 borrowers
237 Type: has_many
239 Related object: L<Koha::Schema::Result::Borrower>
241 =cut
243 __PACKAGE__->has_many(
244 "borrowers",
245 "Koha::Schema::Result::Borrower",
246 { "foreign.branchcode" => "self.branchcode" },
247 { cascade_copy => 0, cascade_delete => 0 },
250 =head2 branch_borrower_circ_rules
252 Type: has_many
254 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
256 =cut
258 __PACKAGE__->has_many(
259 "branch_borrower_circ_rules",
260 "Koha::Schema::Result::BranchBorrowerCircRule",
261 { "foreign.branchcode" => "self.branchcode" },
262 { cascade_copy => 0, cascade_delete => 0 },
265 =head2 branch_item_rules
267 Type: has_many
269 Related object: L<Koha::Schema::Result::BranchItemRule>
271 =cut
273 __PACKAGE__->has_many(
274 "branch_item_rules",
275 "Koha::Schema::Result::BranchItemRule",
276 { "foreign.branchcode" => "self.branchcode" },
277 { cascade_copy => 0, cascade_delete => 0 },
280 =head2 branchrelations
282 Type: has_many
284 Related object: L<Koha::Schema::Result::Branchrelation>
286 =cut
288 __PACKAGE__->has_many(
289 "branchrelations",
290 "Koha::Schema::Result::Branchrelation",
291 { "foreign.branchcode" => "self.branchcode" },
292 { cascade_copy => 0, cascade_delete => 0 },
295 =head2 branchtransfers_frombranches
297 Type: has_many
299 Related object: L<Koha::Schema::Result::Branchtransfer>
301 =cut
303 __PACKAGE__->has_many(
304 "branchtransfers_frombranches",
305 "Koha::Schema::Result::Branchtransfer",
306 { "foreign.frombranch" => "self.branchcode" },
307 { cascade_copy => 0, cascade_delete => 0 },
310 =head2 branchtransfers_tobranches
312 Type: has_many
314 Related object: L<Koha::Schema::Result::Branchtransfer>
316 =cut
318 __PACKAGE__->has_many(
319 "branchtransfers_tobranches",
320 "Koha::Schema::Result::Branchtransfer",
321 { "foreign.tobranch" => "self.branchcode" },
322 { cascade_copy => 0, cascade_delete => 0 },
325 =head2 categories_branches
327 Type: has_many
329 Related object: L<Koha::Schema::Result::CategoriesBranch>
331 =cut
333 __PACKAGE__->has_many(
334 "categories_branches",
335 "Koha::Schema::Result::CategoriesBranch",
336 { "foreign.branchcode" => "self.branchcode" },
337 { cascade_copy => 0, cascade_delete => 0 },
340 =head2 collections
342 Type: has_many
344 Related object: L<Koha::Schema::Result::Collection>
346 =cut
348 __PACKAGE__->has_many(
349 "collections",
350 "Koha::Schema::Result::Collection",
351 { "foreign.colBranchcode" => "self.branchcode" },
352 { cascade_copy => 0, cascade_delete => 0 },
355 =head2 course_items
357 Type: has_many
359 Related object: L<Koha::Schema::Result::CourseItem>
361 =cut
363 __PACKAGE__->has_many(
364 "course_items",
365 "Koha::Schema::Result::CourseItem",
366 { "foreign.holdingbranch" => "self.branchcode" },
367 { cascade_copy => 0, cascade_delete => 0 },
370 =head2 creator_batches
372 Type: has_many
374 Related object: L<Koha::Schema::Result::CreatorBatch>
376 =cut
378 __PACKAGE__->has_many(
379 "creator_batches",
380 "Koha::Schema::Result::CreatorBatch",
381 { "foreign.branch_code" => "self.branchcode" },
382 { cascade_copy => 0, cascade_delete => 0 },
385 =head2 default_branch_circ_rule
387 Type: might_have
389 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
391 =cut
393 __PACKAGE__->might_have(
394 "default_branch_circ_rule",
395 "Koha::Schema::Result::DefaultBranchCircRule",
396 { "foreign.branchcode" => "self.branchcode" },
397 { cascade_copy => 0, cascade_delete => 0 },
400 =head2 hold_fill_targets
402 Type: has_many
404 Related object: L<Koha::Schema::Result::HoldFillTarget>
406 =cut
408 __PACKAGE__->has_many(
409 "hold_fill_targets",
410 "Koha::Schema::Result::HoldFillTarget",
411 { "foreign.source_branchcode" => "self.branchcode" },
412 { cascade_copy => 0, cascade_delete => 0 },
415 =head2 items_holdingbranches
417 Type: has_many
419 Related object: L<Koha::Schema::Result::Item>
421 =cut
423 __PACKAGE__->has_many(
424 "items_holdingbranches",
425 "Koha::Schema::Result::Item",
426 { "foreign.holdingbranch" => "self.branchcode" },
427 { cascade_copy => 0, cascade_delete => 0 },
430 =head2 items_homebranches
432 Type: has_many
434 Related object: L<Koha::Schema::Result::Item>
436 =cut
438 __PACKAGE__->has_many(
439 "items_homebranches",
440 "Koha::Schema::Result::Item",
441 { "foreign.homebranch" => "self.branchcode" },
442 { cascade_copy => 0, cascade_delete => 0 },
445 =head2 opac_news
447 Type: has_many
449 Related object: L<Koha::Schema::Result::OpacNews>
451 =cut
453 __PACKAGE__->has_many(
454 "opac_news",
455 "Koha::Schema::Result::OpacNews",
456 { "foreign.branchcode" => "self.branchcode" },
457 { cascade_copy => 0, cascade_delete => 0 },
460 =head2 reserves
462 Type: has_many
464 Related object: L<Koha::Schema::Result::Reserve>
466 =cut
468 __PACKAGE__->has_many(
469 "reserves",
470 "Koha::Schema::Result::Reserve",
471 { "foreign.branchcode" => "self.branchcode" },
472 { cascade_copy => 0, cascade_delete => 0 },
475 =head2 transport_cost_frombranches
477 Type: has_many
479 Related object: L<Koha::Schema::Result::TransportCost>
481 =cut
483 __PACKAGE__->has_many(
484 "transport_cost_frombranches",
485 "Koha::Schema::Result::TransportCost",
486 { "foreign.frombranch" => "self.branchcode" },
487 { cascade_copy => 0, cascade_delete => 0 },
490 =head2 transport_cost_tobranches
492 Type: has_many
494 Related object: L<Koha::Schema::Result::TransportCost>
496 =cut
498 __PACKAGE__->has_many(
499 "transport_cost_tobranches",
500 "Koha::Schema::Result::TransportCost",
501 { "foreign.tobranch" => "self.branchcode" },
502 { cascade_copy => 0, cascade_delete => 0 },
505 =head2 categorycodes
507 Type: many_to_many
509 Composing rels: L</branchrelations> -> categorycode
511 =cut
513 __PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
516 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-11-06 15:26:36
517 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CGNPB/MkGLOihDThj43/4A
520 # You can replace this text with custom content, and it will be preserved on regeneration