Bug 8798: (follow-up) update schema files
[koha.git] / Koha / Schema / Result / Course.pm
1 package Koha::Schema::Result::Course;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::Course
15
16 =cut
17
18 __PACKAGE__->table("courses");
19
20 =head1 ACCESSORS
21
22 =head2 course_id
23
24   data_type: 'integer'
25   is_auto_increment: 1
26   is_nullable: 0
27
28 =head2 department
29
30   data_type: 'varchar'
31   is_nullable: 1
32   size: 20
33
34 =head2 course_number
35
36   data_type: 'varchar'
37   is_nullable: 1
38   size: 255
39
40 =head2 section
41
42   data_type: 'varchar'
43   is_nullable: 1
44   size: 255
45
46 =head2 course_name
47
48   data_type: 'varchar'
49   is_nullable: 1
50   size: 255
51
52 =head2 term
53
54   data_type: 'varchar'
55   is_nullable: 1
56   size: 20
57
58 =head2 staff_note
59
60   data_type: 'mediumtext'
61   is_nullable: 1
62
63 =head2 public_note
64
65   data_type: 'mediumtext'
66   is_nullable: 1
67
68 =head2 students_count
69
70   data_type: 'varchar'
71   is_nullable: 1
72   size: 20
73
74 =head2 enabled
75
76   data_type: 'enum'
77   default_value: 'yes'
78   extra: {list => ["yes","no"]}
79   is_nullable: 0
80
81 =head2 timestamp
82
83   data_type: 'timestamp'
84   default_value: current_timestamp
85   is_nullable: 0
86
87 =cut
88
89 __PACKAGE__->add_columns(
90   "course_id",
91   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
92   "department",
93   { data_type => "varchar", is_nullable => 1, size => 20 },
94   "course_number",
95   { data_type => "varchar", is_nullable => 1, size => 255 },
96   "section",
97   { data_type => "varchar", is_nullable => 1, size => 255 },
98   "course_name",
99   { data_type => "varchar", is_nullable => 1, size => 255 },
100   "term",
101   { data_type => "varchar", is_nullable => 1, size => 20 },
102   "staff_note",
103   { data_type => "mediumtext", is_nullable => 1 },
104   "public_note",
105   { data_type => "mediumtext", is_nullable => 1 },
106   "students_count",
107   { data_type => "varchar", is_nullable => 1, size => 20 },
108   "enabled",
109   {
110     data_type => "enum",
111     default_value => "yes",
112     extra => { list => ["yes", "no"] },
113     is_nullable => 0,
114   },
115   "timestamp",
116   {
117     data_type     => "timestamp",
118     default_value => \"current_timestamp",
119     is_nullable   => 0,
120   },
121 );
122 __PACKAGE__->set_primary_key("course_id");
123
124 =head1 RELATIONS
125
126 =head2 course_instructors
127
128 Type: has_many
129
130 Related object: L<Koha::Schema::Result::CourseInstructor>
131
132 =cut
133
134 __PACKAGE__->has_many(
135   "course_instructors",
136   "Koha::Schema::Result::CourseInstructor",
137   { "foreign.course_id" => "self.course_id" },
138   { cascade_copy => 0, cascade_delete => 0 },
139 );
140
141 =head2 course_reserves
142
143 Type: has_many
144
145 Related object: L<Koha::Schema::Result::CourseReserve>
146
147 =cut
148
149 __PACKAGE__->has_many(
150   "course_reserves",
151   "Koha::Schema::Result::CourseReserve",
152   { "foreign.course_id" => "self.course_id" },
153   { cascade_copy => 0, cascade_delete => 0 },
154 );
155
156
157 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57
158 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SN5SfQi+SbfPr069wck64w
159
160
161 # You can replace this text with custom content, and it will be preserved on regeneration
162 1;