2 package Koha::Schema::Result::CourseReserve;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::CourseReserve
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<course_reserves>
22 __PACKAGE__->table("course_reserves");
38 foreign key to link to courses.course_id
46 foreign key to link to courses_items.ci_id
60 public, OPAC visible note
64 data_type: 'timestamp'
65 datetime_undef_if_invalid: 1
66 default_value: current_timestamp
71 __PACKAGE__->add_columns(
73 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
75 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
77 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
79 { data_type => "longtext", is_nullable => 1 },
81 { data_type => "longtext", is_nullable => 1 },
84 data_type => "timestamp",
85 datetime_undef_if_invalid => 1,
86 default_value => \"current_timestamp",
101 __PACKAGE__->set_primary_key("cr_id");
103 =head1 UNIQUE CONSTRAINTS
109 =item * L</course_id>
117 __PACKAGE__->add_unique_constraint("pseudo_key", ["course_id", "ci_id"]);
125 Related object: L<Koha::Schema::Result::CourseItem>
129 __PACKAGE__->belongs_to(
131 "Koha::Schema::Result::CourseItem",
132 { ci_id => "ci_id" },
133 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
140 Related object: L<Koha::Schema::Result::Course>
144 __PACKAGE__->belongs_to(
146 "Koha::Schema::Result::Course",
147 { course_id => "course_id" },
148 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
152 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
153 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:K3co29iVHAcF2/S0tGT1LA
155 sub koha_objects_class {
156 'Koha::Course::Reserves';
158 sub koha_object_class {
159 'Koha::Course::Reserve';