7410108d980c60bb11e197519f08d2cdd2b2e2ee
[koha-equinox.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 =cut
73
74 __PACKAGE__->add_columns(
75   "branchtransfer_id",
76   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
77   "itemnumber",
78   {
79     data_type      => "integer",
80     default_value  => 0,
81     is_foreign_key => 1,
82     is_nullable    => 0,
83   },
84   "datesent",
85   {
86     data_type => "datetime",
87     datetime_undef_if_invalid => 1,
88     is_nullable => 1,
89   },
90   "frombranch",
91   {
92     data_type => "varchar",
93     default_value => "",
94     is_foreign_key => 1,
95     is_nullable => 0,
96     size => 10,
97   },
98   "datearrived",
99   {
100     data_type => "datetime",
101     datetime_undef_if_invalid => 1,
102     is_nullable => 1,
103   },
104   "tobranch",
105   {
106     data_type => "varchar",
107     default_value => "",
108     is_foreign_key => 1,
109     is_nullable => 0,
110     size => 10,
111   },
112   "comments",
113   { data_type => "longtext", is_nullable => 1 },
114 );
115
116 =head1 PRIMARY KEY
117
118 =over 4
119
120 =item * L</branchtransfer_id>
121
122 =back
123
124 =cut
125
126 __PACKAGE__->set_primary_key("branchtransfer_id");
127
128 =head1 RELATIONS
129
130 =head2 frombranch
131
132 Type: belongs_to
133
134 Related object: L<Koha::Schema::Result::Branch>
135
136 =cut
137
138 __PACKAGE__->belongs_to(
139   "frombranch",
140   "Koha::Schema::Result::Branch",
141   { branchcode => "frombranch" },
142   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
143 );
144
145 =head2 itemnumber
146
147 Type: belongs_to
148
149 Related object: L<Koha::Schema::Result::Item>
150
151 =cut
152
153 __PACKAGE__->belongs_to(
154   "itemnumber",
155   "Koha::Schema::Result::Item",
156   { itemnumber => "itemnumber" },
157   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
158 );
159
160 =head2 tobranch
161
162 Type: belongs_to
163
164 Related object: L<Koha::Schema::Result::Branch>
165
166 =cut
167
168 __PACKAGE__->belongs_to(
169   "tobranch",
170   "Koha::Schema::Result::Branch",
171   { branchcode => "tobranch" },
172   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
173 );
174
175
176 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
177 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uPQzv0lMxfnu75SzS6UpVQ
178
179
180 # You can replace this text with custom content, and it will be preserved on regeneration
181 1;