Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / Branchtransfer.pm
1 use utf8;
2 package Koha::Schema::Result::Branchtransfer;
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::Branchtransfer
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<branchtransfers>
19
20 =cut
21
22 __PACKAGE__->table("branchtransfers");
23
24 =head1 ACCESSORS
25
26 =head2 branchtransfer_id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 primary key
33
34 =head2 itemnumber
35
36   data_type: 'integer'
37   default_value: 0
38   is_foreign_key: 1
39   is_nullable: 0
40
41 the itemnumber that it is in transit (items.itemnumber)
42
43 =head2 daterequested
44
45   data_type: 'timestamp'
46   datetime_undef_if_invalid: 1
47   default_value: current_timestamp
48   is_nullable: 0
49
50 the date the transfer was requested
51
52 =head2 datesent
53
54   data_type: 'datetime'
55   datetime_undef_if_invalid: 1
56   is_nullable: 1
57
58 the date the transfer was initialized
59
60 =head2 frombranch
61
62   data_type: 'varchar'
63   default_value: (empty string)
64   is_foreign_key: 1
65   is_nullable: 0
66   size: 10
67
68 the branch the transfer is coming from
69
70 =head2 datearrived
71
72   data_type: 'datetime'
73   datetime_undef_if_invalid: 1
74   is_nullable: 1
75
76 the date the transfer arrived at its destination
77
78 =head2 datecancelled
79
80   data_type: 'datetime'
81   datetime_undef_if_invalid: 1
82   is_nullable: 1
83
84 the date the transfer was cancelled
85
86 =head2 tobranch
87
88   data_type: 'varchar'
89   default_value: (empty string)
90   is_foreign_key: 1
91   is_nullable: 0
92   size: 10
93
94 the branch the transfer was going to
95
96 =head2 comments
97
98   data_type: 'longtext'
99   is_nullable: 1
100
101 any comments related to the transfer
102
103 =head2 reason
104
105   data_type: 'enum'
106   extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve","TransferCancellation","Recall","RecallCancellation"]}
107   is_nullable: 1
108
109 what triggered the transfer
110
111 =head2 cancellation_reason
112
113   data_type: 'enum'
114   extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve","ItemLost","WrongTransfer","RecallCancellation"]}
115   is_nullable: 1
116
117 what triggered the transfer cancellation
118
119 =cut
120
121 __PACKAGE__->add_columns(
122   "branchtransfer_id",
123   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
124   "itemnumber",
125   {
126     data_type      => "integer",
127     default_value  => 0,
128     is_foreign_key => 1,
129     is_nullable    => 0,
130   },
131   "daterequested",
132   {
133     data_type => "timestamp",
134     datetime_undef_if_invalid => 1,
135     default_value => \"current_timestamp",
136     is_nullable => 0,
137   },
138   "datesent",
139   {
140     data_type => "datetime",
141     datetime_undef_if_invalid => 1,
142     is_nullable => 1,
143   },
144   "frombranch",
145   {
146     data_type => "varchar",
147     default_value => "",
148     is_foreign_key => 1,
149     is_nullable => 0,
150     size => 10,
151   },
152   "datearrived",
153   {
154     data_type => "datetime",
155     datetime_undef_if_invalid => 1,
156     is_nullable => 1,
157   },
158   "datecancelled",
159   {
160     data_type => "datetime",
161     datetime_undef_if_invalid => 1,
162     is_nullable => 1,
163   },
164   "tobranch",
165   {
166     data_type => "varchar",
167     default_value => "",
168     is_foreign_key => 1,
169     is_nullable => 0,
170     size => 10,
171   },
172   "comments",
173   { data_type => "longtext", is_nullable => 1 },
174   "reason",
175   {
176     data_type => "enum",
177     extra => {
178       list => [
179         "Manual",
180         "StockrotationAdvance",
181         "StockrotationRepatriation",
182         "ReturnToHome",
183         "ReturnToHolding",
184         "RotatingCollection",
185         "Reserve",
186         "LostReserve",
187         "CancelReserve",
188         "TransferCancellation",
189         "Recall",
190         "RecallCancellation",
191       ],
192     },
193     is_nullable => 1,
194   },
195   "cancellation_reason",
196   {
197     data_type => "enum",
198     extra => {
199       list => [
200         "Manual",
201         "StockrotationAdvance",
202         "StockrotationRepatriation",
203         "ReturnToHome",
204         "ReturnToHolding",
205         "RotatingCollection",
206         "Reserve",
207         "LostReserve",
208         "CancelReserve",
209         "ItemLost",
210         "WrongTransfer",
211         "RecallCancellation",
212       ],
213     },
214     is_nullable => 1,
215   },
216 );
217
218 =head1 PRIMARY KEY
219
220 =over 4
221
222 =item * L</branchtransfer_id>
223
224 =back
225
226 =cut
227
228 __PACKAGE__->set_primary_key("branchtransfer_id");
229
230 =head1 RELATIONS
231
232 =head2 frombranch
233
234 Type: belongs_to
235
236 Related object: L<Koha::Schema::Result::Branch>
237
238 =cut
239
240 __PACKAGE__->belongs_to(
241   "frombranch",
242   "Koha::Schema::Result::Branch",
243   { branchcode => "frombranch" },
244   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
245 );
246
247 =head2 itemnumber
248
249 Type: belongs_to
250
251 Related object: L<Koha::Schema::Result::Item>
252
253 =cut
254
255 __PACKAGE__->belongs_to(
256   "itemnumber",
257   "Koha::Schema::Result::Item",
258   { itemnumber => "itemnumber" },
259   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
260 );
261
262 =head2 tobranch
263
264 Type: belongs_to
265
266 Related object: L<Koha::Schema::Result::Branch>
267
268 =cut
269
270 __PACKAGE__->belongs_to(
271   "tobranch",
272   "Koha::Schema::Result::Branch",
273   { branchcode => "tobranch" },
274   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
275 );
276
277
278 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-10-03 16:48:17
279 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BkhtfptiDqKKSv/hmCQy3w
280
281 sub koha_object_class {
282     'Koha::Item::Transfer';
283 }
284 sub koha_objects_class {
285     'Koha::Item::Transfers';
286 }
287
288 1;