Bug 20434: Update UNIMARC framework - auth (SAUTTIT)
[koha.git] / Koha / Schema / Result / Aqbookseller.pm
blobf0b79fa33ae41d7184b5c595189df32b49912b5e
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 othersupplier
70 data_type: 'longtext'
71 is_nullable: 1
73 =head2 currency
75 data_type: 'varchar'
76 default_value: (empty string)
77 is_nullable: 0
78 size: 10
80 =head2 booksellerfax
82 data_type: 'longtext'
83 is_nullable: 1
85 =head2 notes
87 data_type: 'longtext'
88 is_nullable: 1
90 =head2 bookselleremail
92 data_type: 'longtext'
93 is_nullable: 1
95 =head2 booksellerurl
97 data_type: 'longtext'
98 is_nullable: 1
100 =head2 postal
102 data_type: 'longtext'
103 is_nullable: 1
105 =head2 url
107 data_type: 'varchar'
108 is_nullable: 1
109 size: 255
111 =head2 active
113 data_type: 'tinyint'
114 is_nullable: 1
116 =head2 listprice
118 data_type: 'varchar'
119 is_foreign_key: 1
120 is_nullable: 1
121 size: 10
123 =head2 invoiceprice
125 data_type: 'varchar'
126 is_foreign_key: 1
127 is_nullable: 1
128 size: 10
130 =head2 gstreg
132 data_type: 'tinyint'
133 is_nullable: 1
135 =head2 listincgst
137 data_type: 'tinyint'
138 is_nullable: 1
140 =head2 invoiceincgst
142 data_type: 'tinyint'
143 is_nullable: 1
145 =head2 tax_rate
147 data_type: 'decimal'
148 is_nullable: 1
149 size: [6,4]
151 =head2 discount
153 data_type: 'float'
154 is_nullable: 1
155 size: [6,4]
157 =head2 fax
159 data_type: 'varchar'
160 is_nullable: 1
161 size: 50
163 =head2 deliverytime
165 data_type: 'integer'
166 is_nullable: 1
168 =cut
170 __PACKAGE__->add_columns(
171 "id",
172 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
173 "name",
174 { data_type => "longtext", is_nullable => 0 },
175 "address1",
176 { data_type => "longtext", is_nullable => 1 },
177 "address2",
178 { data_type => "longtext", is_nullable => 1 },
179 "address3",
180 { data_type => "longtext", is_nullable => 1 },
181 "address4",
182 { data_type => "longtext", is_nullable => 1 },
183 "phone",
184 { data_type => "varchar", is_nullable => 1, size => 30 },
185 "accountnumber",
186 { data_type => "longtext", is_nullable => 1 },
187 "othersupplier",
188 { data_type => "longtext", is_nullable => 1 },
189 "currency",
190 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
191 "booksellerfax",
192 { data_type => "longtext", is_nullable => 1 },
193 "notes",
194 { data_type => "longtext", is_nullable => 1 },
195 "bookselleremail",
196 { data_type => "longtext", is_nullable => 1 },
197 "booksellerurl",
198 { data_type => "longtext", is_nullable => 1 },
199 "postal",
200 { data_type => "longtext", is_nullable => 1 },
201 "url",
202 { data_type => "varchar", is_nullable => 1, size => 255 },
203 "active",
204 { data_type => "tinyint", is_nullable => 1 },
205 "listprice",
206 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
207 "invoiceprice",
208 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
209 "gstreg",
210 { data_type => "tinyint", is_nullable => 1 },
211 "listincgst",
212 { data_type => "tinyint", is_nullable => 1 },
213 "invoiceincgst",
214 { data_type => "tinyint", is_nullable => 1 },
215 "tax_rate",
216 { data_type => "decimal", is_nullable => 1, size => [6, 4] },
217 "discount",
218 { data_type => "float", is_nullable => 1, size => [6, 4] },
219 "fax",
220 { data_type => "varchar", is_nullable => 1, size => 50 },
221 "deliverytime",
222 { data_type => "integer", is_nullable => 1 },
225 =head1 PRIMARY KEY
227 =over 4
229 =item * L</id>
231 =back
233 =cut
235 __PACKAGE__->set_primary_key("id");
237 =head1 RELATIONS
239 =head2 aqbasketgroups
241 Type: has_many
243 Related object: L<Koha::Schema::Result::Aqbasketgroup>
245 =cut
247 __PACKAGE__->has_many(
248 "aqbasketgroups",
249 "Koha::Schema::Result::Aqbasketgroup",
250 { "foreign.booksellerid" => "self.id" },
251 { cascade_copy => 0, cascade_delete => 0 },
254 =head2 aqbaskets
256 Type: has_many
258 Related object: L<Koha::Schema::Result::Aqbasket>
260 =cut
262 __PACKAGE__->has_many(
263 "aqbaskets",
264 "Koha::Schema::Result::Aqbasket",
265 { "foreign.booksellerid" => "self.id" },
266 { cascade_copy => 0, cascade_delete => 0 },
269 =head2 aqcontacts
271 Type: has_many
273 Related object: L<Koha::Schema::Result::Aqcontact>
275 =cut
277 __PACKAGE__->has_many(
278 "aqcontacts",
279 "Koha::Schema::Result::Aqcontact",
280 { "foreign.booksellerid" => "self.id" },
281 { cascade_copy => 0, cascade_delete => 0 },
284 =head2 aqcontracts
286 Type: has_many
288 Related object: L<Koha::Schema::Result::Aqcontract>
290 =cut
292 __PACKAGE__->has_many(
293 "aqcontracts",
294 "Koha::Schema::Result::Aqcontract",
295 { "foreign.booksellerid" => "self.id" },
296 { cascade_copy => 0, cascade_delete => 0 },
299 =head2 aqinvoices
301 Type: has_many
303 Related object: L<Koha::Schema::Result::Aqinvoice>
305 =cut
307 __PACKAGE__->has_many(
308 "aqinvoices",
309 "Koha::Schema::Result::Aqinvoice",
310 { "foreign.booksellerid" => "self.id" },
311 { cascade_copy => 0, cascade_delete => 0 },
314 =head2 edifact_messages
316 Type: has_many
318 Related object: L<Koha::Schema::Result::EdifactMessage>
320 =cut
322 __PACKAGE__->has_many(
323 "edifact_messages",
324 "Koha::Schema::Result::EdifactMessage",
325 { "foreign.vendor_id" => "self.id" },
326 { cascade_copy => 0, cascade_delete => 0 },
329 =head2 invoiceprice
331 Type: belongs_to
333 Related object: L<Koha::Schema::Result::Currency>
335 =cut
337 __PACKAGE__->belongs_to(
338 "invoiceprice",
339 "Koha::Schema::Result::Currency",
340 { currency => "invoiceprice" },
342 is_deferrable => 1,
343 join_type => "LEFT",
344 on_delete => "CASCADE",
345 on_update => "CASCADE",
349 =head2 listprice
351 Type: belongs_to
353 Related object: L<Koha::Schema::Result::Currency>
355 =cut
357 __PACKAGE__->belongs_to(
358 "listprice",
359 "Koha::Schema::Result::Currency",
360 { currency => "listprice" },
362 is_deferrable => 1,
363 join_type => "LEFT",
364 on_delete => "CASCADE",
365 on_update => "CASCADE",
369 =head2 vendor_edi_accounts
371 Type: has_many
373 Related object: L<Koha::Schema::Result::VendorEdiAccount>
375 =cut
377 __PACKAGE__->has_many(
378 "vendor_edi_accounts",
379 "Koha::Schema::Result::VendorEdiAccount",
380 { "foreign.vendor_id" => "self.id" },
381 { cascade_copy => 0, cascade_delete => 0 },
385 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
386 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DyaF9RbcNAOjPQ1lrxHV3A
388 __PACKAGE__->add_columns(
389 '+active' => { is_boolean => 1 },
390 '+gstreg' => { is_boolean => 1 },
391 '+listincgst' => { is_boolean => 1 },
392 '+invoiceincgst' => { is_boolean => 1 },
395 sub koha_object_class {
396 'Koha::Acquisition::Bookseller';
398 sub koha_objects_class {
399 'Koha::Acquisition::Booksellers';