Bug 18936: (follow-up) Add cloning of circulation rules back to Koha
[koha.git] / Koha / Schema / Result / Category.pm
blobcfe788ce6f562b17e571734a0ec9084e38984706
1 use utf8;
2 package Koha::Schema::Result::Category;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Category
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<categories>
20 =cut
22 __PACKAGE__->table("categories");
24 =head1 ACCESSORS
26 =head2 categorycode
28 data_type: 'varchar'
29 default_value: (empty string)
30 is_nullable: 0
31 size: 10
33 =head2 description
35 data_type: 'longtext'
36 is_nullable: 1
38 =head2 enrolmentperiod
40 data_type: 'smallint'
41 is_nullable: 1
43 =head2 enrolmentperioddate
45 data_type: 'date'
46 datetime_undef_if_invalid: 1
47 is_nullable: 1
49 =head2 upperagelimit
51 data_type: 'smallint'
52 is_nullable: 1
54 =head2 dateofbirthrequired
56 data_type: 'tinyint'
57 is_nullable: 1
59 =head2 finetype
61 data_type: 'varchar'
62 is_nullable: 1
63 size: 30
65 =head2 bulk
67 data_type: 'tinyint'
68 is_nullable: 1
70 =head2 enrolmentfee
72 data_type: 'decimal'
73 is_nullable: 1
74 size: [28,6]
76 =head2 overduenoticerequired
78 data_type: 'tinyint'
79 is_nullable: 1
81 =head2 issuelimit
83 data_type: 'smallint'
84 is_nullable: 1
86 =head2 reservefee
88 data_type: 'decimal'
89 is_nullable: 1
90 size: [28,6]
92 =head2 hidelostitems
94 data_type: 'tinyint'
95 default_value: 0
96 is_nullable: 0
98 =head2 category_type
100 data_type: 'varchar'
101 default_value: 'A'
102 is_nullable: 0
103 size: 1
105 =head2 BlockExpiredPatronOpacActions
107 accessor: 'block_expired_patron_opac_actions'
108 data_type: 'tinyint'
109 default_value: -1
110 is_nullable: 0
112 =head2 default_privacy
114 data_type: 'enum'
115 default_value: 'default'
116 extra: {list => ["default","never","forever"]}
117 is_nullable: 0
119 =head2 checkprevcheckout
121 data_type: 'varchar'
122 default_value: 'inherit'
123 is_nullable: 0
124 size: 7
126 =head2 reset_password
128 data_type: 'tinyint'
129 is_nullable: 1
131 =head2 change_password
133 data_type: 'tinyint'
134 is_nullable: 1
136 =cut
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",
169 accessor => "block_expired_patron_opac_actions",
170 data_type => "tinyint",
171 default_value => -1,
172 is_nullable => 0,
174 "default_privacy",
176 data_type => "enum",
177 default_value => "default",
178 extra => { list => ["default", "never", "forever"] },
179 is_nullable => 0,
181 "checkprevcheckout",
183 data_type => "varchar",
184 default_value => "inherit",
185 is_nullable => 0,
186 size => 7,
188 "reset_password",
189 { data_type => "tinyint", is_nullable => 1 },
190 "change_password",
191 { data_type => "tinyint", is_nullable => 1 },
194 =head1 PRIMARY KEY
196 =over 4
198 =item * L</categorycode>
200 =back
202 =cut
204 __PACKAGE__->set_primary_key("categorycode");
206 =head1 RELATIONS
208 =head2 borrower_message_preferences
210 Type: has_many
212 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
214 =cut
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 },
223 =head2 borrowers
225 Type: has_many
227 Related object: L<Koha::Schema::Result::Borrower>
229 =cut
231 __PACKAGE__->has_many(
232 "borrowers",
233 "Koha::Schema::Result::Borrower",
234 { "foreign.categorycode" => "self.categorycode" },
235 { cascade_copy => 0, cascade_delete => 0 },
238 =head2 categories_branches
240 Type: has_many
242 Related object: L<Koha::Schema::Result::CategoriesBranch>
244 =cut
246 __PACKAGE__->has_many(
247 "categories_branches",
248 "Koha::Schema::Result::CategoriesBranch",
249 { "foreign.categorycode" => "self.categorycode" },
250 { cascade_copy => 0, cascade_delete => 0 },
253 =head2 circulation_rules
255 Type: has_many
257 Related object: L<Koha::Schema::Result::CirculationRule>
259 =cut
261 __PACKAGE__->has_many(
262 "circulation_rules",
263 "Koha::Schema::Result::CirculationRule",
264 { "foreign.categorycode" => "self.categorycode" },
265 { cascade_copy => 0, cascade_delete => 0 },
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
272 sub koha_object_class {
273 'Koha::Patron::Category';
275 sub koha_objects_class {
276 'Koha::Patron::Categories';