Bug 7295: (follow-up) update DBIx::Class schema classes
[koha.git] / Koha / Schema / Result / Branch.pm
blobb7bc1487f21b2ad7110add3c9e7fc2abdc054393
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 branchurl
91 data_type: 'mediumtext'
92 is_nullable: 1
94 =head2 issuing
96 data_type: 'tinyint'
97 is_nullable: 1
99 =head2 branchip
101 data_type: 'varchar'
102 is_nullable: 1
103 size: 15
105 =head2 branchprinter
107 data_type: 'varchar'
108 is_nullable: 1
109 size: 100
111 =head2 branchnotes
113 data_type: 'mediumtext'
114 is_nullable: 1
116 =head2 opac_info
118 data_type: 'text'
119 is_nullable: 1
121 =cut
123 __PACKAGE__->add_columns(
124 "branchcode",
125 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
126 "branchname",
127 { data_type => "mediumtext", is_nullable => 0 },
128 "branchaddress1",
129 { data_type => "mediumtext", is_nullable => 1 },
130 "branchaddress2",
131 { data_type => "mediumtext", is_nullable => 1 },
132 "branchaddress3",
133 { data_type => "mediumtext", is_nullable => 1 },
134 "branchzip",
135 { data_type => "varchar", is_nullable => 1, size => 25 },
136 "branchcity",
137 { data_type => "mediumtext", is_nullable => 1 },
138 "branchstate",
139 { data_type => "mediumtext", is_nullable => 1 },
140 "branchcountry",
141 { data_type => "text", is_nullable => 1 },
142 "branchphone",
143 { data_type => "mediumtext", is_nullable => 1 },
144 "branchfax",
145 { data_type => "mediumtext", is_nullable => 1 },
146 "branchemail",
147 { data_type => "mediumtext", is_nullable => 1 },
148 "branchurl",
149 { data_type => "mediumtext", is_nullable => 1 },
150 "issuing",
151 { data_type => "tinyint", is_nullable => 1 },
152 "branchip",
153 { data_type => "varchar", is_nullable => 1, size => 15 },
154 "branchprinter",
155 { data_type => "varchar", is_nullable => 1, size => 100 },
156 "branchnotes",
157 { data_type => "mediumtext", is_nullable => 1 },
158 "opac_info",
159 { data_type => "text", is_nullable => 1 },
162 =head1 PRIMARY KEY
164 =over 4
166 =item * L</branchcode>
168 =back
170 =cut
172 __PACKAGE__->set_primary_key("branchcode");
174 =head1 RELATIONS
176 =head2 aqbaskets
178 Type: has_many
180 Related object: L<Koha::Schema::Result::Aqbasket>
182 =cut
184 __PACKAGE__->has_many(
185 "aqbaskets",
186 "Koha::Schema::Result::Aqbasket",
187 { "foreign.branch" => "self.branchcode" },
188 { cascade_copy => 0, cascade_delete => 0 },
191 =head2 authorised_values_branches
193 Type: has_many
195 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
197 =cut
199 __PACKAGE__->has_many(
200 "authorised_values_branches",
201 "Koha::Schema::Result::AuthorisedValuesBranch",
202 { "foreign.branchcode" => "self.branchcode" },
203 { cascade_copy => 0, cascade_delete => 0 },
206 =head2 borrower_attribute_types_branches
208 Type: has_many
210 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
212 =cut
214 __PACKAGE__->has_many(
215 "borrower_attribute_types_branches",
216 "Koha::Schema::Result::BorrowerAttributeTypesBranch",
217 { "foreign.b_branchcode" => "self.branchcode" },
218 { cascade_copy => 0, cascade_delete => 0 },
221 =head2 borrowers
223 Type: has_many
225 Related object: L<Koha::Schema::Result::Borrower>
227 =cut
229 __PACKAGE__->has_many(
230 "borrowers",
231 "Koha::Schema::Result::Borrower",
232 { "foreign.branchcode" => "self.branchcode" },
233 { cascade_copy => 0, cascade_delete => 0 },
236 =head2 branch_borrower_circ_rules
238 Type: has_many
240 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
242 =cut
244 __PACKAGE__->has_many(
245 "branch_borrower_circ_rules",
246 "Koha::Schema::Result::BranchBorrowerCircRule",
247 { "foreign.branchcode" => "self.branchcode" },
248 { cascade_copy => 0, cascade_delete => 0 },
251 =head2 branch_item_rules
253 Type: has_many
255 Related object: L<Koha::Schema::Result::BranchItemRule>
257 =cut
259 __PACKAGE__->has_many(
260 "branch_item_rules",
261 "Koha::Schema::Result::BranchItemRule",
262 { "foreign.branchcode" => "self.branchcode" },
263 { cascade_copy => 0, cascade_delete => 0 },
266 =head2 branchrelations
268 Type: has_many
270 Related object: L<Koha::Schema::Result::Branchrelation>
272 =cut
274 __PACKAGE__->has_many(
275 "branchrelations",
276 "Koha::Schema::Result::Branchrelation",
277 { "foreign.branchcode" => "self.branchcode" },
278 { cascade_copy => 0, cascade_delete => 0 },
281 =head2 branchtransfers_frombranches
283 Type: has_many
285 Related object: L<Koha::Schema::Result::Branchtransfer>
287 =cut
289 __PACKAGE__->has_many(
290 "branchtransfers_frombranches",
291 "Koha::Schema::Result::Branchtransfer",
292 { "foreign.frombranch" => "self.branchcode" },
293 { cascade_copy => 0, cascade_delete => 0 },
296 =head2 branchtransfers_tobranches
298 Type: has_many
300 Related object: L<Koha::Schema::Result::Branchtransfer>
302 =cut
304 __PACKAGE__->has_many(
305 "branchtransfers_tobranches",
306 "Koha::Schema::Result::Branchtransfer",
307 { "foreign.tobranch" => "self.branchcode" },
308 { cascade_copy => 0, cascade_delete => 0 },
311 =head2 categories_branches
313 Type: has_many
315 Related object: L<Koha::Schema::Result::CategoriesBranch>
317 =cut
319 __PACKAGE__->has_many(
320 "categories_branches",
321 "Koha::Schema::Result::CategoriesBranch",
322 { "foreign.branchcode" => "self.branchcode" },
323 { cascade_copy => 0, cascade_delete => 0 },
326 =head2 course_items
328 Type: has_many
330 Related object: L<Koha::Schema::Result::CourseItem>
332 =cut
334 __PACKAGE__->has_many(
335 "course_items",
336 "Koha::Schema::Result::CourseItem",
337 { "foreign.holdingbranch" => "self.branchcode" },
338 { cascade_copy => 0, cascade_delete => 0 },
341 =head2 creator_batches
343 Type: has_many
345 Related object: L<Koha::Schema::Result::CreatorBatch>
347 =cut
349 __PACKAGE__->has_many(
350 "creator_batches",
351 "Koha::Schema::Result::CreatorBatch",
352 { "foreign.branch_code" => "self.branchcode" },
353 { cascade_copy => 0, cascade_delete => 0 },
356 =head2 default_branch_circ_rule
358 Type: might_have
360 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
362 =cut
364 __PACKAGE__->might_have(
365 "default_branch_circ_rule",
366 "Koha::Schema::Result::DefaultBranchCircRule",
367 { "foreign.branchcode" => "self.branchcode" },
368 { cascade_copy => 0, cascade_delete => 0 },
371 =head2 hold_fill_targets
373 Type: has_many
375 Related object: L<Koha::Schema::Result::HoldFillTarget>
377 =cut
379 __PACKAGE__->has_many(
380 "hold_fill_targets",
381 "Koha::Schema::Result::HoldFillTarget",
382 { "foreign.source_branchcode" => "self.branchcode" },
383 { cascade_copy => 0, cascade_delete => 0 },
386 =head2 items_holdingbranches
388 Type: has_many
390 Related object: L<Koha::Schema::Result::Item>
392 =cut
394 __PACKAGE__->has_many(
395 "items_holdingbranches",
396 "Koha::Schema::Result::Item",
397 { "foreign.holdingbranch" => "self.branchcode" },
398 { cascade_copy => 0, cascade_delete => 0 },
401 =head2 items_homebranches
403 Type: has_many
405 Related object: L<Koha::Schema::Result::Item>
407 =cut
409 __PACKAGE__->has_many(
410 "items_homebranches",
411 "Koha::Schema::Result::Item",
412 { "foreign.homebranch" => "self.branchcode" },
413 { cascade_copy => 0, cascade_delete => 0 },
416 =head2 reserves
418 Type: has_many
420 Related object: L<Koha::Schema::Result::Reserve>
422 =cut
424 __PACKAGE__->has_many(
425 "reserves",
426 "Koha::Schema::Result::Reserve",
427 { "foreign.branchcode" => "self.branchcode" },
428 { cascade_copy => 0, cascade_delete => 0 },
431 =head2 transport_cost_frombranches
433 Type: has_many
435 Related object: L<Koha::Schema::Result::TransportCost>
437 =cut
439 __PACKAGE__->has_many(
440 "transport_cost_frombranches",
441 "Koha::Schema::Result::TransportCost",
442 { "foreign.frombranch" => "self.branchcode" },
443 { cascade_copy => 0, cascade_delete => 0 },
446 =head2 transport_cost_tobranches
448 Type: has_many
450 Related object: L<Koha::Schema::Result::TransportCost>
452 =cut
454 __PACKAGE__->has_many(
455 "transport_cost_tobranches",
456 "Koha::Schema::Result::TransportCost",
457 { "foreign.tobranch" => "self.branchcode" },
458 { cascade_copy => 0, cascade_delete => 0 },
461 =head2 categorycodes
463 Type: many_to_many
465 Composing rels: L</branchrelations> -> categorycode
467 =cut
469 __PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
472 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-31 16:31:19
473 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PKoXMUUg0NUf/xVDBkPOqQ
476 # You can replace this text with custom content, and it will be preserved on regeneration