Bug 14279: Remove CGI::scrolling_list from issues_avg_stats.pl
[koha.git] / Koha / Schema / Result / CourseReserve.pm
blob9cfdfab7bc1cacdf411294c4dbfd3c78d85154ef
1 use utf8;
2 package Koha::Schema::Result::CourseReserve;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::CourseReserve
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<course_reserves>
20 =cut
22 __PACKAGE__->table("course_reserves");
24 =head1 ACCESSORS
26 =head2 cr_id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 course_id
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 ci_id
40 data_type: 'integer'
41 is_nullable: 0
43 =head2 staff_note
45 data_type: 'mediumtext'
46 is_nullable: 1
48 =head2 public_note
50 data_type: 'mediumtext'
51 is_nullable: 1
53 =head2 timestamp
55 data_type: 'timestamp'
56 datetime_undef_if_invalid: 1
57 default_value: current_timestamp
58 is_nullable: 0
60 =cut
62 __PACKAGE__->add_columns(
63 "cr_id",
64 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
65 "course_id",
66 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
67 "ci_id",
68 { data_type => "integer", is_nullable => 0 },
69 "staff_note",
70 { data_type => "mediumtext", is_nullable => 1 },
71 "public_note",
72 { data_type => "mediumtext", is_nullable => 1 },
73 "timestamp",
75 data_type => "timestamp",
76 datetime_undef_if_invalid => 1,
77 default_value => \"current_timestamp",
78 is_nullable => 0,
82 =head1 PRIMARY KEY
84 =over 4
86 =item * L</cr_id>
88 =back
90 =cut
92 __PACKAGE__->set_primary_key("cr_id");
94 =head1 UNIQUE CONSTRAINTS
96 =head2 C<pseudo_key>
98 =over 4
100 =item * L</course_id>
102 =item * L</ci_id>
104 =back
106 =cut
108 __PACKAGE__->add_unique_constraint("pseudo_key", ["course_id", "ci_id"]);
110 =head1 RELATIONS
112 =head2 course
114 Type: belongs_to
116 Related object: L<Koha::Schema::Result::Course>
118 =cut
120 __PACKAGE__->belongs_to(
121 "course",
122 "Koha::Schema::Result::Course",
123 { course_id => "course_id" },
124 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
128 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55
129 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SSTJhsNOuUlxr/CsDs08pQ
132 # You can replace this text with custom content, and it will be preserved on regeneration