Bug 8798: (follow-up) update schema files
[koha.git] / Koha / Schema / Result / Branch.pm
1 package Koha::Schema::Result::Branch;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::Branch
15
16 =cut
17
18 __PACKAGE__->table("branches");
19
20 =head1 ACCESSORS
21
22 =head2 branchcode
23
24   data_type: 'varchar'
25   default_value: (empty string)
26   is_nullable: 0
27   size: 10
28
29 =head2 branchname
30
31   data_type: 'mediumtext'
32   is_nullable: 0
33
34 =head2 branchaddress1
35
36   data_type: 'mediumtext'
37   is_nullable: 1
38
39 =head2 branchaddress2
40
41   data_type: 'mediumtext'
42   is_nullable: 1
43
44 =head2 branchaddress3
45
46   data_type: 'mediumtext'
47   is_nullable: 1
48
49 =head2 branchzip
50
51   data_type: 'varchar'
52   is_nullable: 1
53   size: 25
54
55 =head2 branchcity
56
57   data_type: 'mediumtext'
58   is_nullable: 1
59
60 =head2 branchstate
61
62   data_type: 'mediumtext'
63   is_nullable: 1
64
65 =head2 branchcountry
66
67   data_type: 'text'
68   is_nullable: 1
69
70 =head2 branchphone
71
72   data_type: 'mediumtext'
73   is_nullable: 1
74
75 =head2 branchfax
76
77   data_type: 'mediumtext'
78   is_nullable: 1
79
80 =head2 branchemail
81
82   data_type: 'mediumtext'
83   is_nullable: 1
84
85 =head2 branchurl
86
87   data_type: 'mediumtext'
88   is_nullable: 1
89
90 =head2 issuing
91
92   data_type: 'tinyint'
93   is_nullable: 1
94
95 =head2 branchip
96
97   data_type: 'varchar'
98   is_nullable: 1
99   size: 15
100
101 =head2 branchprinter
102
103   data_type: 'varchar'
104   is_nullable: 1
105   size: 100
106
107 =head2 branchnotes
108
109   data_type: 'mediumtext'
110   is_nullable: 1
111
112 =head2 opac_info
113
114   data_type: 'text'
115   is_nullable: 1
116
117 =cut
118
119 __PACKAGE__->add_columns(
120   "branchcode",
121   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
122   "branchname",
123   { data_type => "mediumtext", is_nullable => 0 },
124   "branchaddress1",
125   { data_type => "mediumtext", is_nullable => 1 },
126   "branchaddress2",
127   { data_type => "mediumtext", is_nullable => 1 },
128   "branchaddress3",
129   { data_type => "mediumtext", is_nullable => 1 },
130   "branchzip",
131   { data_type => "varchar", is_nullable => 1, size => 25 },
132   "branchcity",
133   { data_type => "mediumtext", is_nullable => 1 },
134   "branchstate",
135   { data_type => "mediumtext", is_nullable => 1 },
136   "branchcountry",
137   { data_type => "text", is_nullable => 1 },
138   "branchphone",
139   { data_type => "mediumtext", is_nullable => 1 },
140   "branchfax",
141   { data_type => "mediumtext", is_nullable => 1 },
142   "branchemail",
143   { data_type => "mediumtext", is_nullable => 1 },
144   "branchurl",
145   { data_type => "mediumtext", is_nullable => 1 },
146   "issuing",
147   { data_type => "tinyint", is_nullable => 1 },
148   "branchip",
149   { data_type => "varchar", is_nullable => 1, size => 15 },
150   "branchprinter",
151   { data_type => "varchar", is_nullable => 1, size => 100 },
152   "branchnotes",
153   { data_type => "mediumtext", is_nullable => 1 },
154   "opac_info",
155   { data_type => "text", is_nullable => 1 },
156 );
157 __PACKAGE__->set_primary_key("branchcode");
158
159 =head1 RELATIONS
160
161 =head2 authorised_values_branches
162
163 Type: has_many
164
165 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
166
167 =cut
168
169 __PACKAGE__->has_many(
170   "authorised_values_branches",
171   "Koha::Schema::Result::AuthorisedValuesBranch",
172   { "foreign.branchcode" => "self.branchcode" },
173   { cascade_copy => 0, cascade_delete => 0 },
174 );
175
176 =head2 borrower_attribute_types_branches
177
178 Type: has_many
179
180 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
181
182 =cut
183
184 __PACKAGE__->has_many(
185   "borrower_attribute_types_branches",
186   "Koha::Schema::Result::BorrowerAttributeTypesBranch",
187   { "foreign.b_branchcode" => "self.branchcode" },
188   { cascade_copy => 0, cascade_delete => 0 },
189 );
190
191 =head2 borrowers
192
193 Type: has_many
194
195 Related object: L<Koha::Schema::Result::Borrower>
196
197 =cut
198
199 __PACKAGE__->has_many(
200   "borrowers",
201   "Koha::Schema::Result::Borrower",
202   { "foreign.branchcode" => "self.branchcode" },
203   { cascade_copy => 0, cascade_delete => 0 },
204 );
205
206 =head2 branch_borrower_circ_rules
207
208 Type: has_many
209
210 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
211
212 =cut
213
214 __PACKAGE__->has_many(
215   "branch_borrower_circ_rules",
216   "Koha::Schema::Result::BranchBorrowerCircRule",
217   { "foreign.branchcode" => "self.branchcode" },
218   { cascade_copy => 0, cascade_delete => 0 },
219 );
220
221 =head2 branch_item_rules
222
223 Type: has_many
224
225 Related object: L<Koha::Schema::Result::BranchItemRule>
226
227 =cut
228
229 __PACKAGE__->has_many(
230   "branch_item_rules",
231   "Koha::Schema::Result::BranchItemRule",
232   { "foreign.branchcode" => "self.branchcode" },
233   { cascade_copy => 0, cascade_delete => 0 },
234 );
235
236 =head2 branchrelations
237
238 Type: has_many
239
240 Related object: L<Koha::Schema::Result::Branchrelation>
241
242 =cut
243
244 __PACKAGE__->has_many(
245   "branchrelations",
246   "Koha::Schema::Result::Branchrelation",
247   { "foreign.branchcode" => "self.branchcode" },
248   { cascade_copy => 0, cascade_delete => 0 },
249 );
250
251 =head2 branchtransfers_frombranches
252
253 Type: has_many
254
255 Related object: L<Koha::Schema::Result::Branchtransfer>
256
257 =cut
258
259 __PACKAGE__->has_many(
260   "branchtransfers_frombranches",
261   "Koha::Schema::Result::Branchtransfer",
262   { "foreign.frombranch" => "self.branchcode" },
263   { cascade_copy => 0, cascade_delete => 0 },
264 );
265
266 =head2 branchtransfers_tobranches
267
268 Type: has_many
269
270 Related object: L<Koha::Schema::Result::Branchtransfer>
271
272 =cut
273
274 __PACKAGE__->has_many(
275   "branchtransfers_tobranches",
276   "Koha::Schema::Result::Branchtransfer",
277   { "foreign.tobranch" => "self.branchcode" },
278   { cascade_copy => 0, cascade_delete => 0 },
279 );
280
281 =head2 categories_branches
282
283 Type: has_many
284
285 Related object: L<Koha::Schema::Result::CategoriesBranch>
286
287 =cut
288
289 __PACKAGE__->has_many(
290   "categories_branches",
291   "Koha::Schema::Result::CategoriesBranch",
292   { "foreign.branchcode" => "self.branchcode" },
293   { cascade_copy => 0, cascade_delete => 0 },
294 );
295
296 =head2 course_items
297
298 Type: has_many
299
300 Related object: L<Koha::Schema::Result::CourseItem>
301
302 =cut
303
304 __PACKAGE__->has_many(
305   "course_items",
306   "Koha::Schema::Result::CourseItem",
307   { "foreign.holdingbranch" => "self.branchcode" },
308   { cascade_copy => 0, cascade_delete => 0 },
309 );
310
311 =head2 creator_batches
312
313 Type: has_many
314
315 Related object: L<Koha::Schema::Result::CreatorBatch>
316
317 =cut
318
319 __PACKAGE__->has_many(
320   "creator_batches",
321   "Koha::Schema::Result::CreatorBatch",
322   { "foreign.branch_code" => "self.branchcode" },
323   { cascade_copy => 0, cascade_delete => 0 },
324 );
325
326 =head2 default_branch_circ_rule
327
328 Type: might_have
329
330 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
331
332 =cut
333
334 __PACKAGE__->might_have(
335   "default_branch_circ_rule",
336   "Koha::Schema::Result::DefaultBranchCircRule",
337   { "foreign.branchcode" => "self.branchcode" },
338   { cascade_copy => 0, cascade_delete => 0 },
339 );
340
341 =head2 hold_fill_targets
342
343 Type: has_many
344
345 Related object: L<Koha::Schema::Result::HoldFillTarget>
346
347 =cut
348
349 __PACKAGE__->has_many(
350   "hold_fill_targets",
351   "Koha::Schema::Result::HoldFillTarget",
352   { "foreign.source_branchcode" => "self.branchcode" },
353   { cascade_copy => 0, cascade_delete => 0 },
354 );
355
356 =head2 items_homebranches
357
358 Type: has_many
359
360 Related object: L<Koha::Schema::Result::Item>
361
362 =cut
363
364 __PACKAGE__->has_many(
365   "items_homebranches",
366   "Koha::Schema::Result::Item",
367   { "foreign.homebranch" => "self.branchcode" },
368   { cascade_copy => 0, cascade_delete => 0 },
369 );
370
371 =head2 items_holdingbranches
372
373 Type: has_many
374
375 Related object: L<Koha::Schema::Result::Item>
376
377 =cut
378
379 __PACKAGE__->has_many(
380   "items_holdingbranches",
381   "Koha::Schema::Result::Item",
382   { "foreign.holdingbranch" => "self.branchcode" },
383   { cascade_copy => 0, cascade_delete => 0 },
384 );
385
386 =head2 reserves
387
388 Type: has_many
389
390 Related object: L<Koha::Schema::Result::Reserve>
391
392 =cut
393
394 __PACKAGE__->has_many(
395   "reserves",
396   "Koha::Schema::Result::Reserve",
397   { "foreign.branchcode" => "self.branchcode" },
398   { cascade_copy => 0, cascade_delete => 0 },
399 );
400
401 =head2 transport_cost_frombranches
402
403 Type: has_many
404
405 Related object: L<Koha::Schema::Result::TransportCost>
406
407 =cut
408
409 __PACKAGE__->has_many(
410   "transport_cost_frombranches",
411   "Koha::Schema::Result::TransportCost",
412   { "foreign.frombranch" => "self.branchcode" },
413   { cascade_copy => 0, cascade_delete => 0 },
414 );
415
416 =head2 transport_cost_tobranches
417
418 Type: has_many
419
420 Related object: L<Koha::Schema::Result::TransportCost>
421
422 =cut
423
424 __PACKAGE__->has_many(
425   "transport_cost_tobranches",
426   "Koha::Schema::Result::TransportCost",
427   { "foreign.tobranch" => "self.branchcode" },
428   { cascade_copy => 0, cascade_delete => 0 },
429 );
430
431
432 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57
433 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BS/6xtFAoMSKsXho4IXXjQ
434
435
436 # You can replace this text with custom content, and it will be preserved on regeneration
437 1;