Bug 23681: Move to ::Patron::Restriction::Type(s)
[koha.git] / Koha / Schema / Result / RestrictionType.pm
1 use utf8;
2 package Koha::Schema::Result::RestrictionType;
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::RestrictionType
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<restriction_types>
19
20 =cut
21
22 __PACKAGE__->table("restriction_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 is_default
44
45   data_type: 'tinyint'
46   default_value: 0
47   is_nullable: 0
48
49 =cut
50
51 __PACKAGE__->add_columns(
52   "code",
53   { data_type => "varchar", is_nullable => 0, size => 50 },
54   "display_text",
55   { data_type => "text", is_nullable => 0 },
56   "is_system",
57   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
58   "is_default",
59   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
60 );
61
62 =head1 PRIMARY KEY
63
64 =over 4
65
66 =item * L</code>
67
68 =back
69
70 =cut
71
72 __PACKAGE__->set_primary_key("code");
73
74 =head1 RELATIONS
75
76 =head2 borrower_debarments
77
78 Type: has_many
79
80 Related object: L<Koha::Schema::Result::BorrowerDebarment>
81
82 =cut
83
84 __PACKAGE__->has_many(
85   "borrower_debarments",
86   "Koha::Schema::Result::BorrowerDebarment",
87   { "foreign.type" => "self.code" },
88   { cascade_copy => 0, cascade_delete => 0 },
89 );
90
91
92 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-08-19 17:53:05
93 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CC8yZ6IqZPnySpMC5Mn/ig
94
95 __PACKAGE__->add_columns(
96     '+is_system'  => { is_boolean => 1 },
97     '+is_default' => { is_boolean => 1 }
98 );
99
100 sub koha_object_class {
101     'Koha::Patron::Restriction::Type';
102 }
103 sub koha_objects_class {
104     'Koha::Patron::Restriction::Types';
105 }
106
107 1;