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 holdingbranch_enabled
87 =head2 holdingbranch_storage
99 =head2 location_enabled
105 =head2 location_storage
115 extra: {list => ["yes","no"]}
120 data_type: 'timestamp'
121 datetime_undef_if_invalid: 1
122 default_value: current_timestamp
127 __PACKAGE__->add_columns(
129 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
131 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
133 { data_type => "varchar", is_nullable => 1, size => 10 },
135 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
137 { data_type => "varchar", is_nullable => 1, size => 10 },
139 { data_type => "varchar", is_nullable => 1, size => 80 },
141 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
143 { data_type => "varchar", is_nullable => 1, size => 80 },
145 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
146 "holdingbranch_enabled",
147 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
148 "holdingbranch_storage",
149 { data_type => "varchar", is_nullable => 1, size => 10 },
151 { data_type => "varchar", is_nullable => 1, size => 80 },
153 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
155 { data_type => "varchar", is_nullable => 1, size => 80 },
159 default_value => "no",
160 extra => { list => ["yes", "no"] },
165 data_type => "timestamp",
166 datetime_undef_if_invalid => 1,
167 default_value => \"current_timestamp",
182 __PACKAGE__->set_primary_key("ci_id");
184 =head1 UNIQUE CONSTRAINTS
190 =item * L</itemnumber>
196 __PACKAGE__->add_unique_constraint("itemnumber", ["itemnumber"]);
200 =head2 course_reserves
204 Related object: L<Koha::Schema::Result::CourseReserve>
208 __PACKAGE__->has_many(
210 "Koha::Schema::Result::CourseReserve",
211 { "foreign.ci_id" => "self.ci_id" },
212 { cascade_copy => 0, cascade_delete => 0 },
219 Related object: L<Koha::Schema::Result::Branch>
223 __PACKAGE__->belongs_to(
225 "Koha::Schema::Result::Branch",
226 { branchcode => "holdingbranch" },
230 on_delete => "CASCADE",
231 on_update => "CASCADE",
239 Related object: L<Koha::Schema::Result::Item>
243 __PACKAGE__->belongs_to(
245 "Koha::Schema::Result::Item",
246 { itemnumber => "itemnumber" },
247 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
251 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-19 16:07:13
252 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8tTH0fAzewvaXRYs8+VZcg
254 __PACKAGE__->add_columns(
255 '+itype_enabled' => { is_boolean => 1 },
256 '+ccode_enabled' => { is_boolean => 1 },
257 '+holdingbranch_enabled' => { is_boolean => 1 },
258 '+location_enabled' => { is_boolean => 1 },
261 sub koha_objects_class {
262 'Koha::Course::Items';
264 sub koha_object_class {
265 'Koha::Course::Item';