b32b96759afaf1b4cd6fbf89123d1ae0779617f0
[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: 'longtext'
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 =head2 checkprevcheckout
120
121   data_type: 'varchar'
122   default_value: 'inherit'
123   is_nullable: 0
124   size: 7
125
126 =head2 reset_password
127
128   data_type: 'tinyint'
129   is_nullable: 1
130
131 =head2 change_password
132
133   data_type: 'tinyint'
134   is_nullable: 1
135
136 =cut
137
138 __PACKAGE__->add_columns(
139   "categorycode",
140   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
141   "description",
142   { data_type => "longtext", is_nullable => 1 },
143   "enrolmentperiod",
144   { data_type => "smallint", is_nullable => 1 },
145   "enrolmentperioddate",
146   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
147   "upperagelimit",
148   { data_type => "smallint", is_nullable => 1 },
149   "dateofbirthrequired",
150   { data_type => "tinyint", is_nullable => 1 },
151   "finetype",
152   { data_type => "varchar", is_nullable => 1, size => 30 },
153   "bulk",
154   { data_type => "tinyint", is_nullable => 1 },
155   "enrolmentfee",
156   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
157   "overduenoticerequired",
158   { data_type => "tinyint", is_nullable => 1 },
159   "issuelimit",
160   { data_type => "smallint", is_nullable => 1 },
161   "reservefee",
162   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
163   "hidelostitems",
164   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
165   "category_type",
166   { data_type => "varchar", default_value => "A", is_nullable => 0, size => 1 },
167   "BlockExpiredPatronOpacActions",
168   {
169     accessor      => "block_expired_patron_opac_actions",
170     data_type     => "tinyint",
171     default_value => -1,
172     is_nullable   => 0,
173   },
174   "default_privacy",
175   {
176     data_type => "enum",
177     default_value => "default",
178     extra => { list => ["default", "never", "forever"] },
179     is_nullable => 0,
180   },
181   "checkprevcheckout",
182   {
183     data_type => "varchar",
184     default_value => "inherit",
185     is_nullable => 0,
186     size => 7,
187   },
188   "reset_password",
189   { data_type => "tinyint", is_nullable => 1 },
190   "change_password",
191   { data_type => "tinyint", is_nullable => 1 },
192 );
193
194 =head1 PRIMARY KEY
195
196 =over 4
197
198 =item * L</categorycode>
199
200 =back
201
202 =cut
203
204 __PACKAGE__->set_primary_key("categorycode");
205
206 =head1 RELATIONS
207
208 =head2 borrower_message_preferences
209
210 Type: has_many
211
212 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
213
214 =cut
215
216 __PACKAGE__->has_many(
217   "borrower_message_preferences",
218   "Koha::Schema::Result::BorrowerMessagePreference",
219   { "foreign.categorycode" => "self.categorycode" },
220   { cascade_copy => 0, cascade_delete => 0 },
221 );
222
223 =head2 borrowers
224
225 Type: has_many
226
227 Related object: L<Koha::Schema::Result::Borrower>
228
229 =cut
230
231 __PACKAGE__->has_many(
232   "borrowers",
233   "Koha::Schema::Result::Borrower",
234   { "foreign.categorycode" => "self.categorycode" },
235   { cascade_copy => 0, cascade_delete => 0 },
236 );
237
238 =head2 categories_branches
239
240 Type: has_many
241
242 Related object: L<Koha::Schema::Result::CategoriesBranch>
243
244 =cut
245
246 __PACKAGE__->has_many(
247   "categories_branches",
248   "Koha::Schema::Result::CategoriesBranch",
249   { "foreign.categorycode" => "self.categorycode" },
250   { cascade_copy => 0, cascade_delete => 0 },
251 );
252
253 =head2 circulation_rules
254
255 Type: has_many
256
257 Related object: L<Koha::Schema::Result::CirculationRule>
258
259 =cut
260
261 __PACKAGE__->has_many(
262   "circulation_rules",
263   "Koha::Schema::Result::CirculationRule",
264   { "foreign.categorycode" => "self.categorycode" },
265   { cascade_copy => 0, cascade_delete => 0 },
266 );
267
268
269 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2019-04-12 02:43:58
270 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7rwTH9HuxcdRCBP/bj0d/A
271
272
273 # You can replace this text with custom content, and it will be preserved on regeneration
274 1;