Bug 20639: DBRev 18.12.00.016
[koha.git] / Koha / Schema / Result / Illrequest.pm
1 use utf8;
2 package Koha::Schema::Result::Illrequest;
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::Illrequest
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<illrequests>
19
20 =cut
21
22 __PACKAGE__->table("illrequests");
23
24 =head1 ACCESSORS
25
26 =head2 illrequest_id
27
28   data_type: 'bigint'
29   extra: {unsigned => 1}
30   is_auto_increment: 1
31   is_nullable: 0
32
33 =head2 borrowernumber
34
35   data_type: 'integer'
36   is_foreign_key: 1
37   is_nullable: 1
38
39 =head2 biblio_id
40
41   data_type: 'integer'
42   is_nullable: 1
43
44 =head2 branchcode
45
46   data_type: 'varchar'
47   is_foreign_key: 1
48   is_nullable: 0
49   size: 50
50
51 =head2 status
52
53   data_type: 'varchar'
54   is_nullable: 1
55   size: 50
56
57 =head2 status_alias
58
59   data_type: 'varchar'
60   is_foreign_key: 1
61   is_nullable: 1
62   size: 80
63
64 =head2 placed
65
66   data_type: 'date'
67   datetime_undef_if_invalid: 1
68   is_nullable: 1
69
70 =head2 replied
71
72   data_type: 'date'
73   datetime_undef_if_invalid: 1
74   is_nullable: 1
75
76 =head2 updated
77
78   data_type: 'timestamp'
79   datetime_undef_if_invalid: 1
80   default_value: current_timestamp
81   is_nullable: 0
82
83 =head2 completed
84
85   data_type: 'date'
86   datetime_undef_if_invalid: 1
87   is_nullable: 1
88
89 =head2 medium
90
91   data_type: 'varchar'
92   is_nullable: 1
93   size: 30
94
95 =head2 accessurl
96
97   data_type: 'varchar'
98   is_nullable: 1
99   size: 500
100
101 =head2 cost
102
103   data_type: 'varchar'
104   is_nullable: 1
105   size: 20
106
107 =head2 price_paid
108
109   data_type: 'varchar'
110   is_nullable: 1
111   size: 20
112
113 =head2 notesopac
114
115   data_type: 'mediumtext'
116   is_nullable: 1
117
118 =head2 notesstaff
119
120   data_type: 'mediumtext'
121   is_nullable: 1
122
123 =head2 orderid
124
125   data_type: 'varchar'
126   is_nullable: 1
127   size: 50
128
129 =head2 backend
130
131   data_type: 'varchar'
132   is_nullable: 1
133   size: 20
134
135 =cut
136
137 __PACKAGE__->add_columns(
138   "illrequest_id",
139   {
140     data_type => "bigint",
141     extra => { unsigned => 1 },
142     is_auto_increment => 1,
143     is_nullable => 0,
144   },
145   "borrowernumber",
146   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
147   "biblio_id",
148   { data_type => "integer", is_nullable => 1 },
149   "branchcode",
150   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 50 },
151   "status",
152   { data_type => "varchar", is_nullable => 1, size => 50 },
153   "status_alias",
154   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
155   "placed",
156   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
157   "replied",
158   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
159   "updated",
160   {
161     data_type => "timestamp",
162     datetime_undef_if_invalid => 1,
163     default_value => \"current_timestamp",
164     is_nullable => 0,
165   },
166   "completed",
167   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
168   "medium",
169   { data_type => "varchar", is_nullable => 1, size => 30 },
170   "accessurl",
171   { data_type => "varchar", is_nullable => 1, size => 500 },
172   "cost",
173   { data_type => "varchar", is_nullable => 1, size => 20 },
174   "price_paid",
175   { data_type => "varchar", is_nullable => 1, size => 20 },
176   "notesopac",
177   { data_type => "mediumtext", is_nullable => 1 },
178   "notesstaff",
179   { data_type => "mediumtext", is_nullable => 1 },
180   "orderid",
181   { data_type => "varchar", is_nullable => 1, size => 50 },
182   "backend",
183   { data_type => "varchar", is_nullable => 1, size => 20 },
184 );
185
186 =head1 PRIMARY KEY
187
188 =over 4
189
190 =item * L</illrequest_id>
191
192 =back
193
194 =cut
195
196 __PACKAGE__->set_primary_key("illrequest_id");
197
198 =head1 RELATIONS
199
200 =head2 borrowernumber
201
202 Type: belongs_to
203
204 Related object: L<Koha::Schema::Result::Borrower>
205
206 =cut
207
208 __PACKAGE__->belongs_to(
209   "borrowernumber",
210   "Koha::Schema::Result::Borrower",
211   { borrowernumber => "borrowernumber" },
212   {
213     is_deferrable => 1,
214     join_type     => "LEFT",
215     on_delete     => "CASCADE",
216     on_update     => "CASCADE",
217   },
218 );
219
220 =head2 branchcode
221
222 Type: belongs_to
223
224 Related object: L<Koha::Schema::Result::Branch>
225
226 =cut
227
228 __PACKAGE__->belongs_to(
229   "branchcode",
230   "Koha::Schema::Result::Branch",
231   { branchcode => "branchcode" },
232   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
233 );
234
235 =head2 illcomments
236
237 Type: has_many
238
239 Related object: L<Koha::Schema::Result::Illcomment>
240
241 =cut
242
243 __PACKAGE__->has_many(
244   "illcomments",
245   "Koha::Schema::Result::Illcomment",
246   { "foreign.illrequest_id" => "self.illrequest_id" },
247   { cascade_copy => 0, cascade_delete => 0 },
248 );
249
250 =head2 illrequestattributes
251
252 Type: has_many
253
254 Related object: L<Koha::Schema::Result::Illrequestattribute>
255
256 =cut
257
258 __PACKAGE__->has_many(
259   "illrequestattributes",
260   "Koha::Schema::Result::Illrequestattribute",
261   { "foreign.illrequest_id" => "self.illrequest_id" },
262   { cascade_copy => 0, cascade_delete => 0 },
263 );
264
265 =head2 status_alias
266
267 Type: belongs_to
268
269 Related object: L<Koha::Schema::Result::AuthorisedValue>
270
271 =cut
272
273 __PACKAGE__->belongs_to(
274   "status_alias",
275   "Koha::Schema::Result::AuthorisedValue",
276   { authorised_value => "status_alias" },
277   {
278     is_deferrable => 1,
279     join_type     => "LEFT",
280     on_delete     => "SET NULL",
281     on_update     => "CASCADE",
282   },
283 );
284
285
286 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-02-22 14:32:49
287 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I6fY8XRfEmRxSzOeVT9Krw
288
289
290 # You can replace this text with custom code or comments, and it will be preserved on regeneration
291 1;