Bug 22417: DBIX Schema changes
[koha.git] / Koha / Schema / Result / BorrowerAttributeType.pm
1 use utf8;
2 package Koha::Schema::Result::BorrowerAttributeType;
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::BorrowerAttributeType
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<borrower_attribute_types>
19
20 =cut
21
22 __PACKAGE__->table("borrower_attribute_types");
23
24 =head1 ACCESSORS
25
26 =head2 code
27
28   data_type: 'varchar'
29   is_nullable: 0
30   size: 10
31
32 =head2 description
33
34   data_type: 'varchar'
35   is_nullable: 0
36   size: 255
37
38 =head2 repeatable
39
40   data_type: 'tinyint'
41   default_value: 0
42   is_nullable: 0
43
44 =head2 unique_id
45
46   data_type: 'tinyint'
47   default_value: 0
48   is_nullable: 0
49
50 =head2 opac_display
51
52   data_type: 'tinyint'
53   default_value: 0
54   is_nullable: 0
55
56 =head2 opac_editable
57
58   data_type: 'tinyint'
59   default_value: 0
60   is_nullable: 0
61
62 =head2 staff_searchable
63
64   data_type: 'tinyint'
65   default_value: 0
66   is_nullable: 0
67
68 =head2 authorised_value_category
69
70   data_type: 'varchar'
71   is_nullable: 1
72   size: 32
73
74 =head2 display_checkout
75
76   data_type: 'tinyint'
77   default_value: 0
78   is_nullable: 0
79
80 =head2 category_code
81
82   data_type: 'varchar'
83   is_nullable: 1
84   size: 10
85
86 =head2 class
87
88   data_type: 'varchar'
89   default_value: (empty string)
90   is_nullable: 0
91   size: 255
92
93 =head2 keep_for_pseudonymization
94
95   data_type: 'tinyint'
96   default_value: 0
97   is_nullable: 0
98
99 =head2 mandatory
100
101   data_type: 'tinyint'
102   default_value: 0
103   is_nullable: 0
104
105 =cut
106
107 __PACKAGE__->add_columns(
108   "code",
109   { data_type => "varchar", is_nullable => 0, size => 10 },
110   "description",
111   { data_type => "varchar", is_nullable => 0, size => 255 },
112   "repeatable",
113   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
114   "unique_id",
115   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
116   "opac_display",
117   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
118   "opac_editable",
119   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
120   "staff_searchable",
121   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
122   "authorised_value_category",
123   { data_type => "varchar", is_nullable => 1, size => 32 },
124   "display_checkout",
125   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
126   "category_code",
127   { data_type => "varchar", is_nullable => 1, size => 10 },
128   "class",
129   { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
130   "keep_for_pseudonymization",
131   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
132   "mandatory",
133   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
134 );
135
136 =head1 PRIMARY KEY
137
138 =over 4
139
140 =item * L</code>
141
142 =back
143
144 =cut
145
146 __PACKAGE__->set_primary_key("code");
147
148 =head1 RELATIONS
149
150 =head2 borrower_attribute_types_branches
151
152 Type: has_many
153
154 Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
155
156 =cut
157
158 __PACKAGE__->has_many(
159   "borrower_attribute_types_branches",
160   "Koha::Schema::Result::BorrowerAttributeTypesBranch",
161   { "foreign.bat_code" => "self.code" },
162   { cascade_copy => 0, cascade_delete => 0 },
163 );
164
165 =head2 borrower_attributes
166
167 Type: has_many
168
169 Related object: L<Koha::Schema::Result::BorrowerAttribute>
170
171 =cut
172
173 __PACKAGE__->has_many(
174   "borrower_attributes",
175   "Koha::Schema::Result::BorrowerAttribute",
176   { "foreign.code" => "self.code" },
177   { cascade_copy => 0, cascade_delete => 0 },
178 );
179
180 =head2 pseudonymized_borrower_attributes
181
182 Type: has_many
183
184 Related object: L<Koha::Schema::Result::PseudonymizedBorrowerAttribute>
185
186 =cut
187
188 __PACKAGE__->has_many(
189   "pseudonymized_borrower_attributes",
190   "Koha::Schema::Result::PseudonymizedBorrowerAttribute",
191   { "foreign.code" => "self.code" },
192   { cascade_copy => 0, cascade_delete => 0 },
193 );
194
195
196 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-07-20 12:40:43
197 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+5TTNyiyjJkADhbkSLvGLw
198
199 __PACKAGE__->add_columns(
200     '+keep_for_pseudonymization' => { is_boolean => 1 },
201 );
202
203 __PACKAGE__->add_columns(
204     '+mandatory' => { is_boolean => 1 },
205 );
206
207 sub koha_object_class {
208     'Koha::Patron::Attribute::Type';
209 }
210 sub koha_objects_class {
211     'Koha::Patron::Attribute::Types';
212 }
213
214 1;