Bug 8798: (follow-up) update schema files
[koha.git] / Koha / Schema / Result / CourseItem.pm
1 package Koha::Schema::Result::CourseItem;
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::CourseItem
15
16 =cut
17
18 __PACKAGE__->table("course_items");
19
20 =head1 ACCESSORS
21
22 =head2 ci_id
23
24   data_type: 'integer'
25   is_auto_increment: 1
26   is_nullable: 0
27
28 =head2 itemnumber
29
30   data_type: 'integer'
31   is_foreign_key: 1
32   is_nullable: 0
33
34 =head2 itype
35
36   data_type: 'varchar'
37   is_nullable: 1
38   size: 10
39
40 =head2 ccode
41
42   data_type: 'varchar'
43   is_nullable: 1
44   size: 10
45
46 =head2 holdingbranch
47
48   data_type: 'varchar'
49   is_foreign_key: 1
50   is_nullable: 1
51   size: 10
52
53 =head2 location
54
55   data_type: 'varchar'
56   is_nullable: 1
57   size: 80
58
59 =head2 enabled
60
61   data_type: 'enum'
62   default_value: 'no'
63   extra: {list => ["yes","no"]}
64   is_nullable: 0
65
66 =head2 timestamp
67
68   data_type: 'timestamp'
69   default_value: current_timestamp
70   is_nullable: 0
71
72 =cut
73
74 __PACKAGE__->add_columns(
75   "ci_id",
76   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
77   "itemnumber",
78   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
79   "itype",
80   { data_type => "varchar", is_nullable => 1, size => 10 },
81   "ccode",
82   { data_type => "varchar", is_nullable => 1, size => 10 },
83   "holdingbranch",
84   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
85   "location",
86   { data_type => "varchar", is_nullable => 1, size => 80 },
87   "enabled",
88   {
89     data_type => "enum",
90     default_value => "no",
91     extra => { list => ["yes", "no"] },
92     is_nullable => 0,
93   },
94   "timestamp",
95   {
96     data_type     => "timestamp",
97     default_value => \"current_timestamp",
98     is_nullable   => 0,
99   },
100 );
101 __PACKAGE__->set_primary_key("ci_id");
102 __PACKAGE__->add_unique_constraint("itemnumber", ["itemnumber"]);
103
104 =head1 RELATIONS
105
106 =head2 holdingbranch
107
108 Type: belongs_to
109
110 Related object: L<Koha::Schema::Result::Branch>
111
112 =cut
113
114 __PACKAGE__->belongs_to(
115   "holdingbranch",
116   "Koha::Schema::Result::Branch",
117   { branchcode => "holdingbranch" },
118   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
119 );
120
121 =head2 itemnumber
122
123 Type: belongs_to
124
125 Related object: L<Koha::Schema::Result::Item>
126
127 =cut
128
129 __PACKAGE__->belongs_to(
130   "itemnumber",
131   "Koha::Schema::Result::Item",
132   { itemnumber => "itemnumber" },
133   { on_delete => "CASCADE", on_update => "CASCADE" },
134 );
135
136
137 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57
138 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BAqW3ImuEzBoIMWAeM12qA
139
140
141 # You can replace this text with custom content, and it will be preserved on regeneration
142 1;