|
Lines 1-4
Link Here
|
| 1 |
use utf8; |
1 |
use utf8; |
|
|
2 |
|
| 2 |
package Koha::Schema::Result::BorrowerAttributeType; |
3 |
package Koha::Schema::Result::BorrowerAttributeType; |
| 3 |
|
4 |
|
| 4 |
# Created by DBIx::Class::Schema::Loader |
5 |
# Created by DBIx::Class::Schema::Loader |
|
Lines 143-183
defines if this field is copied to anonymized_borrower_attributes (1 for yes, 0
Link Here
|
| 143 |
default_value: 0 |
144 |
default_value: 0 |
| 144 |
is_nullable: 0 |
145 |
is_nullable: 0 |
| 145 |
|
146 |
|
| 146 |
defines if the attribute is mandatory or not |
147 |
defines if the attribute is mandatory or not in the staff interface |
|
|
148 |
|
| 149 |
=head2 opac_mandatory |
| 150 |
|
| 151 |
data_type: 'tinyint' |
| 152 |
default_value: 0 |
| 153 |
is_nullable: 0 |
| 154 |
|
| 155 |
defines if the attribute is mandatory or not in the OPAC |
| 147 |
|
156 |
|
| 148 |
=cut |
157 |
=cut |
| 149 |
|
158 |
|
| 150 |
__PACKAGE__->add_columns( |
159 |
__PACKAGE__->add_columns( |
| 151 |
"code", |
160 |
"code", |
| 152 |
{ data_type => "varchar", is_nullable => 0, size => 64 }, |
161 |
{ data_type => "varchar", is_nullable => 0, size => 64 }, |
| 153 |
"description", |
162 |
"description", |
| 154 |
{ data_type => "varchar", is_nullable => 0, size => 255 }, |
163 |
{ data_type => "varchar", is_nullable => 0, size => 255 }, |
| 155 |
"repeatable", |
164 |
"repeatable", |
| 156 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
165 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 157 |
"unique_id", |
166 |
"unique_id", |
| 158 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
167 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 159 |
"is_date", |
168 |
"is_date", |
| 160 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
169 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 161 |
"opac_display", |
170 |
"opac_display", |
| 162 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
171 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 163 |
"opac_editable", |
172 |
"opac_editable", |
| 164 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
173 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 165 |
"staff_searchable", |
174 |
"staff_searchable", |
| 166 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
175 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 167 |
"searched_by_default", |
176 |
"searched_by_default", |
| 168 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
177 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 169 |
"authorised_value_category", |
178 |
"authorised_value_category", |
| 170 |
{ data_type => "varchar", is_nullable => 1, size => 32 }, |
179 |
{ data_type => "varchar", is_nullable => 1, size => 32 }, |
| 171 |
"display_checkout", |
180 |
"display_checkout", |
| 172 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
181 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 173 |
"category_code", |
182 |
"category_code", |
| 174 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, |
183 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, |
| 175 |
"class", |
184 |
"class", |
| 176 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, |
185 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, |
| 177 |
"keep_for_pseudonymization", |
186 |
"keep_for_pseudonymization", |
| 178 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
187 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 179 |
"mandatory", |
188 |
"mandatory", |
| 180 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
189 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
|
|
190 |
"opac_mandatory", |
| 191 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 181 |
); |
192 |
); |
| 182 |
|
193 |
|
| 183 |
=head1 PRIMARY KEY |
194 |
=head1 PRIMARY KEY |
|
Lines 203-212
Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
Link Here
|
| 203 |
=cut |
214 |
=cut |
| 204 |
|
215 |
|
| 205 |
__PACKAGE__->has_many( |
216 |
__PACKAGE__->has_many( |
| 206 |
"borrower_attribute_types_branches", |
217 |
"borrower_attribute_types_branches", |
| 207 |
"Koha::Schema::Result::BorrowerAttributeTypesBranch", |
218 |
"Koha::Schema::Result::BorrowerAttributeTypesBranch", |
| 208 |
{ "foreign.bat_code" => "self.code" }, |
219 |
{ "foreign.bat_code" => "self.code" }, |
| 209 |
{ cascade_copy => 0, cascade_delete => 0 }, |
220 |
{ cascade_copy => 0, cascade_delete => 0 }, |
| 210 |
); |
221 |
); |
| 211 |
|
222 |
|
| 212 |
=head2 borrower_attributes |
223 |
=head2 borrower_attributes |
|
Lines 218-227
Related object: L<Koha::Schema::Result::BorrowerAttribute>
Link Here
|
| 218 |
=cut |
229 |
=cut |
| 219 |
|
230 |
|
| 220 |
__PACKAGE__->has_many( |
231 |
__PACKAGE__->has_many( |
| 221 |
"borrower_attributes", |
232 |
"borrower_attributes", |
| 222 |
"Koha::Schema::Result::BorrowerAttribute", |
233 |
"Koha::Schema::Result::BorrowerAttribute", |
| 223 |
{ "foreign.code" => "self.code" }, |
234 |
{ "foreign.code" => "self.code" }, |
| 224 |
{ cascade_copy => 0, cascade_delete => 0 }, |
235 |
{ cascade_copy => 0, cascade_delete => 0 }, |
| 225 |
); |
236 |
); |
| 226 |
|
237 |
|
| 227 |
=head2 category_code |
238 |
=head2 category_code |
|
Lines 233-247
Related object: L<Koha::Schema::Result::Category>
Link Here
|
| 233 |
=cut |
244 |
=cut |
| 234 |
|
245 |
|
| 235 |
__PACKAGE__->belongs_to( |
246 |
__PACKAGE__->belongs_to( |
| 236 |
"category_code", |
247 |
"category_code", |
| 237 |
"Koha::Schema::Result::Category", |
248 |
"Koha::Schema::Result::Category", |
| 238 |
{ categorycode => "category_code" }, |
249 |
{ categorycode => "category_code" }, |
| 239 |
{ |
250 |
{ |
| 240 |
is_deferrable => 1, |
251 |
is_deferrable => 1, |
| 241 |
join_type => "LEFT", |
252 |
join_type => "LEFT", |
| 242 |
on_delete => "RESTRICT", |
253 |
on_delete => "RESTRICT", |
| 243 |
on_update => "RESTRICT", |
254 |
on_update => "RESTRICT", |
| 244 |
}, |
255 |
}, |
| 245 |
); |
256 |
); |
| 246 |
|
257 |
|
| 247 |
=head2 pseudonymized_borrower_attributes |
258 |
=head2 pseudonymized_borrower_attributes |
|
Lines 253-267
Related object: L<Koha::Schema::Result::PseudonymizedBorrowerAttribute>
Link Here
|
| 253 |
=cut |
264 |
=cut |
| 254 |
|
265 |
|
| 255 |
__PACKAGE__->has_many( |
266 |
__PACKAGE__->has_many( |
| 256 |
"pseudonymized_borrower_attributes", |
267 |
"pseudonymized_borrower_attributes", |
| 257 |
"Koha::Schema::Result::PseudonymizedBorrowerAttribute", |
268 |
"Koha::Schema::Result::PseudonymizedBorrowerAttribute", |
| 258 |
{ "foreign.code" => "self.code" }, |
269 |
{ "foreign.code" => "self.code" }, |
| 259 |
{ cascade_copy => 0, cascade_delete => 0 }, |
270 |
{ cascade_copy => 0, cascade_delete => 0 }, |
| 260 |
); |
271 |
); |
| 261 |
|
272 |
|
| 262 |
|
273 |
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-02-11 23:25:12 |
| 263 |
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-05-10 14:00:56 |
274 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:56F+DYV67ONsOHz9MkM3DA |
| 264 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZmiiXHqRGV2SDb4IgSPvJQ |
|
|
| 265 |
|
275 |
|
| 266 |
__PACKAGE__->add_columns( |
276 |
__PACKAGE__->add_columns( |
| 267 |
'+keep_for_pseudonymization' => { is_boolean => 1 }, |
277 |
'+keep_for_pseudonymization' => { is_boolean => 1 }, |
|
Lines 278-283
__PACKAGE__->add_columns(
Link Here
|
| 278 |
sub koha_object_class { |
288 |
sub koha_object_class { |
| 279 |
'Koha::Patron::Attribute::Type'; |
289 |
'Koha::Patron::Attribute::Type'; |
| 280 |
} |
290 |
} |
|
|
291 |
|
| 281 |
sub koha_objects_class { |
292 |
sub koha_objects_class { |
| 282 |
'Koha::Patron::Attribute::Types'; |
293 |
'Koha::Patron::Attribute::Types'; |
| 283 |
} |
294 |
} |
| 284 |
- |
|
|