Bug 23727: Update Schema
[koha.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 =head2 itemnumber
33
34   data_type: 'integer'
35   default_value: 0
36   is_foreign_key: 1
37   is_nullable: 0
38
39 =head2 datesent
40
41   data_type: 'datetime'
42   datetime_undef_if_invalid: 1
43   is_nullable: 1
44
45 =head2 frombranch
46
47   data_type: 'varchar'
48   default_value: (empty string)
49   is_foreign_key: 1
50   is_nullable: 0
51   size: 10
52
53 =head2 datearrived
54
55   data_type: 'datetime'
56   datetime_undef_if_invalid: 1
57   is_nullable: 1
58
59 =head2 tobranch
60
61   data_type: 'varchar'
62   default_value: (empty string)
63   is_foreign_key: 1
64   is_nullable: 0
65   size: 10
66
67 =head2 comments
68
69   data_type: 'longtext'
70   is_nullable: 1
71
72 =head2 reason
73
74   data_type: 'enum'
75   extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve"]}
76   is_nullable: 1
77
78 =cut
79
80 __PACKAGE__->add_columns(
81   "branchtransfer_id",
82   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
83   "itemnumber",
84   {
85     data_type      => "integer",
86     default_value  => 0,
87     is_foreign_key => 1,
88     is_nullable    => 0,
89   },
90   "datesent",
91   {
92     data_type => "datetime",
93     datetime_undef_if_invalid => 1,
94     is_nullable => 1,
95   },
96   "frombranch",
97   {
98     data_type => "varchar",
99     default_value => "",
100     is_foreign_key => 1,
101     is_nullable => 0,
102     size => 10,
103   },
104   "datearrived",
105   {
106     data_type => "datetime",
107     datetime_undef_if_invalid => 1,
108     is_nullable => 1,
109   },
110   "tobranch",
111   {
112     data_type => "varchar",
113     default_value => "",
114     is_foreign_key => 1,
115     is_nullable => 0,
116     size => 10,
117   },
118   "comments",
119   { data_type => "longtext", is_nullable => 1 },
120   "reason",
121   {
122     data_type => "enum",
123     extra => {
124       list => [
125         "Manual",
126         "StockrotationAdvance",
127         "StockrotationRepatriation",
128         "ReturnToHome",
129         "ReturnToHolding",
130         "RotatingCollection",
131         "Reserve",
132         "LostReserve",
133         "CancelReserve",
134       ],
135     },
136     is_nullable => 1,
137   },
138 );
139
140 =head1 PRIMARY KEY
141
142 =over 4
143
144 =item * L</branchtransfer_id>
145
146 =back
147
148 =cut
149
150 __PACKAGE__->set_primary_key("branchtransfer_id");
151
152 =head1 RELATIONS
153
154 =head2 frombranch
155
156 Type: belongs_to
157
158 Related object: L<Koha::Schema::Result::Branch>
159
160 =cut
161
162 __PACKAGE__->belongs_to(
163   "frombranch",
164   "Koha::Schema::Result::Branch",
165   { branchcode => "frombranch" },
166   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
167 );
168
169 =head2 itemnumber
170
171 Type: belongs_to
172
173 Related object: L<Koha::Schema::Result::Item>
174
175 =cut
176
177 __PACKAGE__->belongs_to(
178   "itemnumber",
179   "Koha::Schema::Result::Item",
180   { itemnumber => "itemnumber" },
181   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
182 );
183
184 =head2 tobranch
185
186 Type: belongs_to
187
188 Related object: L<Koha::Schema::Result::Branch>
189
190 =cut
191
192 __PACKAGE__->belongs_to(
193   "tobranch",
194   "Koha::Schema::Result::Branch",
195   { branchcode => "tobranch" },
196   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
197 );
198
199
200 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-20 11:24:33
201 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:50FpCj6vWH5O8MThCy/1hA
202
203 sub koha_object_class {
204     'Koha::Item::Transfer';
205 }
206 sub koha_objects_class {
207     'Koha::Item::Transfers';
208 }
209
210 1;