Bug 8798: DBIx::Class base classes for all Koha tables
[koha-equinox.git] / 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 =cut
101
102 __PACKAGE__->add_columns(
103   "categorycode",
104   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
105   "description",
106   { data_type => "mediumtext", is_nullable => 1 },
107   "enrolmentperiod",
108   { data_type => "smallint", is_nullable => 1 },
109   "enrolmentperioddate",
110   { data_type => "date", is_nullable => 1 },
111   "upperagelimit",
112   { data_type => "smallint", is_nullable => 1 },
113   "dateofbirthrequired",
114   { data_type => "tinyint", is_nullable => 1 },
115   "finetype",
116   { data_type => "varchar", is_nullable => 1, size => 30 },
117   "bulk",
118   { data_type => "tinyint", is_nullable => 1 },
119   "enrolmentfee",
120   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
121   "overduenoticerequired",
122   { data_type => "tinyint", is_nullable => 1 },
123   "issuelimit",
124   { data_type => "smallint", is_nullable => 1 },
125   "reservefee",
126   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
127   "hidelostitems",
128   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
129   "category_type",
130   { data_type => "varchar", default_value => "A", is_nullable => 0, size => 1 },
131 );
132 __PACKAGE__->set_primary_key("categorycode");
133
134 =head1 RELATIONS
135
136 =head2 borrower_attribute_types
137
138 Type: has_many
139
140 Related object: L<Koha::Schema::Result::BorrowerAttributeType>
141
142 =cut
143
144 __PACKAGE__->has_many(
145   "borrower_attribute_types",
146   "Koha::Schema::Result::BorrowerAttributeType",
147   { "foreign.category_code" => "self.categorycode" },
148   { cascade_copy => 0, cascade_delete => 0 },
149 );
150
151 =head2 borrower_message_preferences
152
153 Type: has_many
154
155 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
156
157 =cut
158
159 __PACKAGE__->has_many(
160   "borrower_message_preferences",
161   "Koha::Schema::Result::BorrowerMessagePreference",
162   { "foreign.categorycode" => "self.categorycode" },
163   { cascade_copy => 0, cascade_delete => 0 },
164 );
165
166 =head2 borrowers
167
168 Type: has_many
169
170 Related object: L<Koha::Schema::Result::Borrower>
171
172 =cut
173
174 __PACKAGE__->has_many(
175   "borrowers",
176   "Koha::Schema::Result::Borrower",
177   { "foreign.categorycode" => "self.categorycode" },
178   { cascade_copy => 0, cascade_delete => 0 },
179 );
180
181 =head2 branch_borrower_circ_rules
182
183 Type: has_many
184
185 Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
186
187 =cut
188
189 __PACKAGE__->has_many(
190   "branch_borrower_circ_rules",
191   "Koha::Schema::Result::BranchBorrowerCircRule",
192   { "foreign.categorycode" => "self.categorycode" },
193   { cascade_copy => 0, cascade_delete => 0 },
194 );
195
196 =head2 default_borrower_circ_rule
197
198 Type: might_have
199
200 Related object: L<Koha::Schema::Result::DefaultBorrowerCircRule>
201
202 =cut
203
204 __PACKAGE__->might_have(
205   "default_borrower_circ_rule",
206   "Koha::Schema::Result::DefaultBorrowerCircRule",
207   { "foreign.categorycode" => "self.categorycode" },
208   { cascade_copy => 0, cascade_delete => 0 },
209 );
210
211
212 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
213 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BpTckQJaDAxGwrOS9s3tuQ
214
215
216 # You can replace this text with custom content, and it will be preserved on regeneration
217 1;