2 package Koha::Schema::Result::Branch;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Branch
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<branches>
22 __PACKAGE__->table("branches");
29 default_value: (empty string)
35 data_type: 'mediumtext'
40 data_type: 'mediumtext'
45 data_type: 'mediumtext'
50 data_type: 'mediumtext'
61 data_type: 'mediumtext'
66 data_type: 'mediumtext'
76 data_type: 'mediumtext'
81 data_type: 'mediumtext'
86 data_type: 'mediumtext'
91 data_type: 'mediumtext'
94 =head2 branchreturnpath
96 data_type: 'mediumtext'
101 data_type: 'mediumtext'
123 data_type: 'mediumtext'
133 __PACKAGE__->add_columns(
135 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
137 { data_type => "mediumtext", is_nullable => 0 },
139 { data_type => "mediumtext", is_nullable => 1 },
141 { data_type => "mediumtext", is_nullable => 1 },
143 { data_type => "mediumtext", is_nullable => 1 },
145 { data_type => "varchar", is_nullable => 1, size => 25 },
147 { data_type => "mediumtext", is_nullable => 1 },
149 { data_type => "mediumtext", is_nullable => 1 },
151 { data_type => "text", is_nullable => 1 },
153 { data_type => "mediumtext", is_nullable => 1 },
155 { data_type => "mediumtext", is_nullable => 1 },
157 { data_type => "mediumtext", is_nullable => 1 },
159 { data_type => "mediumtext", is_nullable => 1 },
161 { data_type => "mediumtext", is_nullable => 1 },
163 { data_type => "mediumtext", is_nullable => 1 },
165 { data_type => "tinyint", is_nullable => 1 },
167 { data_type => "varchar", is_nullable => 1, size => 15 },
169 { data_type => "varchar", is_nullable => 1, size => 100 },
171 { data_type => "mediumtext", is_nullable => 1 },
173 { data_type => "text", is_nullable => 1 },
180 =item * L</branchcode>
186 __PACKAGE__->set_primary_key("branchcode");
194 Related object: L<Koha::Schema::Result::Aqbasket>
198 __PACKAGE__->has_many(
200 "Koha::Schema::Result::Aqbasket",
201 { "foreign.branch" => "self.branchcode" },
202 { cascade_copy => 0, cascade_delete => 0 },
205 =head2 authorised_values_branches
209 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
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
224 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
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 },
239 Related object: L<Koha::Schema::Result::Borrower>
243 __PACKAGE__->has_many(
245 "Koha::Schema::Result::Borrower",
246 { "foreign.branchcode" => "self.branchcode" },
247 { cascade_copy => 0, cascade_delete => 0 },
250 =head2 branch_borrower_circ_rules
254 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
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
269 Related object: L<Koha::Schema::Result::BranchItemRule>
273 __PACKAGE__->has_many(
275 "Koha::Schema::Result::BranchItemRule",
276 { "foreign.branchcode" => "self.branchcode" },
277 { cascade_copy => 0, cascade_delete => 0 },
280 =head2 branchrelations
284 Related object: L<Koha::Schema::Result::Branchrelation>
288 __PACKAGE__->has_many(
290 "Koha::Schema::Result::Branchrelation",
291 { "foreign.branchcode" => "self.branchcode" },
292 { cascade_copy => 0, cascade_delete => 0 },
295 =head2 branchtransfers_frombranches
299 Related object: L<Koha::Schema::Result::Branchtransfer>
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
314 Related object: L<Koha::Schema::Result::Branchtransfer>
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
329 Related object: L<Koha::Schema::Result::CategoriesBranch>
333 __PACKAGE__->has_many(
334 "categories_branches",
335 "Koha::Schema::Result::CategoriesBranch",
336 { "foreign.branchcode" => "self.branchcode" },
337 { cascade_copy => 0, cascade_delete => 0 },
344 Related object: L<Koha::Schema::Result::Collection>
348 __PACKAGE__->has_many(
350 "Koha::Schema::Result::Collection",
351 { "foreign.colBranchcode" => "self.branchcode" },
352 { cascade_copy => 0, cascade_delete => 0 },
359 Related object: L<Koha::Schema::Result::CourseItem>
363 __PACKAGE__->has_many(
365 "Koha::Schema::Result::CourseItem",
366 { "foreign.holdingbranch" => "self.branchcode" },
367 { cascade_copy => 0, cascade_delete => 0 },
370 =head2 creator_batches
374 Related object: L<Koha::Schema::Result::CreatorBatch>
378 __PACKAGE__->has_many(
380 "Koha::Schema::Result::CreatorBatch",
381 { "foreign.branch_code" => "self.branchcode" },
382 { cascade_copy => 0, cascade_delete => 0 },
385 =head2 default_branch_circ_rule
389 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
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 },
404 Related object: L<Koha::Schema::Result::EdifactEan>
408 __PACKAGE__->has_many(
410 "Koha::Schema::Result::EdifactEan",
411 { "foreign.branchcode" => "self.branchcode" },
412 { cascade_copy => 0, cascade_delete => 0 },
415 =head2 hold_fill_targets
419 Related object: L<Koha::Schema::Result::HoldFillTarget>
423 __PACKAGE__->has_many(
425 "Koha::Schema::Result::HoldFillTarget",
426 { "foreign.source_branchcode" => "self.branchcode" },
427 { cascade_copy => 0, cascade_delete => 0 },
430 =head2 items_holdingbranches
434 Related object: L<Koha::Schema::Result::Item>
438 __PACKAGE__->has_many(
439 "items_holdingbranches",
440 "Koha::Schema::Result::Item",
441 { "foreign.holdingbranch" => "self.branchcode" },
442 { cascade_copy => 0, cascade_delete => 0 },
445 =head2 items_homebranches
449 Related object: L<Koha::Schema::Result::Item>
453 __PACKAGE__->has_many(
454 "items_homebranches",
455 "Koha::Schema::Result::Item",
456 { "foreign.homebranch" => "self.branchcode" },
457 { cascade_copy => 0, cascade_delete => 0 },
464 Related object: L<Koha::Schema::Result::OpacNews>
468 __PACKAGE__->has_many(
470 "Koha::Schema::Result::OpacNews",
471 { "foreign.branchcode" => "self.branchcode" },
472 { cascade_copy => 0, cascade_delete => 0 },
479 Related object: L<Koha::Schema::Result::Reserve>
483 __PACKAGE__->has_many(
485 "Koha::Schema::Result::Reserve",
486 { "foreign.branchcode" => "self.branchcode" },
487 { cascade_copy => 0, cascade_delete => 0 },
490 =head2 transport_cost_frombranches
494 Related object: L<Koha::Schema::Result::TransportCost>
498 __PACKAGE__->has_many(
499 "transport_cost_frombranches",
500 "Koha::Schema::Result::TransportCost",
501 { "foreign.frombranch" => "self.branchcode" },
502 { cascade_copy => 0, cascade_delete => 0 },
505 =head2 transport_cost_tobranches
509 Related object: L<Koha::Schema::Result::TransportCost>
513 __PACKAGE__->has_many(
514 "transport_cost_tobranches",
515 "Koha::Schema::Result::TransportCost",
516 { "foreign.tobranch" => "self.branchcode" },
517 { cascade_copy => 0, cascade_delete => 0 },
524 Composing rels: L</branchrelations> -> categorycode
528 __PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
531 # Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-11-26 11:08:29
532 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FjNI9OEpa5OKfwwCkggu0w
535 # You can replace this text with custom code or comments, and it will be preserved on regeneration
537 sub koha_objects_class {