@@ -, +, @@ --- Koha/Schema/Result/DebarmentType.pm | 110 ++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Koha/Schema/Result/DebarmentType.pm --- a/Koha/Schema/Result/DebarmentType.pm +++ a/Koha/Schema/Result/DebarmentType.pm @@ -0,0 +1,110 @@ +use utf8; +package Koha::Schema::Result::DebarmentType; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::DebarmentType + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("debarment_types"); + +=head1 ACCESSORS + +=head2 code + + data_type: 'varchar' + is_nullable: 0 + size: 50 + +=head2 display_text + + data_type: 'text' + is_nullable: 0 + +=head2 is_system + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +=head2 default_value + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +=head2 can_be_added_manually + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +=cut + +__PACKAGE__->add_columns( + "code", + { data_type => "varchar", is_nullable => 0, size => 50 }, + "display_text", + { data_type => "text", is_nullable => 0 }, + "is_system", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "default_value", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "can_be_added_manually", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("code"); + +=head1 RELATIONS + +=head2 borrower_debarments + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "borrower_debarments", + "Koha::Schema::Result::BorrowerDebarment", + { "foreign.type" => "self.code" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-03 12:20:02 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VBzvGmNZebCYqcjaR7ETPg + +sub koha_object_class { + 'Koha::RestrictionType'; +} +sub koha_objects_class { + 'Koha::RestrictionTypes'; +} + +1; --