Bug 7295: (follow-up) update DBIx::Class schema classes
[koha.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 branchurl
90
91   data_type: 'mediumtext'
92   is_nullable: 1
93
94 =head2 issuing
95
96   data_type: 'tinyint'
97   is_nullable: 1
98
99 =head2 branchip
100
101   data_type: 'varchar'
102   is_nullable: 1
103   size: 15
104
105 =head2 branchprinter
106
107   data_type: 'varchar'
108   is_nullable: 1
109   size: 100
110
111 =head2 branchnotes
112
113   data_type: 'mediumtext'
114   is_nullable: 1
115
116 =head2 opac_info
117
118   data_type: 'text'
119   is_nullable: 1
120
121 =cut
122
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 },
160 );
161
162 =head1 PRIMARY KEY
163
164 =over 4
165
166 =item * L</branchcode>
167
168 =back
169
170 =cut
171
172 __PACKAGE__->set_primary_key("branchcode");
173
174 =head1 RELATIONS
175
176 =head2 aqbaskets
177
178 Type: has_many
179
180 Related object: L<Koha::Schema::Result::Aqbasket>
181
182 =cut
183
184 __PACKAGE__->has_many(
185   "aqbaskets",
186   "Koha::Schema::Result::Aqbasket",
187   { "foreign.branch" => "self.branchcode" },
188   { cascade_copy => 0, cascade_delete => 0 },
189 );
190
191 =head2 authorised_values_branches
192
193 Type: has_many
194
195 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
196
197 =cut
198
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 },
204 );
205
206 =head2 borrower_attribute_types_branches
207
208 Type: has_many
209
210 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
211
212 =cut
213
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 },
219 );
220
221 =head2 borrowers
222
223 Type: has_many
224
225 Related object: L<Koha::Schema::Result::Borrower>
226
227 =cut
228
229 __PACKAGE__->has_many(
230   "borrowers",
231   "Koha::Schema::Result::Borrower",
232   { "foreign.branchcode" => "self.branchcode" },
233   { cascade_copy => 0, cascade_delete => 0 },
234 );
235
236 =head2 branch_borrower_circ_rules
237
238 Type: has_many
239
240 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
241
242 =cut
243
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 },
249 );
250
251 =head2 branch_item_rules
252
253 Type: has_many
254
255 Related object: L<Koha::Schema::Result::BranchItemRule>
256
257 =cut
258
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 },
264 );
265
266 =head2 branchrelations
267
268 Type: has_many
269
270 Related object: L<Koha::Schema::Result::Branchrelation>
271
272 =cut
273
274 __PACKAGE__->has_many(
275   "branchrelations",
276   "Koha::Schema::Result::Branchrelation",
277   { "foreign.branchcode" => "self.branchcode" },
278   { cascade_copy => 0, cascade_delete => 0 },
279 );
280
281 =head2 branchtransfers_frombranches
282
283 Type: has_many
284
285 Related object: L<Koha::Schema::Result::Branchtransfer>
286
287 =cut
288
289 __PACKAGE__->has_many(
290   "branchtransfers_frombranches",
291   "Koha::Schema::Result::Branchtransfer",
292   { "foreign.frombranch" => "self.branchcode" },
293   { cascade_copy => 0, cascade_delete => 0 },
294 );
295
296 =head2 branchtransfers_tobranches
297
298 Type: has_many
299
300 Related object: L<Koha::Schema::Result::Branchtransfer>
301
302 =cut
303
304 __PACKAGE__->has_many(
305   "branchtransfers_tobranches",
306   "Koha::Schema::Result::Branchtransfer",
307   { "foreign.tobranch" => "self.branchcode" },
308   { cascade_copy => 0, cascade_delete => 0 },
309 );
310
311 =head2 categories_branches
312
313 Type: has_many
314
315 Related object: L<Koha::Schema::Result::CategoriesBranch>
316
317 =cut
318
319 __PACKAGE__->has_many(
320   "categories_branches",
321   "Koha::Schema::Result::CategoriesBranch",
322   { "foreign.branchcode" => "self.branchcode" },
323   { cascade_copy => 0, cascade_delete => 0 },
324 );
325
326 =head2 course_items
327
328 Type: has_many
329
330 Related object: L<Koha::Schema::Result::CourseItem>
331
332 =cut
333
334 __PACKAGE__->has_many(
335   "course_items",
336   "Koha::Schema::Result::CourseItem",
337   { "foreign.holdingbranch" => "self.branchcode" },
338   { cascade_copy => 0, cascade_delete => 0 },
339 );
340
341 =head2 creator_batches
342
343 Type: has_many
344
345 Related object: L<Koha::Schema::Result::CreatorBatch>
346
347 =cut
348
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 },
354 );
355
356 =head2 default_branch_circ_rule
357
358 Type: might_have
359
360 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
361
362 =cut
363
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 },
369 );
370
371 =head2 hold_fill_targets
372
373 Type: has_many
374
375 Related object: L<Koha::Schema::Result::HoldFillTarget>
376
377 =cut
378
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 },
384 );
385
386 =head2 items_holdingbranches
387
388 Type: has_many
389
390 Related object: L<Koha::Schema::Result::Item>
391
392 =cut
393
394 __PACKAGE__->has_many(
395   "items_holdingbranches",
396   "Koha::Schema::Result::Item",
397   { "foreign.holdingbranch" => "self.branchcode" },
398   { cascade_copy => 0, cascade_delete => 0 },
399 );
400
401 =head2 items_homebranches
402
403 Type: has_many
404
405 Related object: L<Koha::Schema::Result::Item>
406
407 =cut
408
409 __PACKAGE__->has_many(
410   "items_homebranches",
411   "Koha::Schema::Result::Item",
412   { "foreign.homebranch" => "self.branchcode" },
413   { cascade_copy => 0, cascade_delete => 0 },
414 );
415
416 =head2 reserves
417
418 Type: has_many
419
420 Related object: L<Koha::Schema::Result::Reserve>
421
422 =cut
423
424 __PACKAGE__->has_many(
425   "reserves",
426   "Koha::Schema::Result::Reserve",
427   { "foreign.branchcode" => "self.branchcode" },
428   { cascade_copy => 0, cascade_delete => 0 },
429 );
430
431 =head2 transport_cost_frombranches
432
433 Type: has_many
434
435 Related object: L<Koha::Schema::Result::TransportCost>
436
437 =cut
438
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 },
444 );
445
446 =head2 transport_cost_tobranches
447
448 Type: has_many
449
450 Related object: L<Koha::Schema::Result::TransportCost>
451
452 =cut
453
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 },
459 );
460
461 =head2 categorycodes
462
463 Type: many_to_many
464
465 Composing rels: L</branchrelations> -> categorycode
466
467 =cut
468
469 __PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
470
471
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
474
475
476 # You can replace this text with custom content, and it will be preserved on regeneration
477 1;