2 package Koha::Schema::Result::Course;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Course
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<courses>
22 __PACKAGE__->table("courses");
32 unique id for the course
40 the authorised value for the DEPARTMENT
48 the 'course number' assigned to a course
56 the 'section' of a course
64 the name of the course
72 the authorised value for the TERM
79 the text of the staff only note
86 the text of the public / opac note
94 how many students will be taking this course/section
100 extra: {list => ["yes","no"]}
103 determines whether the course is active
107 data_type: 'timestamp'
108 datetime_undef_if_invalid: 1
109 default_value: current_timestamp
114 __PACKAGE__->add_columns(
116 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
118 { data_type => "varchar", is_nullable => 1, size => 80 },
120 { data_type => "varchar", is_nullable => 1, size => 255 },
122 { data_type => "varchar", is_nullable => 1, size => 255 },
124 { data_type => "varchar", is_nullable => 1, size => 255 },
126 { data_type => "varchar", is_nullable => 1, size => 80 },
128 { data_type => "longtext", is_nullable => 1 },
130 { data_type => "longtext", is_nullable => 1 },
132 { data_type => "varchar", is_nullable => 1, size => 20 },
136 default_value => "yes",
137 extra => { list => ["yes", "no"] },
142 data_type => "timestamp",
143 datetime_undef_if_invalid => 1,
144 default_value => \"current_timestamp",
153 =item * L</course_id>
159 __PACKAGE__->set_primary_key("course_id");
163 =head2 course_instructors
167 Related object: L<Koha::Schema::Result::CourseInstructor>
171 __PACKAGE__->has_many(
172 "course_instructors",
173 "Koha::Schema::Result::CourseInstructor",
174 { "foreign.course_id" => "self.course_id" },
175 { cascade_copy => 0, cascade_delete => 0 },
178 =head2 course_reserves
182 Related object: L<Koha::Schema::Result::CourseReserve>
186 __PACKAGE__->has_many(
188 "Koha::Schema::Result::CourseReserve",
189 { "foreign.course_id" => "self.course_id" },
190 { cascade_copy => 0, cascade_delete => 0 },
193 =head2 borrowernumbers
197 Composing rels: L</course_instructors> -> borrowernumber
201 __PACKAGE__->many_to_many("borrowernumbers", "course_instructors", "borrowernumber");
204 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
205 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Yoy4Un1rFmPk2EJW7Rf5/g
208 # You can replace this text with custom content, and it will be preserved on regeneration