View | Details | Raw Unified | Return to bug 26573
Collapse All | Expand All

(-)a/Koha/Schema/Result/BorrowerAttributeType.pm (-33 / +31 lines)
Lines 111-125 foreign key from authorised_values that links this custom field to an authorized Link Here
111
111
112
defines if this field displays in checkout screens
112
defines if this field displays in checkout screens
113
113
114
=head2 category_code
115
116
  data_type: 'varchar'
117
  is_foreign_key: 1
118
  is_nullable: 1
119
  size: 10
120
121
defines a category for an attribute_type
122
123
=head2 class
114
=head2 class
124
115
125
  data_type: 'varchar'
116
  data_type: 'varchar'
Lines 178-185 __PACKAGE__->add_columns( Link Here
178
  { data_type => "varchar", is_nullable => 1, size => 32 },
169
  { data_type => "varchar", is_nullable => 1, size => 32 },
179
  "display_checkout",
170
  "display_checkout",
180
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
171
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
181
  "category_code",
182
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
183
  "class",
172
  "class",
184
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
173
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
185
  "keep_for_pseudonymization",
174
  "keep_for_pseudonymization",
Lines 219-224 __PACKAGE__->has_many( Link Here
219
  { cascade_copy => 0, cascade_delete => 0 },
208
  { cascade_copy => 0, cascade_delete => 0 },
220
);
209
);
221
210
211
=head2 borrower_attribute_types_categories
212
213
Type: has_many
214
215
Related object: L<Koha::Schema::Result::BorrowerAttributeTypesCategory>
216
217
=cut
218
219
__PACKAGE__->has_many(
220
  "borrower_attribute_types_categories",
221
  "Koha::Schema::Result::BorrowerAttributeTypesCategory",
222
  { "foreign.borrower_attribute_type_code" => "self.code" },
223
  { cascade_copy => 0, cascade_delete => 0 },
224
);
225
222
=head2 borrower_attributes
226
=head2 borrower_attributes
223
227
224
Type: has_many
228
Type: has_many
Lines 234-259 __PACKAGE__->has_many( Link Here
234
  { cascade_copy => 0, cascade_delete => 0 },
238
  { cascade_copy => 0, cascade_delete => 0 },
235
);
239
);
236
240
237
=head2 category_code
238
239
Type: belongs_to
240
241
Related object: L<Koha::Schema::Result::Category>
242
243
=cut
244
245
__PACKAGE__->belongs_to(
246
  "category_code",
247
  "Koha::Schema::Result::Category",
248
  { categorycode => "category_code" },
249
  {
250
    is_deferrable => 1,
251
    join_type     => "LEFT",
252
    on_delete     => "RESTRICT",
253
    on_update     => "RESTRICT",
254
  },
255
);
256
257
=head2 pseudonymized_borrower_attributes
241
=head2 pseudonymized_borrower_attributes
258
242
259
Type: has_many
243
Type: has_many
Lines 269-277 __PACKAGE__->has_many( Link Here
269
  { cascade_copy => 0, cascade_delete => 0 },
253
  { cascade_copy => 0, cascade_delete => 0 },
270
);
254
);
271
255
256
=head2 categorycodes
272
257
273
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-02-20 15:56:54
258
Type: many_to_many
274
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Os1rn9zKu7/rVLVjZM3Mbg
259
260
Composing rels: L</borrower_attribute_types_categories> -> categorycode
261
262
=cut
263
264
__PACKAGE__->many_to_many(
265
  "categorycodes",
266
  "borrower_attribute_types_categories",
267
  "categorycode",
268
);
269
270
271
# Created by DBIx::Class::Schema::Loader v0.07052 @ 2025-06-18 09:03:38
272
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+xXVwvKXoXh17I2CHCdFlQ
275
273
276
__PACKAGE__->add_columns(
274
__PACKAGE__->add_columns(
277
    '+display_checkout'          => { is_boolean => 1 },
275
    '+display_checkout'          => { is_boolean => 1 },
(-)a/Koha/Schema/Result/BorrowerAttributeTypesCategory.pm (+101 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::BorrowerAttributeTypesCategory;
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::BorrowerAttributeTypesCategory
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_categories>
19
20
=cut
21
22
__PACKAGE__->table("borrower_attribute_types_categories");
23
24
=head1 ACCESSORS
25
26
=head2 borrower_attribute_type_code
27
28
  data_type: 'varchar'
29
  is_foreign_key: 1
30
  is_nullable: 0
31
  size: 64
32
33
=head2 categorycode
34
35
  data_type: 'varchar'
36
  is_foreign_key: 1
37
  is_nullable: 0
38
  size: 10
39
40
=cut
41
42
__PACKAGE__->add_columns(
43
  "borrower_attribute_type_code",
44
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 64 },
45
  "categorycode",
46
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
47
);
48
49
=head1 PRIMARY KEY
50
51
=over 4
52
53
=item * L</borrower_attribute_type_code>
54
55
=item * L</categorycode>
56
57
=back
58
59
=cut
60
61
__PACKAGE__->set_primary_key("borrower_attribute_type_code", "categorycode");
62
63
=head1 RELATIONS
64
65
=head2 borrower_attribute_type_code
66
67
Type: belongs_to
68
69
Related object: L<Koha::Schema::Result::BorrowerAttributeType>
70
71
=cut
72
73
__PACKAGE__->belongs_to(
74
  "borrower_attribute_type_code",
75
  "Koha::Schema::Result::BorrowerAttributeType",
76
  { code => "borrower_attribute_type_code" },
77
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
78
);
79
80
=head2 categorycode
81
82
Type: belongs_to
83
84
Related object: L<Koha::Schema::Result::Category>
85
86
=cut
87
88
__PACKAGE__->belongs_to(
89
  "categorycode",
90
  "Koha::Schema::Result::Category",
91
  { categorycode => "categorycode" },
92
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
93
);
94
95
96
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-02-18 12:49:42
97
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TT15Vl+q4MtAa9ioLsJTGg
98
99
100
# You can replace this text with custom code or comments, and it will be preserved on regeneration
101
1;
(-)a/Koha/Schema/Result/Category.pm (-8 / +21 lines)
Lines 319-336 __PACKAGE__->set_primary_key("categorycode"); Link Here
319
319
320
=head1 RELATIONS
320
=head1 RELATIONS
321
321
322
=head2 borrower_attribute_types
322
=head2 borrower_attribute_types_categories
323
323
324
Type: has_many
324
Type: has_many
325
325
326
Related object: L<Koha::Schema::Result::BorrowerAttributeType>
326
Related object: L<Koha::Schema::Result::BorrowerAttributeTypesCategory>
327
327
328
=cut
328
=cut
329
329
330
__PACKAGE__->has_many(
330
__PACKAGE__->has_many(
331
  "borrower_attribute_types",
331
  "borrower_attribute_types_categories",
332
  "Koha::Schema::Result::BorrowerAttributeType",
332
  "Koha::Schema::Result::BorrowerAttributeTypesCategory",
333
  { "foreign.category_code" => "self.categorycode" },
333
  { "foreign.categorycode" => "self.categorycode" },
334
  { cascade_copy => 0, cascade_delete => 0 },
334
  { cascade_copy => 0, cascade_delete => 0 },
335
);
335
);
336
336
Lines 409-417 __PACKAGE__->has_many( Link Here
409
  { cascade_copy => 0, cascade_delete => 0 },
409
  { cascade_copy => 0, cascade_delete => 0 },
410
);
410
);
411
411
412
=head2 borrower_attribute_type_codes
412
413
413
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-12-03 15:46:23
414
Type: many_to_many
414
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jiQq3bW+ZfdYpUpfZq1Rzw
415
416
Composing rels: L</borrower_attribute_types_categories> -> borrower_attribute_type_code
417
418
=cut
419
420
__PACKAGE__->many_to_many(
421
  "borrower_attribute_type_codes",
422
  "borrower_attribute_types_categories",
423
  "borrower_attribute_type_code",
424
);
425
426
427
# Created by DBIx::Class::Schema::Loader v0.07052 @ 2025-06-18 09:03:38
428
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:K+ZrvaTdUlQYzLzahRMVpQ
415
429
416
# You can replace this text with custom code or comments, and it will be preserved on regeneration
430
# You can replace this text with custom code or comments, and it will be preserved on regeneration
417
431
418
- 

Return to bug 26573