Bug 20568: (QA follow-up) Get rid of the id column
[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 placed
58
59   data_type: 'date'
60   datetime_undef_if_invalid: 1
61   is_nullable: 1
62
63 =head2 replied
64
65   data_type: 'date'
66   datetime_undef_if_invalid: 1
67   is_nullable: 1
68
69 =head2 updated
70
71   data_type: 'timestamp'
72   datetime_undef_if_invalid: 1
73   default_value: current_timestamp
74   is_nullable: 0
75
76 =head2 completed
77
78   data_type: 'date'
79   datetime_undef_if_invalid: 1
80   is_nullable: 1
81
82 =head2 medium
83
84   data_type: 'varchar'
85   is_nullable: 1
86   size: 30
87
88 =head2 accessurl
89
90   data_type: 'varchar'
91   is_nullable: 1
92   size: 500
93
94 =head2 cost
95
96   data_type: 'varchar'
97   is_nullable: 1
98   size: 20
99
100 =head2 notesopac
101
102   data_type: 'mediumtext'
103   is_nullable: 1
104
105 =head2 notesstaff
106
107   data_type: 'mediumtext'
108   is_nullable: 1
109
110 =head2 orderid
111
112   data_type: 'varchar'
113   is_nullable: 1
114   size: 50
115
116 =head2 backend
117
118   data_type: 'varchar'
119   is_nullable: 1
120   size: 20
121
122 =cut
123
124 __PACKAGE__->add_columns(
125   "illrequest_id",
126   {
127     data_type => "bigint",
128     extra => { unsigned => 1 },
129     is_auto_increment => 1,
130     is_nullable => 0,
131   },
132   "borrowernumber",
133   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
134   "biblio_id",
135   { data_type => "integer", is_nullable => 1 },
136   "branchcode",
137   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 50 },
138   "status",
139   { data_type => "varchar", is_nullable => 1, size => 50 },
140   "placed",
141   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
142   "replied",
143   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
144   "updated",
145   {
146     data_type => "timestamp",
147     datetime_undef_if_invalid => 1,
148     default_value => \"current_timestamp",
149     is_nullable => 0,
150   },
151   "completed",
152   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
153   "medium",
154   { data_type => "varchar", is_nullable => 1, size => 30 },
155   "accessurl",
156   { data_type => "varchar", is_nullable => 1, size => 500 },
157   "cost",
158   { data_type => "varchar", is_nullable => 1, size => 20 },
159   "notesopac",
160   { data_type => "mediumtext", is_nullable => 1 },
161   "notesstaff",
162   { data_type => "mediumtext", is_nullable => 1 },
163   "orderid",
164   { data_type => "varchar", is_nullable => 1, size => 50 },
165   "backend",
166   { data_type => "varchar", is_nullable => 1, size => 20 },
167 );
168
169 =head1 PRIMARY KEY
170
171 =over 4
172
173 =item * L</illrequest_id>
174
175 =back
176
177 =cut
178
179 __PACKAGE__->set_primary_key("illrequest_id");
180
181 =head1 RELATIONS
182
183 =head2 borrowernumber
184
185 Type: belongs_to
186
187 Related object: L<Koha::Schema::Result::Borrower>
188
189 =cut
190
191 __PACKAGE__->belongs_to(
192   "borrowernumber",
193   "Koha::Schema::Result::Borrower",
194   { borrowernumber => "borrowernumber" },
195   {
196     is_deferrable => 1,
197     join_type     => "LEFT",
198     on_delete     => "CASCADE",
199     on_update     => "CASCADE",
200   },
201 );
202
203 =head2 branchcode
204
205 Type: belongs_to
206
207 Related object: L<Koha::Schema::Result::Branch>
208
209 =cut
210
211 __PACKAGE__->belongs_to(
212   "branchcode",
213   "Koha::Schema::Result::Branch",
214   { branchcode => "branchcode" },
215   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
216 );
217
218 =head2 illrequestattributes
219
220 Type: has_many
221
222 Related object: L<Koha::Schema::Result::Illrequestattribute>
223
224 =cut
225
226 __PACKAGE__->has_many(
227   "illrequestattributes",
228   "Koha::Schema::Result::Illrequestattribute",
229   { "foreign.illrequest_id" => "self.illrequest_id" },
230   { cascade_copy => 0, cascade_delete => 0 },
231 );
232
233
234 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
235 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Rh8DSs3xj3KRmyd7WNGDAg
236
237
238 # You can replace this text with custom code or comments, and it will be preserved on regeneration
239 1;