Bug 26922: Regression tests
[koha.git] / Koha / Schema / Result / Aqbookseller.pm
bloba9bf2e51bddac1e1f94b3945a00cb39373e0a7ed
1 use utf8;
2 package Koha::Schema::Result::Aqbookseller;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Aqbookseller
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<aqbooksellers>
20 =cut
22 __PACKAGE__->table("aqbooksellers");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 name
34 data_type: 'longtext'
35 is_nullable: 0
37 =head2 address1
39 data_type: 'longtext'
40 is_nullable: 1
42 =head2 address2
44 data_type: 'longtext'
45 is_nullable: 1
47 =head2 address3
49 data_type: 'longtext'
50 is_nullable: 1
52 =head2 address4
54 data_type: 'longtext'
55 is_nullable: 1
57 =head2 phone
59 data_type: 'varchar'
60 is_nullable: 1
61 size: 30
63 =head2 accountnumber
65 data_type: 'longtext'
66 is_nullable: 1
68 =head2 notes
70 data_type: 'longtext'
71 is_nullable: 1
73 =head2 postal
75 data_type: 'longtext'
76 is_nullable: 1
78 =head2 url
80 data_type: 'varchar'
81 is_nullable: 1
82 size: 255
84 =head2 active
86 data_type: 'tinyint'
87 is_nullable: 1
89 =head2 listprice
91 data_type: 'varchar'
92 is_foreign_key: 1
93 is_nullable: 1
94 size: 10
96 =head2 invoiceprice
98 data_type: 'varchar'
99 is_foreign_key: 1
100 is_nullable: 1
101 size: 10
103 =head2 gstreg
105 data_type: 'tinyint'
106 is_nullable: 1
108 =head2 listincgst
110 data_type: 'tinyint'
111 is_nullable: 1
113 =head2 invoiceincgst
115 data_type: 'tinyint'
116 is_nullable: 1
118 =head2 tax_rate
120 data_type: 'decimal'
121 is_nullable: 1
122 size: [6,4]
124 =head2 discount
126 data_type: 'float'
127 is_nullable: 1
128 size: [6,4]
130 =head2 fax
132 data_type: 'varchar'
133 is_nullable: 1
134 size: 50
136 =head2 deliverytime
138 data_type: 'integer'
139 is_nullable: 1
141 =cut
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 },
188 =head1 PRIMARY KEY
190 =over 4
192 =item * L</id>
194 =back
196 =cut
198 __PACKAGE__->set_primary_key("id");
200 =head1 RELATIONS
202 =head2 aqbasketgroups
204 Type: has_many
206 Related object: L<Koha::Schema::Result::Aqbasketgroup>
208 =cut
210 __PACKAGE__->has_many(
211 "aqbasketgroups",
212 "Koha::Schema::Result::Aqbasketgroup",
213 { "foreign.booksellerid" => "self.id" },
214 { cascade_copy => 0, cascade_delete => 0 },
217 =head2 aqbaskets
219 Type: has_many
221 Related object: L<Koha::Schema::Result::Aqbasket>
223 =cut
225 __PACKAGE__->has_many(
226 "aqbaskets",
227 "Koha::Schema::Result::Aqbasket",
228 { "foreign.booksellerid" => "self.id" },
229 { cascade_copy => 0, cascade_delete => 0 },
232 =head2 aqcontacts
234 Type: has_many
236 Related object: L<Koha::Schema::Result::Aqcontact>
238 =cut
240 __PACKAGE__->has_many(
241 "aqcontacts",
242 "Koha::Schema::Result::Aqcontact",
243 { "foreign.booksellerid" => "self.id" },
244 { cascade_copy => 0, cascade_delete => 0 },
247 =head2 aqcontracts
249 Type: has_many
251 Related object: L<Koha::Schema::Result::Aqcontract>
253 =cut
255 __PACKAGE__->has_many(
256 "aqcontracts",
257 "Koha::Schema::Result::Aqcontract",
258 { "foreign.booksellerid" => "self.id" },
259 { cascade_copy => 0, cascade_delete => 0 },
262 =head2 aqinvoices
264 Type: has_many
266 Related object: L<Koha::Schema::Result::Aqinvoice>
268 =cut
270 __PACKAGE__->has_many(
271 "aqinvoices",
272 "Koha::Schema::Result::Aqinvoice",
273 { "foreign.booksellerid" => "self.id" },
274 { cascade_copy => 0, cascade_delete => 0 },
277 =head2 edifact_messages
279 Type: has_many
281 Related object: L<Koha::Schema::Result::EdifactMessage>
283 =cut
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 },
292 =head2 invoiceprice
294 Type: belongs_to
296 Related object: L<Koha::Schema::Result::Currency>
298 =cut
300 __PACKAGE__->belongs_to(
301 "invoiceprice",
302 "Koha::Schema::Result::Currency",
303 { currency => "invoiceprice" },
305 is_deferrable => 1,
306 join_type => "LEFT",
307 on_delete => "CASCADE",
308 on_update => "CASCADE",
312 =head2 listprice
314 Type: belongs_to
316 Related object: L<Koha::Schema::Result::Currency>
318 =cut
320 __PACKAGE__->belongs_to(
321 "listprice",
322 "Koha::Schema::Result::Currency",
323 { currency => "listprice" },
325 is_deferrable => 1,
326 join_type => "LEFT",
327 on_delete => "CASCADE",
328 on_update => "CASCADE",
332 =head2 vendor_edi_accounts
334 Type: has_many
336 Related object: L<Koha::Schema::Result::VendorEdiAccount>
338 =cut
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 },
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
351 __PACKAGE__->add_columns(
352 '+active' => { is_boolean => 1 },
353 '+gstreg' => { is_boolean => 1 },
354 '+listincgst' => { is_boolean => 1 },
355 '+invoiceincgst' => { is_boolean => 1 },
358 sub koha_object_class {
359 'Koha::Acquisition::Bookseller';
361 sub koha_objects_class {
362 'Koha::Acquisition::Booksellers';