Bug 21395: Fix creation of PO file
[koha.git] / Koha / Schema / Result / CourseReserve.pm
blob8bb41cbb23cc4d55cdad048c3a217f8f788afd6d
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_foreign_key: 1
42 is_nullable: 0
44 =head2 staff_note
46 data_type: 'longtext'
47 is_nullable: 1
49 =head2 public_note
51 data_type: 'longtext'
52 is_nullable: 1
54 =head2 timestamp
56 data_type: 'timestamp'
57 datetime_undef_if_invalid: 1
58 default_value: current_timestamp
59 is_nullable: 0
61 =cut
63 __PACKAGE__->add_columns(
64 "cr_id",
65 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
66 "course_id",
67 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
68 "ci_id",
69 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
70 "staff_note",
71 { data_type => "longtext", is_nullable => 1 },
72 "public_note",
73 { data_type => "longtext", is_nullable => 1 },
74 "timestamp",
76 data_type => "timestamp",
77 datetime_undef_if_invalid => 1,
78 default_value => \"current_timestamp",
79 is_nullable => 0,
83 =head1 PRIMARY KEY
85 =over 4
87 =item * L</cr_id>
89 =back
91 =cut
93 __PACKAGE__->set_primary_key("cr_id");
95 =head1 UNIQUE CONSTRAINTS
97 =head2 C<pseudo_key>
99 =over 4
101 =item * L</course_id>
103 =item * L</ci_id>
105 =back
107 =cut
109 __PACKAGE__->add_unique_constraint("pseudo_key", ["course_id", "ci_id"]);
111 =head1 RELATIONS
113 =head2 ci
115 Type: belongs_to
117 Related object: L<Koha::Schema::Result::CourseItem>
119 =cut
121 __PACKAGE__->belongs_to(
122 "ci",
123 "Koha::Schema::Result::CourseItem",
124 { ci_id => "ci_id" },
125 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
128 =head2 course
130 Type: belongs_to
132 Related object: L<Koha::Schema::Result::Course>
134 =cut
136 __PACKAGE__->belongs_to(
137 "course",
138 "Koha::Schema::Result::Course",
139 { course_id => "course_id" },
140 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
144 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
145 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8SDdUrbxKuAwp6rgn85RmA
147 sub koha_objects_class {
148 'Koha::Course::Reserves';
150 sub koha_object_class {
151 'Koha::Course::Reserve';