Bug 8798: DBIx::Class base classes for all Koha tables
[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 borrowers
162
163 Type: has_many
164
165 Related object: L<Koha::Schema::Result::Borrower>
166
167 =cut
168
169 __PACKAGE__->has_many(
170   "borrowers",
171   "Koha::Schema::Result::Borrower",
172   { "foreign.branchcode" => "self.branchcode" },
173   { cascade_copy => 0, cascade_delete => 0 },
174 );
175
176 =head2 branch_borrower_circ_rules
177
178 Type: has_many
179
180 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
181
182 =cut
183
184 __PACKAGE__->has_many(
185   "branch_borrower_circ_rules",
186   "Koha::Schema::Result::BranchBorrowerCircRule",
187   { "foreign.branchcode" => "self.branchcode" },
188   { cascade_copy => 0, cascade_delete => 0 },
189 );
190
191 =head2 branch_item_rules
192
193 Type: has_many
194
195 Related object: L<Koha::Schema::Result::BranchItemRule>
196
197 =cut
198
199 __PACKAGE__->has_many(
200   "branch_item_rules",
201   "Koha::Schema::Result::BranchItemRule",
202   { "foreign.branchcode" => "self.branchcode" },
203   { cascade_copy => 0, cascade_delete => 0 },
204 );
205
206 =head2 branchrelations
207
208 Type: has_many
209
210 Related object: L<Koha::Schema::Result::Branchrelation>
211
212 =cut
213
214 __PACKAGE__->has_many(
215   "branchrelations",
216   "Koha::Schema::Result::Branchrelation",
217   { "foreign.branchcode" => "self.branchcode" },
218   { cascade_copy => 0, cascade_delete => 0 },
219 );
220
221 =head2 branchtransfers_frombranches
222
223 Type: has_many
224
225 Related object: L<Koha::Schema::Result::Branchtransfer>
226
227 =cut
228
229 __PACKAGE__->has_many(
230   "branchtransfers_frombranches",
231   "Koha::Schema::Result::Branchtransfer",
232   { "foreign.frombranch" => "self.branchcode" },
233   { cascade_copy => 0, cascade_delete => 0 },
234 );
235
236 =head2 branchtransfers_tobranches
237
238 Type: has_many
239
240 Related object: L<Koha::Schema::Result::Branchtransfer>
241
242 =cut
243
244 __PACKAGE__->has_many(
245   "branchtransfers_tobranches",
246   "Koha::Schema::Result::Branchtransfer",
247   { "foreign.tobranch" => "self.branchcode" },
248   { cascade_copy => 0, cascade_delete => 0 },
249 );
250
251 =head2 creator_batches
252
253 Type: has_many
254
255 Related object: L<Koha::Schema::Result::CreatorBatch>
256
257 =cut
258
259 __PACKAGE__->has_many(
260   "creator_batches",
261   "Koha::Schema::Result::CreatorBatch",
262   { "foreign.branch_code" => "self.branchcode" },
263   { cascade_copy => 0, cascade_delete => 0 },
264 );
265
266 =head2 default_branch_circ_rule
267
268 Type: might_have
269
270 Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
271
272 =cut
273
274 __PACKAGE__->might_have(
275   "default_branch_circ_rule",
276   "Koha::Schema::Result::DefaultBranchCircRule",
277   { "foreign.branchcode" => "self.branchcode" },
278   { cascade_copy => 0, cascade_delete => 0 },
279 );
280
281 =head2 hold_fill_targets
282
283 Type: has_many
284
285 Related object: L<Koha::Schema::Result::HoldFillTarget>
286
287 =cut
288
289 __PACKAGE__->has_many(
290   "hold_fill_targets",
291   "Koha::Schema::Result::HoldFillTarget",
292   { "foreign.source_branchcode" => "self.branchcode" },
293   { cascade_copy => 0, cascade_delete => 0 },
294 );
295
296 =head2 items_homebranches
297
298 Type: has_many
299
300 Related object: L<Koha::Schema::Result::Item>
301
302 =cut
303
304 __PACKAGE__->has_many(
305   "items_homebranches",
306   "Koha::Schema::Result::Item",
307   { "foreign.homebranch" => "self.branchcode" },
308   { cascade_copy => 0, cascade_delete => 0 },
309 );
310
311 =head2 items_holdingbranches
312
313 Type: has_many
314
315 Related object: L<Koha::Schema::Result::Item>
316
317 =cut
318
319 __PACKAGE__->has_many(
320   "items_holdingbranches",
321   "Koha::Schema::Result::Item",
322   { "foreign.holdingbranch" => "self.branchcode" },
323   { cascade_copy => 0, cascade_delete => 0 },
324 );
325
326 =head2 reserves
327
328 Type: has_many
329
330 Related object: L<Koha::Schema::Result::Reserve>
331
332 =cut
333
334 __PACKAGE__->has_many(
335   "reserves",
336   "Koha::Schema::Result::Reserve",
337   { "foreign.branchcode" => "self.branchcode" },
338   { cascade_copy => 0, cascade_delete => 0 },
339 );
340
341 =head2 transport_cost_frombranches
342
343 Type: has_many
344
345 Related object: L<Koha::Schema::Result::TransportCost>
346
347 =cut
348
349 __PACKAGE__->has_many(
350   "transport_cost_frombranches",
351   "Koha::Schema::Result::TransportCost",
352   { "foreign.frombranch" => "self.branchcode" },
353   { cascade_copy => 0, cascade_delete => 0 },
354 );
355
356 =head2 transport_cost_tobranches
357
358 Type: has_many
359
360 Related object: L<Koha::Schema::Result::TransportCost>
361
362 =cut
363
364 __PACKAGE__->has_many(
365   "transport_cost_tobranches",
366   "Koha::Schema::Result::TransportCost",
367   { "foreign.tobranch" => "self.branchcode" },
368   { cascade_copy => 0, cascade_delete => 0 },
369 );
370
371
372 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
373 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7/fUACQhSXHg0daDi6MGbQ
374
375
376 # You can replace this text with custom content, and it will be preserved on regeneration
377 1;