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