Bug 14187 - DBRev 16.12.00.002
[koha.git] / Koha / Schema / Result / Branchtransfer.pm
blob9c5b76b9598496cf328a2c961bcfd76f78be6f12
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: 'mediumtext'
70 is_nullable: 1
72 =cut
74 __PACKAGE__->add_columns(
75 "branchtransfer_id",
76 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
77 "itemnumber",
79 data_type => "integer",
80 default_value => 0,
81 is_foreign_key => 1,
82 is_nullable => 0,
84 "datesent",
86 data_type => "datetime",
87 datetime_undef_if_invalid => 1,
88 is_nullable => 1,
90 "frombranch",
92 data_type => "varchar",
93 default_value => "",
94 is_foreign_key => 1,
95 is_nullable => 0,
96 size => 10,
98 "datearrived",
100 data_type => "datetime",
101 datetime_undef_if_invalid => 1,
102 is_nullable => 1,
104 "tobranch",
106 data_type => "varchar",
107 default_value => "",
108 is_foreign_key => 1,
109 is_nullable => 0,
110 size => 10,
112 "comments",
113 { data_type => "mediumtext", is_nullable => 1 },
116 =head1 PRIMARY KEY
118 =over 4
120 =item * L</branchtransfer_id>
122 =back
124 =cut
126 __PACKAGE__->set_primary_key("branchtransfer_id");
128 =head1 RELATIONS
130 =head2 frombranch
132 Type: belongs_to
134 Related object: L<Koha::Schema::Result::Branch>
136 =cut
138 __PACKAGE__->belongs_to(
139 "frombranch",
140 "Koha::Schema::Result::Branch",
141 { branchcode => "frombranch" },
142 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
145 =head2 itemnumber
147 Type: belongs_to
149 Related object: L<Koha::Schema::Result::Item>
151 =cut
153 __PACKAGE__->belongs_to(
154 "itemnumber",
155 "Koha::Schema::Result::Item",
156 { itemnumber => "itemnumber" },
157 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
160 =head2 tobranch
162 Type: belongs_to
164 Related object: L<Koha::Schema::Result::Branch>
166 =cut
168 __PACKAGE__->belongs_to(
169 "tobranch",
170 "Koha::Schema::Result::Branch",
171 { branchcode => "tobranch" },
172 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
176 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-01-13 12:22:24
177 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8cnatLrGkNwyTo35PCOm2A
180 # You can replace this text with custom content, and it will be preserved on regeneration