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