Bug 33606: (QA follow-up) Cosmetic changes
[koha.git] / Koha / Schema / Result / CourseInstructor.pm
1 use utf8;
2 package Koha::Schema::Result::CourseInstructor;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Koha::Schema::Result::CourseInstructor
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<course_instructors>
19
20 =cut
21
22 __PACKAGE__->table("course_instructors");
23
24 =head1 ACCESSORS
25
26 =head2 course_id
27
28   data_type: 'integer'
29   is_foreign_key: 1
30   is_nullable: 0
31
32 foreign key to link to courses.course_id
33
34 =head2 borrowernumber
35
36   data_type: 'integer'
37   is_foreign_key: 1
38   is_nullable: 0
39
40 foreign key to link to borrowers.borrowernumber for instructor information
41
42 =cut
43
44 __PACKAGE__->add_columns(
45   "course_id",
46   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
47   "borrowernumber",
48   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
49 );
50
51 =head1 PRIMARY KEY
52
53 =over 4
54
55 =item * L</course_id>
56
57 =item * L</borrowernumber>
58
59 =back
60
61 =cut
62
63 __PACKAGE__->set_primary_key("course_id", "borrowernumber");
64
65 =head1 RELATIONS
66
67 =head2 borrowernumber
68
69 Type: belongs_to
70
71 Related object: L<Koha::Schema::Result::Borrower>
72
73 =cut
74
75 __PACKAGE__->belongs_to(
76   "borrowernumber",
77   "Koha::Schema::Result::Borrower",
78   { borrowernumber => "borrowernumber" },
79   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
80 );
81
82 =head2 course
83
84 Type: belongs_to
85
86 Related object: L<Koha::Schema::Result::Course>
87
88 =cut
89
90 __PACKAGE__->belongs_to(
91   "course",
92   "Koha::Schema::Result::Course",
93   { course_id => "course_id" },
94   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
95 );
96
97
98 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
99 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8JrMgWOtc6LGT7EjOzyjrQ
100
101 sub koha_objects_class {
102     'Koha::Course::Instructors';
103 }
104 sub koha_object_class {
105     'Koha::Course::Instructor';
106 }
107
108 1;