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