Bug 21395: Fix creation of PO file
[koha.git] / Koha / Schema / Result / Branchtransfer.pm
bloba2f63b81c013fcf7a7ca89d2d5869d9e4a743145
1 use utf8;
2 package Koha::Schema::Result::Branchtransfer;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Branchtransfer
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<branchtransfers>
20 =cut
22 __PACKAGE__->table("branchtransfers");
24 =head1 ACCESSORS
26 =head2 branchtransfer_id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 itemnumber
34 data_type: 'integer'
35 default_value: 0
36 is_foreign_key: 1
37 is_nullable: 0
39 =head2 datesent
41 data_type: 'datetime'
42 datetime_undef_if_invalid: 1
43 is_nullable: 1
45 =head2 frombranch
47 data_type: 'varchar'
48 default_value: (empty string)
49 is_foreign_key: 1
50 is_nullable: 0
51 size: 10
53 =head2 datearrived
55 data_type: 'datetime'
56 datetime_undef_if_invalid: 1
57 is_nullable: 1
59 =head2 tobranch
61 data_type: 'varchar'
62 default_value: (empty string)
63 is_foreign_key: 1
64 is_nullable: 0
65 size: 10
67 =head2 comments
69 data_type: 'longtext'
70 is_nullable: 1
72 =head2 reason
74 data_type: 'enum'
75 extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve"]}
76 is_nullable: 1
78 =cut
80 __PACKAGE__->add_columns(
81 "branchtransfer_id",
82 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
83 "itemnumber",
85 data_type => "integer",
86 default_value => 0,
87 is_foreign_key => 1,
88 is_nullable => 0,
90 "datesent",
92 data_type => "datetime",
93 datetime_undef_if_invalid => 1,
94 is_nullable => 1,
96 "frombranch",
98 data_type => "varchar",
99 default_value => "",
100 is_foreign_key => 1,
101 is_nullable => 0,
102 size => 10,
104 "datearrived",
106 data_type => "datetime",
107 datetime_undef_if_invalid => 1,
108 is_nullable => 1,
110 "tobranch",
112 data_type => "varchar",
113 default_value => "",
114 is_foreign_key => 1,
115 is_nullable => 0,
116 size => 10,
118 "comments",
119 { data_type => "longtext", is_nullable => 1 },
120 "reason",
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",
136 is_nullable => 1,
140 =head1 PRIMARY KEY
142 =over 4
144 =item * L</branchtransfer_id>
146 =back
148 =cut
150 __PACKAGE__->set_primary_key("branchtransfer_id");
152 =head1 RELATIONS
154 =head2 frombranch
156 Type: belongs_to
158 Related object: L<Koha::Schema::Result::Branch>
160 =cut
162 __PACKAGE__->belongs_to(
163 "frombranch",
164 "Koha::Schema::Result::Branch",
165 { branchcode => "frombranch" },
166 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
169 =head2 itemnumber
171 Type: belongs_to
173 Related object: L<Koha::Schema::Result::Item>
175 =cut
177 __PACKAGE__->belongs_to(
178 "itemnumber",
179 "Koha::Schema::Result::Item",
180 { itemnumber => "itemnumber" },
181 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
184 =head2 tobranch
186 Type: belongs_to
188 Related object: L<Koha::Schema::Result::Branch>
190 =cut
192 __PACKAGE__->belongs_to(
193 "tobranch",
194 "Koha::Schema::Result::Branch",
195 { branchcode => "tobranch" },
196 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
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
203 sub koha_object_class {
204 'Koha::Item::Transfer';
206 sub koha_objects_class {
207 'Koha::Item::Transfers';