Line 0
Link Here
|
|
|
1 |
use utf8; |
2 |
package Koha::Schema::Result::ArticleRequest; |
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::ArticleRequest |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<article_requests> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("article_requests"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 id |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
=head2 borrowernumber |
33 |
|
34 |
data_type: 'integer' |
35 |
is_foreign_key: 1 |
36 |
is_nullable: 0 |
37 |
|
38 |
=head2 biblionumber |
39 |
|
40 |
data_type: 'integer' |
41 |
is_foreign_key: 1 |
42 |
is_nullable: 0 |
43 |
|
44 |
=head2 itemnumber |
45 |
|
46 |
data_type: 'integer' |
47 |
is_foreign_key: 1 |
48 |
is_nullable: 1 |
49 |
|
50 |
=head2 title |
51 |
|
52 |
data_type: 'text' |
53 |
is_nullable: 1 |
54 |
|
55 |
=head2 author |
56 |
|
57 |
data_type: 'text' |
58 |
is_nullable: 1 |
59 |
|
60 |
=head2 volume |
61 |
|
62 |
data_type: 'text' |
63 |
is_nullable: 1 |
64 |
|
65 |
=head2 issue |
66 |
|
67 |
data_type: 'text' |
68 |
is_nullable: 1 |
69 |
|
70 |
=head2 date |
71 |
|
72 |
data_type: 'text' |
73 |
is_nullable: 1 |
74 |
|
75 |
=head2 pages |
76 |
|
77 |
data_type: 'text' |
78 |
is_nullable: 1 |
79 |
|
80 |
=head2 chapters |
81 |
|
82 |
data_type: 'text' |
83 |
is_nullable: 1 |
84 |
|
85 |
=head2 created_on |
86 |
|
87 |
data_type: 'timestamp' |
88 |
datetime_undef_if_invalid: 1 |
89 |
default_value: current_timestamp |
90 |
is_nullable: 0 |
91 |
|
92 |
=head2 updated_on |
93 |
|
94 |
data_type: 'timestamp' |
95 |
datetime_undef_if_invalid: 1 |
96 |
is_nullable: 1 |
97 |
|
98 |
=cut |
99 |
|
100 |
__PACKAGE__->add_columns( |
101 |
"id", |
102 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
103 |
"borrowernumber", |
104 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
105 |
"biblionumber", |
106 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
107 |
"itemnumber", |
108 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
109 |
"title", |
110 |
{ data_type => "text", is_nullable => 1 }, |
111 |
"author", |
112 |
{ data_type => "text", is_nullable => 1 }, |
113 |
"volume", |
114 |
{ data_type => "text", is_nullable => 1 }, |
115 |
"issue", |
116 |
{ data_type => "text", is_nullable => 1 }, |
117 |
"date", |
118 |
{ data_type => "text", is_nullable => 1 }, |
119 |
"pages", |
120 |
{ data_type => "text", is_nullable => 1 }, |
121 |
"chapters", |
122 |
{ data_type => "text", is_nullable => 1 }, |
123 |
"created_on", |
124 |
{ |
125 |
data_type => "timestamp", |
126 |
datetime_undef_if_invalid => 1, |
127 |
default_value => \"current_timestamp", |
128 |
is_nullable => 0, |
129 |
}, |
130 |
"updated_on", |
131 |
{ |
132 |
data_type => "timestamp", |
133 |
datetime_undef_if_invalid => 1, |
134 |
is_nullable => 1, |
135 |
}, |
136 |
); |
137 |
|
138 |
=head1 PRIMARY KEY |
139 |
|
140 |
=over 4 |
141 |
|
142 |
=item * L</id> |
143 |
|
144 |
=back |
145 |
|
146 |
=cut |
147 |
|
148 |
__PACKAGE__->set_primary_key("id"); |
149 |
|
150 |
=head1 RELATIONS |
151 |
|
152 |
=head2 biblionumber |
153 |
|
154 |
Type: belongs_to |
155 |
|
156 |
Related object: L<Koha::Schema::Result::Biblio> |
157 |
|
158 |
=cut |
159 |
|
160 |
__PACKAGE__->belongs_to( |
161 |
"biblionumber", |
162 |
"Koha::Schema::Result::Biblio", |
163 |
{ biblionumber => "biblionumber" }, |
164 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
165 |
); |
166 |
|
167 |
=head2 borrowernumber |
168 |
|
169 |
Type: belongs_to |
170 |
|
171 |
Related object: L<Koha::Schema::Result::Borrower> |
172 |
|
173 |
=cut |
174 |
|
175 |
__PACKAGE__->belongs_to( |
176 |
"borrowernumber", |
177 |
"Koha::Schema::Result::Borrower", |
178 |
{ borrowernumber => "borrowernumber" }, |
179 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
180 |
); |
181 |
|
182 |
=head2 itemnumber |
183 |
|
184 |
Type: belongs_to |
185 |
|
186 |
Related object: L<Koha::Schema::Result::Item> |
187 |
|
188 |
=cut |
189 |
|
190 |
__PACKAGE__->belongs_to( |
191 |
"itemnumber", |
192 |
"Koha::Schema::Result::Item", |
193 |
{ itemnumber => "itemnumber" }, |
194 |
{ |
195 |
is_deferrable => 1, |
196 |
join_type => "LEFT", |
197 |
on_delete => "SET NULL", |
198 |
on_update => "CASCADE", |
199 |
}, |
200 |
); |
201 |
|
202 |
|
203 |
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-07-28 10:40:02 |
204 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Gcq0lkNV972sKkcueQq19w |
205 |
|
206 |
|
207 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
208 |
1; |