Bug 19482: DBIC schema changes
[koha.git] / Koha / Schema / Result / Aqbookseller.pm
1 use utf8;
2 package Koha::Schema::Result::Aqbookseller;
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::Aqbookseller
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<aqbooksellers>
19
20 =cut
21
22 __PACKAGE__->table("aqbooksellers");
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 name
33
34   data_type: 'longtext'
35   is_nullable: 0
36
37 =head2 address1
38
39   data_type: 'longtext'
40   is_nullable: 1
41
42 =head2 address2
43
44   data_type: 'longtext'
45   is_nullable: 1
46
47 =head2 address3
48
49   data_type: 'longtext'
50   is_nullable: 1
51
52 =head2 address4
53
54   data_type: 'longtext'
55   is_nullable: 1
56
57 =head2 phone
58
59   data_type: 'varchar'
60   is_nullable: 1
61   size: 30
62
63 =head2 accountnumber
64
65   data_type: 'longtext'
66   is_nullable: 1
67
68 =head2 notes
69
70   data_type: 'longtext'
71   is_nullable: 1
72
73 =head2 postal
74
75   data_type: 'longtext'
76   is_nullable: 1
77
78 =head2 url
79
80   data_type: 'varchar'
81   is_nullable: 1
82   size: 255
83
84 =head2 active
85
86   data_type: 'tinyint'
87   is_nullable: 1
88
89 =head2 listprice
90
91   data_type: 'varchar'
92   is_foreign_key: 1
93   is_nullable: 1
94   size: 10
95
96 =head2 invoiceprice
97
98   data_type: 'varchar'
99   is_foreign_key: 1
100   is_nullable: 1
101   size: 10
102
103 =head2 gstreg
104
105   data_type: 'tinyint'
106   is_nullable: 1
107
108 =head2 listincgst
109
110   data_type: 'tinyint'
111   is_nullable: 1
112
113 =head2 invoiceincgst
114
115   data_type: 'tinyint'
116   is_nullable: 1
117
118 =head2 tax_rate
119
120   data_type: 'decimal'
121   is_nullable: 1
122   size: [6,4]
123
124 =head2 discount
125
126   data_type: 'float'
127   is_nullable: 1
128   size: [6,4]
129
130 =head2 fax
131
132   data_type: 'varchar'
133   is_nullable: 1
134   size: 50
135
136 =head2 deliverytime
137
138   data_type: 'integer'
139   is_nullable: 1
140
141 =cut
142
143 __PACKAGE__->add_columns(
144   "id",
145   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
146   "name",
147   { data_type => "longtext", is_nullable => 0 },
148   "address1",
149   { data_type => "longtext", is_nullable => 1 },
150   "address2",
151   { data_type => "longtext", is_nullable => 1 },
152   "address3",
153   { data_type => "longtext", is_nullable => 1 },
154   "address4",
155   { data_type => "longtext", is_nullable => 1 },
156   "phone",
157   { data_type => "varchar", is_nullable => 1, size => 30 },
158   "accountnumber",
159   { data_type => "longtext", is_nullable => 1 },
160   "notes",
161   { data_type => "longtext", is_nullable => 1 },
162   "postal",
163   { data_type => "longtext", is_nullable => 1 },
164   "url",
165   { data_type => "varchar", is_nullable => 1, size => 255 },
166   "active",
167   { data_type => "tinyint", is_nullable => 1 },
168   "listprice",
169   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
170   "invoiceprice",
171   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
172   "gstreg",
173   { data_type => "tinyint", is_nullable => 1 },
174   "listincgst",
175   { data_type => "tinyint", is_nullable => 1 },
176   "invoiceincgst",
177   { data_type => "tinyint", is_nullable => 1 },
178   "tax_rate",
179   { data_type => "decimal", is_nullable => 1, size => [6, 4] },
180   "discount",
181   { data_type => "float", is_nullable => 1, size => [6, 4] },
182   "fax",
183   { data_type => "varchar", is_nullable => 1, size => 50 },
184   "deliverytime",
185   { data_type => "integer", is_nullable => 1 },
186 );
187
188 =head1 PRIMARY KEY
189
190 =over 4
191
192 =item * L</id>
193
194 =back
195
196 =cut
197
198 __PACKAGE__->set_primary_key("id");
199
200 =head1 RELATIONS
201
202 =head2 aqbasketgroups
203
204 Type: has_many
205
206 Related object: L<Koha::Schema::Result::Aqbasketgroup>
207
208 =cut
209
210 __PACKAGE__->has_many(
211   "aqbasketgroups",
212   "Koha::Schema::Result::Aqbasketgroup",
213   { "foreign.booksellerid" => "self.id" },
214   { cascade_copy => 0, cascade_delete => 0 },
215 );
216
217 =head2 aqbaskets
218
219 Type: has_many
220
221 Related object: L<Koha::Schema::Result::Aqbasket>
222
223 =cut
224
225 __PACKAGE__->has_many(
226   "aqbaskets",
227   "Koha::Schema::Result::Aqbasket",
228   { "foreign.booksellerid" => "self.id" },
229   { cascade_copy => 0, cascade_delete => 0 },
230 );
231
232 =head2 aqcontacts
233
234 Type: has_many
235
236 Related object: L<Koha::Schema::Result::Aqcontact>
237
238 =cut
239
240 __PACKAGE__->has_many(
241   "aqcontacts",
242   "Koha::Schema::Result::Aqcontact",
243   { "foreign.booksellerid" => "self.id" },
244   { cascade_copy => 0, cascade_delete => 0 },
245 );
246
247 =head2 aqcontracts
248
249 Type: has_many
250
251 Related object: L<Koha::Schema::Result::Aqcontract>
252
253 =cut
254
255 __PACKAGE__->has_many(
256   "aqcontracts",
257   "Koha::Schema::Result::Aqcontract",
258   { "foreign.booksellerid" => "self.id" },
259   { cascade_copy => 0, cascade_delete => 0 },
260 );
261
262 =head2 aqinvoices
263
264 Type: has_many
265
266 Related object: L<Koha::Schema::Result::Aqinvoice>
267
268 =cut
269
270 __PACKAGE__->has_many(
271   "aqinvoices",
272   "Koha::Schema::Result::Aqinvoice",
273   { "foreign.booksellerid" => "self.id" },
274   { cascade_copy => 0, cascade_delete => 0 },
275 );
276
277 =head2 edifact_messages
278
279 Type: has_many
280
281 Related object: L<Koha::Schema::Result::EdifactMessage>
282
283 =cut
284
285 __PACKAGE__->has_many(
286   "edifact_messages",
287   "Koha::Schema::Result::EdifactMessage",
288   { "foreign.vendor_id" => "self.id" },
289   { cascade_copy => 0, cascade_delete => 0 },
290 );
291
292 =head2 invoiceprice
293
294 Type: belongs_to
295
296 Related object: L<Koha::Schema::Result::Currency>
297
298 =cut
299
300 __PACKAGE__->belongs_to(
301   "invoiceprice",
302   "Koha::Schema::Result::Currency",
303   { currency => "invoiceprice" },
304   {
305     is_deferrable => 1,
306     join_type     => "LEFT",
307     on_delete     => "CASCADE",
308     on_update     => "CASCADE",
309   },
310 );
311
312 =head2 listprice
313
314 Type: belongs_to
315
316 Related object: L<Koha::Schema::Result::Currency>
317
318 =cut
319
320 __PACKAGE__->belongs_to(
321   "listprice",
322   "Koha::Schema::Result::Currency",
323   { currency => "listprice" },
324   {
325     is_deferrable => 1,
326     join_type     => "LEFT",
327     on_delete     => "CASCADE",
328     on_update     => "CASCADE",
329   },
330 );
331
332 =head2 vendor_edi_accounts
333
334 Type: has_many
335
336 Related object: L<Koha::Schema::Result::VendorEdiAccount>
337
338 =cut
339
340 __PACKAGE__->has_many(
341   "vendor_edi_accounts",
342   "Koha::Schema::Result::VendorEdiAccount",
343   { "foreign.vendor_id" => "self.id" },
344   { cascade_copy => 0, cascade_delete => 0 },
345 );
346
347
348 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-17 08:54:13
349 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1lSFcy25po9EBzkNkjL5UA
350
351 __PACKAGE__->add_columns(
352     '+active' => { is_boolean => 1 },
353     '+gstreg' => { is_boolean => 1 },
354     '+listincgst' => { is_boolean => 1 },
355     '+invoiceincgst' => { is_boolean => 1 },
356 );
357
358 sub koha_object_class {
359     'Koha::Acquisition::Bookseller';
360 }
361 sub koha_objects_class {
362     'Koha::Acquisition::Booksellers';
363 }
364
365 1;