|
Line 0
Link Here
|
| 0 |
- |
1 |
use utf8; |
|
|
2 |
package Koha::Schema::Result::DebarmentType; |
| 3 |
|
| 4 |
# Created by DBIx::Class::Schema::Loader |
| 5 |
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
| 6 |
|
| 7 |
=head1 NAME |
| 8 |
|
| 9 |
Koha::Schema::Result::DebarmentType |
| 10 |
|
| 11 |
=cut |
| 12 |
|
| 13 |
use strict; |
| 14 |
use warnings; |
| 15 |
|
| 16 |
use base 'DBIx::Class::Core'; |
| 17 |
|
| 18 |
=head1 TABLE: C<debarment_types> |
| 19 |
|
| 20 |
=cut |
| 21 |
|
| 22 |
__PACKAGE__->table("debarment_types"); |
| 23 |
|
| 24 |
=head1 ACCESSORS |
| 25 |
|
| 26 |
=head2 code |
| 27 |
|
| 28 |
data_type: 'varchar' |
| 29 |
is_nullable: 0 |
| 30 |
size: 50 |
| 31 |
|
| 32 |
=head2 display_text |
| 33 |
|
| 34 |
data_type: 'text' |
| 35 |
is_nullable: 0 |
| 36 |
|
| 37 |
=head2 is_system |
| 38 |
|
| 39 |
data_type: 'tinyint' |
| 40 |
default_value: 0 |
| 41 |
is_nullable: 0 |
| 42 |
|
| 43 |
=head2 default_value |
| 44 |
|
| 45 |
data_type: 'tinyint' |
| 46 |
default_value: 0 |
| 47 |
is_nullable: 0 |
| 48 |
|
| 49 |
=head2 can_be_added_manually |
| 50 |
|
| 51 |
data_type: 'tinyint' |
| 52 |
default_value: 0 |
| 53 |
is_nullable: 0 |
| 54 |
|
| 55 |
=cut |
| 56 |
|
| 57 |
__PACKAGE__->add_columns( |
| 58 |
"code", |
| 59 |
{ data_type => "varchar", is_nullable => 0, size => 50 }, |
| 60 |
"display_text", |
| 61 |
{ data_type => "text", is_nullable => 0 }, |
| 62 |
"is_system", |
| 63 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 64 |
"default_value", |
| 65 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 66 |
"can_be_added_manually", |
| 67 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 68 |
); |
| 69 |
|
| 70 |
=head1 PRIMARY KEY |
| 71 |
|
| 72 |
=over 4 |
| 73 |
|
| 74 |
=item * L</code> |
| 75 |
|
| 76 |
=back |
| 77 |
|
| 78 |
=cut |
| 79 |
|
| 80 |
__PACKAGE__->set_primary_key("code"); |
| 81 |
|
| 82 |
=head1 RELATIONS |
| 83 |
|
| 84 |
=head2 borrower_debarments |
| 85 |
|
| 86 |
Type: has_many |
| 87 |
|
| 88 |
Related object: L<Koha::Schema::Result::BorrowerDebarment> |
| 89 |
|
| 90 |
=cut |
| 91 |
|
| 92 |
__PACKAGE__->has_many( |
| 93 |
"borrower_debarments", |
| 94 |
"Koha::Schema::Result::BorrowerDebarment", |
| 95 |
{ "foreign.type" => "self.code" }, |
| 96 |
{ cascade_copy => 0, cascade_delete => 0 }, |
| 97 |
); |
| 98 |
|
| 99 |
|
| 100 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-03 12:20:02 |
| 101 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VBzvGmNZebCYqcjaR7ETPg |
| 102 |
|
| 103 |
sub koha_object_class { |
| 104 |
'Koha::RestrictionType'; |
| 105 |
} |
| 106 |
sub koha_objects_class { |
| 107 |
'Koha::RestrictionTypes'; |
| 108 |
} |
| 109 |
|
| 110 |
1; |