Bug 8798: (follow-up) update schema files
[koha.git] / Koha / Schema / Result / CourseReserve.pm
1 package Koha::Schema::Result::CourseReserve;
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::CourseReserve
15
16 =cut
17
18 __PACKAGE__->table("course_reserves");
19
20 =head1 ACCESSORS
21
22 =head2 cr_id
23
24   data_type: 'integer'
25   is_auto_increment: 1
26   is_nullable: 0
27
28 =head2 course_id
29
30   data_type: 'integer'
31   is_foreign_key: 1
32   is_nullable: 0
33
34 =head2 ci_id
35
36   data_type: 'integer'
37   is_nullable: 0
38
39 =head2 staff_note
40
41   data_type: 'mediumtext'
42   is_nullable: 1
43
44 =head2 public_note
45
46   data_type: 'mediumtext'
47   is_nullable: 1
48
49 =head2 timestamp
50
51   data_type: 'timestamp'
52   default_value: current_timestamp
53   is_nullable: 0
54
55 =cut
56
57 __PACKAGE__->add_columns(
58   "cr_id",
59   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
60   "course_id",
61   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
62   "ci_id",
63   { data_type => "integer", is_nullable => 0 },
64   "staff_note",
65   { data_type => "mediumtext", is_nullable => 1 },
66   "public_note",
67   { data_type => "mediumtext", is_nullable => 1 },
68   "timestamp",
69   {
70     data_type     => "timestamp",
71     default_value => \"current_timestamp",
72     is_nullable   => 0,
73   },
74 );
75 __PACKAGE__->set_primary_key("cr_id");
76 __PACKAGE__->add_unique_constraint("pseudo_key", ["course_id", "ci_id"]);
77
78 =head1 RELATIONS
79
80 =head2 course
81
82 Type: belongs_to
83
84 Related object: L<Koha::Schema::Result::Course>
85
86 =cut
87
88 __PACKAGE__->belongs_to(
89   "course",
90   "Koha::Schema::Result::Course",
91   { course_id => "course_id" },
92   { on_delete => "CASCADE", on_update => "CASCADE" },
93 );
94
95
96 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57
97 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LUZRTXuhywezgITcSqqDJQ
98
99
100 # You can replace this text with custom content, and it will be preserved on regeneration
101 1;