Bug 12558: DBIx::Class schema update 07/2014
[koha.git] / Koha / Schema / Result / CourseReserve.pm
1 use utf8;
2 package Koha::Schema::Result::CourseReserve;
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::CourseReserve
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<course_reserves>
19
20 =cut
21
22 __PACKAGE__->table("course_reserves");
23
24 =head1 ACCESSORS
25
26 =head2 cr_id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 course_id
33
34   data_type: 'integer'
35   is_foreign_key: 1
36   is_nullable: 0
37
38 =head2 ci_id
39
40   data_type: 'integer'
41   is_nullable: 0
42
43 =head2 staff_note
44
45   data_type: 'mediumtext'
46   is_nullable: 1
47
48 =head2 public_note
49
50   data_type: 'mediumtext'
51   is_nullable: 1
52
53 =head2 timestamp
54
55   data_type: 'timestamp'
56   datetime_undef_if_invalid: 1
57   default_value: current_timestamp
58   is_nullable: 0
59
60 =cut
61
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",
74   {
75     data_type => "timestamp",
76     datetime_undef_if_invalid => 1,
77     default_value => \"current_timestamp",
78     is_nullable => 0,
79   },
80 );
81
82 =head1 PRIMARY KEY
83
84 =over 4
85
86 =item * L</cr_id>
87
88 =back
89
90 =cut
91
92 __PACKAGE__->set_primary_key("cr_id");
93
94 =head1 UNIQUE CONSTRAINTS
95
96 =head2 C<pseudo_key>
97
98 =over 4
99
100 =item * L</course_id>
101
102 =item * L</ci_id>
103
104 =back
105
106 =cut
107
108 __PACKAGE__->add_unique_constraint("pseudo_key", ["course_id", "ci_id"]);
109
110 =head1 RELATIONS
111
112 =head2 course
113
114 Type: belongs_to
115
116 Related object: L<Koha::Schema::Result::Course>
117
118 =cut
119
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" },
125 );
126
127
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
130
131
132 # You can replace this text with custom content, and it will be preserved on regeneration
133 1;