Bug 12781: DBIx::Class schema update 08/2014
[koha-equinox.git] / Koha / Schema / Result / Category.pm
1 use utf8;
2 package Koha::Schema::Result::Category;
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::Category
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<categories>
19
20 =cut
21
22 __PACKAGE__->table("categories");
23
24 =head1 ACCESSORS
25
26 =head2 categorycode
27
28   data_type: 'varchar'
29   default_value: (empty string)
30   is_nullable: 0
31   size: 10
32
33 =head2 description
34
35   data_type: 'mediumtext'
36   is_nullable: 1
37
38 =head2 enrolmentperiod
39
40   data_type: 'smallint'
41   is_nullable: 1
42
43 =head2 enrolmentperioddate
44
45   data_type: 'date'
46   datetime_undef_if_invalid: 1
47   is_nullable: 1
48
49 =head2 upperagelimit
50
51   data_type: 'smallint'
52   is_nullable: 1
53
54 =head2 dateofbirthrequired
55
56   data_type: 'tinyint'
57   is_nullable: 1
58
59 =head2 finetype
60
61   data_type: 'varchar'
62   is_nullable: 1
63   size: 30
64
65 =head2 bulk
66
67   data_type: 'tinyint'
68   is_nullable: 1
69
70 =head2 enrolmentfee
71
72   data_type: 'decimal'
73   is_nullable: 1
74   size: [28,6]
75
76 =head2 overduenoticerequired
77
78   data_type: 'tinyint'
79   is_nullable: 1
80
81 =head2 issuelimit
82
83   data_type: 'smallint'
84   is_nullable: 1
85
86 =head2 reservefee
87
88   data_type: 'decimal'
89   is_nullable: 1
90   size: [28,6]
91
92 =head2 hidelostitems
93
94   data_type: 'tinyint'
95   default_value: 0
96   is_nullable: 0
97
98 =head2 category_type
99
100   data_type: 'varchar'
101   default_value: 'A'
102   is_nullable: 0
103   size: 1
104
105 =head2 BlockExpiredPatronOpacActions
106
107   accessor: 'block_expired_patron_opac_actions'
108   data_type: 'tinyint'
109   default_value: -1
110   is_nullable: 0
111
112 =head2 default_privacy
113
114   data_type: 'enum'
115   default_value: 'default'
116   extra: {list => ["default","never","forever"]}
117   is_nullable: 0
118
119 =cut
120
121 __PACKAGE__->add_columns(
122   "categorycode",
123   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
124   "description",
125   { data_type => "mediumtext", is_nullable => 1 },
126   "enrolmentperiod",
127   { data_type => "smallint", is_nullable => 1 },
128   "enrolmentperioddate",
129   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
130   "upperagelimit",
131   { data_type => "smallint", is_nullable => 1 },
132   "dateofbirthrequired",
133   { data_type => "tinyint", is_nullable => 1 },
134   "finetype",
135   { data_type => "varchar", is_nullable => 1, size => 30 },
136   "bulk",
137   { data_type => "tinyint", is_nullable => 1 },
138   "enrolmentfee",
139   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
140   "overduenoticerequired",
141   { data_type => "tinyint", is_nullable => 1 },
142   "issuelimit",
143   { data_type => "smallint", is_nullable => 1 },
144   "reservefee",
145   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
146   "hidelostitems",
147   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
148   "category_type",
149   { data_type => "varchar", default_value => "A", is_nullable => 0, size => 1 },
150   "BlockExpiredPatronOpacActions",
151   {
152     accessor      => "block_expired_patron_opac_actions",
153     data_type     => "tinyint",
154     default_value => -1,
155     is_nullable   => 0,
156   },
157   "default_privacy",
158   {
159     data_type => "enum",
160     default_value => "default",
161     extra => { list => ["default", "never", "forever"] },
162     is_nullable => 0,
163   },
164 );
165
166 =head1 PRIMARY KEY
167
168 =over 4
169
170 =item * L</categorycode>
171
172 =back
173
174 =cut
175
176 __PACKAGE__->set_primary_key("categorycode");
177
178 =head1 RELATIONS
179
180 =head2 borrower_message_preferences
181
182 Type: has_many
183
184 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
185
186 =cut
187
188 __PACKAGE__->has_many(
189   "borrower_message_preferences",
190   "Koha::Schema::Result::BorrowerMessagePreference",
191   { "foreign.categorycode" => "self.categorycode" },
192   { cascade_copy => 0, cascade_delete => 0 },
193 );
194
195 =head2 borrowers
196
197 Type: has_many
198
199 Related object: L<Koha::Schema::Result::Borrower>
200
201 =cut
202
203 __PACKAGE__->has_many(
204   "borrowers",
205   "Koha::Schema::Result::Borrower",
206   { "foreign.categorycode" => "self.categorycode" },
207   { cascade_copy => 0, cascade_delete => 0 },
208 );
209
210 =head2 branch_borrower_circ_rules
211
212 Type: has_many
213
214 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
215
216 =cut
217
218 __PACKAGE__->has_many(
219   "branch_borrower_circ_rules",
220   "Koha::Schema::Result::BranchBorrowerCircRule",
221   { "foreign.categorycode" => "self.categorycode" },
222   { cascade_copy => 0, cascade_delete => 0 },
223 );
224
225 =head2 categories_branches
226
227 Type: has_many
228
229 Related object: L<Koha::Schema::Result::CategoriesBranch>
230
231 =cut
232
233 __PACKAGE__->has_many(
234   "categories_branches",
235   "Koha::Schema::Result::CategoriesBranch",
236   { "foreign.categorycode" => "self.categorycode" },
237   { cascade_copy => 0, cascade_delete => 0 },
238 );
239
240 =head2 default_borrower_circ_rule
241
242 Type: might_have
243
244 Related object: L<Koha::Schema::Result::DefaultBorrowerCircRule>
245
246 =cut
247
248 __PACKAGE__->might_have(
249   "default_borrower_circ_rule",
250   "Koha::Schema::Result::DefaultBorrowerCircRule",
251   { "foreign.categorycode" => "self.categorycode" },
252   { cascade_copy => 0, cascade_delete => 0 },
253 );
254
255
256 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-08-18 13:01:05
257 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T4i7vp1kAZFXy6DiV1dqyw
258
259
260 # You can replace this text with custom content, and it will be preserved on regeneration
261 1;