From d1ac9f756c7493c75cedfc2449ce38965a65a2d6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 1 Mar 2023 15:18:29 +0100 Subject: [PATCH] Bug 33104: DBIC changes Signed-off-by: Jonathan Field --- Koha/Schema/Result/Aqbookseller.pm | 19 ++- Koha/Schema/Result/AqbooksellerInterface.pm | 152 ++++++++++++++++++++ 2 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 Koha/Schema/Result/AqbooksellerInterface.pm diff --git a/Koha/Schema/Result/Aqbookseller.pm b/Koha/Schema/Result/Aqbookseller.pm index c53b93573d..50b4b3565e 100644 --- a/Koha/Schema/Result/Aqbookseller.pm +++ b/Koha/Schema/Result/Aqbookseller.pm @@ -304,6 +304,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 aqbookseller_interfaces + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "aqbookseller_interfaces", + "Koha::Schema::Result::AqbooksellerInterface", + { "foreign.vendor_id" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 aqcontacts Type: has_many @@ -480,8 +495,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-01 10:07:31 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YBiWEJqaEoEzap60SDok+A +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-01 14:17:22 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Gw03aSuVNugEsO2ANlrGuQ __PACKAGE__->add_columns( '+active' => { is_boolean => 1 }, diff --git a/Koha/Schema/Result/AqbooksellerInterface.pm b/Koha/Schema/Result/AqbooksellerInterface.pm new file mode 100644 index 0000000000..6d9496ef13 --- /dev/null +++ b/Koha/Schema/Result/AqbooksellerInterface.pm @@ -0,0 +1,152 @@ +use utf8; +package Koha::Schema::Result::AqbooksellerInterface; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::AqbooksellerInterface + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("aqbookseller_interfaces"); + +=head1 ACCESSORS + +=head2 id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + +primary key and unique identifier assigned by Koha + +=head2 vendor_id + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 0 + +link to the vendor + +=head2 type + + data_type: 'varchar' + is_nullable: 1 + size: 80 + +type of the interface, authorised value VENDOR_INTERFACE_TYPE + +=head2 name + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +name of the interface + +=head2 uri + + data_type: 'mediumtext' + is_nullable: 1 + +uri of the interface + +=head2 login + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +login + +=head2 password + + data_type: 'mediumtext' + is_nullable: 1 + +hashed password + +=head2 account_email + + data_type: 'mediumtext' + is_nullable: 1 + +account email + +=head2 notes + + data_type: 'longtext' + is_nullable: 1 + +notes + +=cut + +__PACKAGE__->add_columns( + "id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "vendor_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, + "type", + { data_type => "varchar", is_nullable => 1, size => 80 }, + "name", + { data_type => "varchar", is_nullable => 0, size => 255 }, + "uri", + { data_type => "mediumtext", is_nullable => 1 }, + "login", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "password", + { data_type => "mediumtext", is_nullable => 1 }, + "account_email", + { data_type => "mediumtext", is_nullable => 1 }, + "notes", + { data_type => "longtext", is_nullable => 1 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("id"); + +=head1 RELATIONS + +=head2 vendor + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "vendor", + "Koha::Schema::Result::Aqbookseller", + { id => "vendor_id" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-02 14:22:08 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:x1agzLqSW4QKvQq5CHKkjQ + + +# You can replace this text with custom code or comments, and it will be preserved on regeneration +1; -- 2.30.2