Bug 23152: Implement koha_object[s]_class when needed
[koha-equinox.git] / Koha / Schema / Result / Aqbookseller.pm
index af2d97d..f0b79fa 100644 (file)
@@ -1,17 +1,21 @@
+use utf8;
 package Koha::Schema::Result::Aqbookseller;
 
 # Created by DBIx::Class::Schema::Loader
 # DO NOT MODIFY THE FIRST PART OF THIS FILE
 
+=head1 NAME
+
+Koha::Schema::Result::Aqbookseller
+
+=cut
+
 use strict;
 use warnings;
 
 use base 'DBIx::Class::Core';
 
-
-=head1 NAME
-
-Koha::Schema::Result::Aqbookseller
+=head1 TABLE: C<aqbooksellers>
 
 =cut
 
@@ -27,27 +31,27 @@ __PACKAGE__->table("aqbooksellers");
 
 =head2 name
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 0
 
 =head2 address1
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 address2
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 address3
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 address4
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 phone
@@ -58,12 +62,12 @@ __PACKAGE__->table("aqbooksellers");
 
 =head2 accountnumber
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 othersupplier
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 currency
@@ -71,37 +75,31 @@ __PACKAGE__->table("aqbooksellers");
   data_type: 'varchar'
   default_value: (empty string)
   is_nullable: 0
-  size: 3
+  size: 10
 
 =head2 booksellerfax
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 notes
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 bookselleremail
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 booksellerurl
 
-  data_type: 'mediumtext'
-  is_nullable: 1
-
-=head2 contact
-
-  data_type: 'varchar'
+  data_type: 'longtext'
   is_nullable: 1
-  size: 100
 
 =head2 postal
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 url
@@ -110,41 +108,6 @@ __PACKAGE__->table("aqbooksellers");
   is_nullable: 1
   size: 255
 
-=head2 contpos
-
-  data_type: 'varchar'
-  is_nullable: 1
-  size: 100
-
-=head2 contphone
-
-  data_type: 'varchar'
-  is_nullable: 1
-  size: 100
-
-=head2 contfax
-
-  data_type: 'varchar'
-  is_nullable: 1
-  size: 100
-
-=head2 contaltphone
-
-  data_type: 'varchar'
-  is_nullable: 1
-  size: 100
-
-=head2 contemail
-
-  data_type: 'varchar'
-  is_nullable: 1
-  size: 100
-
-=head2 contnotes
-
-  data_type: 'mediumtext'
-  is_nullable: 1
-
 =head2 active
 
   data_type: 'tinyint'
@@ -179,7 +142,7 @@ __PACKAGE__->table("aqbooksellers");
   data_type: 'tinyint'
   is_nullable: 1
 
-=head2 gstrate
+=head2 tax_rate
 
   data_type: 'decimal'
   is_nullable: 1
@@ -208,49 +171,35 @@ __PACKAGE__->add_columns(
   "id",
   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
   "name",
-  { data_type => "mediumtext", is_nullable => 0 },
+  { data_type => "longtext", is_nullable => 0 },
   "address1",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "address2",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "address3",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "address4",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "phone",
   { data_type => "varchar", is_nullable => 1, size => 30 },
   "accountnumber",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "othersupplier",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "currency",
-  { data_type => "varchar", default_value => "", is_nullable => 0, size => 3 },
+  { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
   "booksellerfax",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "notes",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "bookselleremail",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "booksellerurl",
-  { data_type => "mediumtext", is_nullable => 1 },
-  "contact",
-  { data_type => "varchar", is_nullable => 1, size => 100 },
+  { data_type => "longtext", is_nullable => 1 },
   "postal",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "url",
   { data_type => "varchar", is_nullable => 1, size => 255 },
-  "contpos",
-  { data_type => "varchar", is_nullable => 1, size => 100 },
-  "contphone",
-  { data_type => "varchar", is_nullable => 1, size => 100 },
-  "contfax",
-  { data_type => "varchar", is_nullable => 1, size => 100 },
-  "contaltphone",
-  { data_type => "varchar", is_nullable => 1, size => 100 },
-  "contemail",
-  { data_type => "varchar", is_nullable => 1, size => 100 },
-  "contnotes",
-  { data_type => "mediumtext", is_nullable => 1 },
   "active",
   { data_type => "tinyint", is_nullable => 1 },
   "listprice",
@@ -263,7 +212,7 @@ __PACKAGE__->add_columns(
   { data_type => "tinyint", is_nullable => 1 },
   "invoiceincgst",
   { data_type => "tinyint", is_nullable => 1 },
-  "gstrate",
+  "tax_rate",
   { data_type => "decimal", is_nullable => 1, size => [6, 4] },
   "discount",
   { data_type => "float", is_nullable => 1, size => [6, 4] },
@@ -272,10 +221,36 @@ __PACKAGE__->add_columns(
   "deliverytime",
   { data_type => "integer", is_nullable => 1 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</id>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("id");
 
 =head1 RELATIONS
 
+=head2 aqbasketgroups
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Aqbasketgroup>
+
+=cut
+
+__PACKAGE__->has_many(
+  "aqbasketgroups",
+  "Koha::Schema::Result::Aqbasketgroup",
+  { "foreign.booksellerid" => "self.id" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
 =head2 aqbaskets
 
 Type: has_many
@@ -291,34 +266,64 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
-=head2 aqbasketgroups
+=head2 aqcontacts
 
 Type: has_many
 
-Related object: L<Koha::Schema::Result::Aqbasketgroup>
+Related object: L<Koha::Schema::Result::Aqcontact>
 
 =cut
 
 __PACKAGE__->has_many(
-  "aqbasketgroups",
-  "Koha::Schema::Result::Aqbasketgroup",
+  "aqcontacts",
+  "Koha::Schema::Result::Aqcontact",
   { "foreign.booksellerid" => "self.id" },
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
-=head2 listprice
+=head2 aqcontracts
 
-Type: belongs_to
+Type: has_many
 
-Related object: L<Koha::Schema::Result::Currency>
+Related object: L<Koha::Schema::Result::Aqcontract>
 
 =cut
 
-__PACKAGE__->belongs_to(
-  "listprice",
-  "Koha::Schema::Result::Currency",
-  { currency => "listprice" },
-  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
+__PACKAGE__->has_many(
+  "aqcontracts",
+  "Koha::Schema::Result::Aqcontract",
+  { "foreign.booksellerid" => "self.id" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 aqinvoices
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Aqinvoice>
+
+=cut
+
+__PACKAGE__->has_many(
+  "aqinvoices",
+  "Koha::Schema::Result::Aqinvoice",
+  { "foreign.booksellerid" => "self.id" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 edifact_messages
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::EdifactMessage>
+
+=cut
+
+__PACKAGE__->has_many(
+  "edifact_messages",
+  "Koha::Schema::Result::EdifactMessage",
+  { "foreign.vendor_id" => "self.id" },
+  { cascade_copy => 0, cascade_delete => 0 },
 );
 
 =head2 invoiceprice
@@ -333,43 +338,65 @@ __PACKAGE__->belongs_to(
   "invoiceprice",
   "Koha::Schema::Result::Currency",
   { currency => "invoiceprice" },
-  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
+  {
+    is_deferrable => 1,
+    join_type     => "LEFT",
+    on_delete     => "CASCADE",
+    on_update     => "CASCADE",
+  },
 );
 
-=head2 aqcontracts
+=head2 listprice
 
-Type: has_many
+Type: belongs_to
 
-Related object: L<Koha::Schema::Result::Aqcontract>
+Related object: L<Koha::Schema::Result::Currency>
 
 =cut
 
-__PACKAGE__->has_many(
-  "aqcontracts",
-  "Koha::Schema::Result::Aqcontract",
-  { "foreign.booksellerid" => "self.id" },
-  { cascade_copy => 0, cascade_delete => 0 },
+__PACKAGE__->belongs_to(
+  "listprice",
+  "Koha::Schema::Result::Currency",
+  { currency => "listprice" },
+  {
+    is_deferrable => 1,
+    join_type     => "LEFT",
+    on_delete     => "CASCADE",
+    on_update     => "CASCADE",
+  },
 );
 
-=head2 aqinvoices
+=head2 vendor_edi_accounts
 
 Type: has_many
 
-Related object: L<Koha::Schema::Result::Aqinvoice>
+Related object: L<Koha::Schema::Result::VendorEdiAccount>
 
 =cut
 
 __PACKAGE__->has_many(
-  "aqinvoices",
-  "Koha::Schema::Result::Aqinvoice",
-  { "foreign.booksellerid" => "self.id" },
+  "vendor_edi_accounts",
+  "Koha::Schema::Result::VendorEdiAccount",
+  { "foreign.vendor_id" => "self.id" },
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Rie+pN0FWfYl8iqGV+svZQ
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DyaF9RbcNAOjPQ1lrxHV3A
+
+__PACKAGE__->add_columns(
+    '+active' => { is_boolean => 1 },
+    '+gstreg' => { is_boolean => 1 },
+    '+listincgst' => { is_boolean => 1 },
+    '+invoiceincgst' => { is_boolean => 1 },
+);
 
+sub koha_object_class {
+    'Koha::Acquisition::Bookseller';
+}
+sub koha_objects_class {
+    'Koha::Acquisition::Booksellers';
+}
 
-# You can replace this text with custom content, and it will be preserved on regeneration
 1;