2 package Koha::Schema::Result::CourseItem;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::CourseItem
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<course_items>
22 __PACKAGE__->table("course_items");
81 =head2 homebranch_enabled
87 =head2 homebranch_storage
101 =head2 holdingbranch_enabled
107 =head2 holdingbranch_storage
119 =head2 location_enabled
125 =head2 location_storage
135 extra: {list => ["yes","no"]}
140 data_type: 'timestamp'
141 datetime_undef_if_invalid: 1
142 default_value: current_timestamp
147 __PACKAGE__->add_columns(
149 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
151 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
153 { data_type => "varchar", is_nullable => 1, size => 10 },
155 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
157 { data_type => "varchar", is_nullable => 1, size => 10 },
159 { data_type => "varchar", is_nullable => 1, size => 80 },
161 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
163 { data_type => "varchar", is_nullable => 1, size => 80 },
165 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
166 "homebranch_enabled",
167 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
168 "homebranch_storage",
169 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
171 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
172 "holdingbranch_enabled",
173 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
174 "holdingbranch_storage",
175 { data_type => "varchar", is_nullable => 1, size => 10 },
177 { data_type => "varchar", is_nullable => 1, size => 80 },
179 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
181 { data_type => "varchar", is_nullable => 1, size => 80 },
185 default_value => "no",
186 extra => { list => ["yes", "no"] },
191 data_type => "timestamp",
192 datetime_undef_if_invalid => 1,
193 default_value => \"current_timestamp",
208 __PACKAGE__->set_primary_key("ci_id");
210 =head1 UNIQUE CONSTRAINTS
216 =item * L</itemnumber>
222 __PACKAGE__->add_unique_constraint("itemnumber", ["itemnumber"]);
226 =head2 course_reserves
230 Related object: L<Koha::Schema::Result::CourseReserve>
234 __PACKAGE__->has_many(
236 "Koha::Schema::Result::CourseReserve",
237 { "foreign.ci_id" => "self.ci_id" },
238 { cascade_copy => 0, cascade_delete => 0 },
245 Related object: L<Koha::Schema::Result::Branch>
249 __PACKAGE__->belongs_to(
251 "Koha::Schema::Result::Branch",
252 { branchcode => "holdingbranch" },
256 on_delete => "CASCADE",
257 on_update => "CASCADE",
265 Related object: L<Koha::Schema::Result::Branch>
269 __PACKAGE__->belongs_to(
271 "Koha::Schema::Result::Branch",
272 { branchcode => "homebranch" },
276 on_delete => "CASCADE",
277 on_update => "CASCADE",
281 =head2 homebranch_storage
285 Related object: L<Koha::Schema::Result::Branch>
289 __PACKAGE__->belongs_to(
290 "homebranch_storage",
291 "Koha::Schema::Result::Branch",
292 { branchcode => "homebranch_storage" },
296 on_delete => "CASCADE",
297 on_update => "CASCADE",
305 Related object: L<Koha::Schema::Result::Item>
309 __PACKAGE__->belongs_to(
311 "Koha::Schema::Result::Item",
312 { itemnumber => "itemnumber" },
313 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
317 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-04-24 10:54:54
318 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cXNlGAgIZMs+Id7/FJSBRQ
320 __PACKAGE__->add_columns(
321 '+itype_enabled' => { is_boolean => 1 },
322 '+ccode_enabled' => { is_boolean => 1 },
323 '+holdingbranch_enabled' => { is_boolean => 1 },
324 '+location_enabled' => { is_boolean => 1 },
327 sub koha_objects_class {
328 'Koha::Course::Items';
330 sub koha_object_class {
331 'Koha::Course::Item';