Bug 22521: DBRev 18.12.00.055
[koha.git] / Koha / Schema / Result / VendorEdiAccount.pm
1 use utf8;
2 package Koha::Schema::Result::VendorEdiAccount;
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::VendorEdiAccount
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<vendor_edi_accounts>
19
20 =cut
21
22 __PACKAGE__->table("vendor_edi_accounts");
23
24 =head1 ACCESSORS
25
26 =head2 id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 description
33
34   data_type: 'mediumtext'
35   is_nullable: 0
36
37 =head2 host
38
39   data_type: 'varchar'
40   is_nullable: 1
41   size: 40
42
43 =head2 username
44
45   data_type: 'varchar'
46   is_nullable: 1
47   size: 40
48
49 =head2 password
50
51   data_type: 'varchar'
52   is_nullable: 1
53   size: 40
54
55 =head2 last_activity
56
57   data_type: 'date'
58   datetime_undef_if_invalid: 1
59   is_nullable: 1
60
61 =head2 vendor_id
62
63   data_type: 'integer'
64   is_foreign_key: 1
65   is_nullable: 1
66
67 =head2 download_directory
68
69   data_type: 'mediumtext'
70   is_nullable: 1
71
72 =head2 upload_directory
73
74   data_type: 'mediumtext'
75   is_nullable: 1
76
77 =head2 san
78
79   data_type: 'varchar'
80   is_nullable: 1
81   size: 20
82
83 =head2 id_code_qualifier
84
85   data_type: 'varchar'
86   default_value: 14
87   is_nullable: 1
88   size: 3
89
90 =head2 transport
91
92   data_type: 'varchar'
93   default_value: 'FTP'
94   is_nullable: 1
95   size: 6
96
97 =head2 quotes_enabled
98
99   data_type: 'tinyint'
100   default_value: 0
101   is_nullable: 0
102
103 =head2 invoices_enabled
104
105   data_type: 'tinyint'
106   default_value: 0
107   is_nullable: 0
108
109 =head2 orders_enabled
110
111   data_type: 'tinyint'
112   default_value: 0
113   is_nullable: 0
114
115 =head2 responses_enabled
116
117   data_type: 'tinyint'
118   default_value: 0
119   is_nullable: 0
120
121 =head2 auto_orders
122
123   data_type: 'tinyint'
124   default_value: 0
125   is_nullable: 0
126
127 =head2 shipment_budget
128
129   data_type: 'integer'
130   is_foreign_key: 1
131   is_nullable: 1
132
133 =head2 plugin
134
135   data_type: 'varchar'
136   default_value: (empty string)
137   is_nullable: 0
138   size: 256
139
140 =cut
141
142 __PACKAGE__->add_columns(
143   "id",
144   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
145   "description",
146   { data_type => "mediumtext", is_nullable => 0 },
147   "host",
148   { data_type => "varchar", is_nullable => 1, size => 40 },
149   "username",
150   { data_type => "varchar", is_nullable => 1, size => 40 },
151   "password",
152   { data_type => "varchar", is_nullable => 1, size => 40 },
153   "last_activity",
154   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
155   "vendor_id",
156   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
157   "download_directory",
158   { data_type => "mediumtext", is_nullable => 1 },
159   "upload_directory",
160   { data_type => "mediumtext", is_nullable => 1 },
161   "san",
162   { data_type => "varchar", is_nullable => 1, size => 20 },
163   "id_code_qualifier",
164   { data_type => "varchar", default_value => 14, is_nullable => 1, size => 3 },
165   "transport",
166   { data_type => "varchar", default_value => "FTP", is_nullable => 1, size => 6 },
167   "quotes_enabled",
168   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
169   "invoices_enabled",
170   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
171   "orders_enabled",
172   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
173   "responses_enabled",
174   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
175   "auto_orders",
176   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
177   "shipment_budget",
178   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
179   "plugin",
180   { data_type => "varchar", default_value => "", is_nullable => 0, size => 256 },
181 );
182
183 =head1 PRIMARY KEY
184
185 =over 4
186
187 =item * L</id>
188
189 =back
190
191 =cut
192
193 __PACKAGE__->set_primary_key("id");
194
195 =head1 RELATIONS
196
197 =head2 edifact_messages
198
199 Type: has_many
200
201 Related object: L<Koha::Schema::Result::EdifactMessage>
202
203 =cut
204
205 __PACKAGE__->has_many(
206   "edifact_messages",
207   "Koha::Schema::Result::EdifactMessage",
208   { "foreign.edi_acct" => "self.id" },
209   { cascade_copy => 0, cascade_delete => 0 },
210 );
211
212 =head2 shipment_budget
213
214 Type: belongs_to
215
216 Related object: L<Koha::Schema::Result::Aqbudget>
217
218 =cut
219
220 __PACKAGE__->belongs_to(
221   "shipment_budget",
222   "Koha::Schema::Result::Aqbudget",
223   { budget_id => "shipment_budget" },
224   {
225     is_deferrable => 1,
226     join_type     => "LEFT",
227     on_delete     => "RESTRICT",
228     on_update     => "RESTRICT",
229   },
230 );
231
232 =head2 vendor
233
234 Type: belongs_to
235
236 Related object: L<Koha::Schema::Result::Aqbookseller>
237
238 =cut
239
240 __PACKAGE__->belongs_to(
241   "vendor",
242   "Koha::Schema::Result::Aqbookseller",
243   { id => "vendor_id" },
244   {
245     is_deferrable => 1,
246     join_type     => "LEFT",
247     on_delete     => "RESTRICT",
248     on_update     => "RESTRICT",
249   },
250 );
251
252
253 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54
254 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TtWuTpP4Ac6/+T6OPMSsRA
255
256
257 # You can replace this text with custom code or comments, and it will be preserved on regeneration
258 1;