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 156-193
defines if the attribute is mandatory or not on the OPAC
Link Here
|
156 |
=cut |
157 |
=cut |
157 |
|
158 |
|
158 |
__PACKAGE__->add_columns( |
159 |
__PACKAGE__->add_columns( |
159 |
"code", |
160 |
"code", |
160 |
{ data_type => "varchar", is_nullable => 0, size => 64 }, |
161 |
{ data_type => "varchar", is_nullable => 0, size => 64 }, |
161 |
"description", |
162 |
"description", |
162 |
{ data_type => "varchar", is_nullable => 0, size => 255 }, |
163 |
{ data_type => "varchar", is_nullable => 0, size => 255 }, |
163 |
"repeatable", |
164 |
"repeatable", |
164 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
165 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
165 |
"unique_id", |
166 |
"unique_id", |
166 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
167 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
167 |
"is_date", |
168 |
"is_date", |
168 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
169 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
169 |
"opac_display", |
170 |
"opac_display", |
170 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
171 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
171 |
"opac_editable", |
172 |
"opac_editable", |
172 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
173 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
173 |
"staff_searchable", |
174 |
"staff_searchable", |
174 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
175 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
175 |
"searched_by_default", |
176 |
"searched_by_default", |
176 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
177 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
177 |
"authorised_value_category", |
178 |
"authorised_value_category", |
178 |
{ data_type => "varchar", is_nullable => 1, size => 32 }, |
179 |
{ data_type => "varchar", is_nullable => 1, size => 32 }, |
179 |
"display_checkout", |
180 |
"display_checkout", |
180 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
181 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
181 |
"category_code", |
182 |
"category_code", |
182 |
{ 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 }, |
183 |
"class", |
184 |
"class", |
184 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, |
185 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, |
185 |
"keep_for_pseudonymization", |
186 |
"keep_for_pseudonymization", |
186 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
187 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
187 |
"mandatory", |
188 |
"mandatory", |
188 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
189 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
189 |
"opac_mandatory", |
190 |
"opac_mandatory", |
190 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
191 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
191 |
); |
192 |
); |
192 |
|
193 |
|
193 |
=head1 PRIMARY KEY |
194 |
=head1 PRIMARY KEY |
Lines 213-222
Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
Link Here
|
213 |
=cut |
214 |
=cut |
214 |
|
215 |
|
215 |
__PACKAGE__->has_many( |
216 |
__PACKAGE__->has_many( |
216 |
"borrower_attribute_types_branches", |
217 |
"borrower_attribute_types_branches", |
217 |
"Koha::Schema::Result::BorrowerAttributeTypesBranch", |
218 |
"Koha::Schema::Result::BorrowerAttributeTypesBranch", |
218 |
{ "foreign.bat_code" => "self.code" }, |
219 |
{ "foreign.bat_code" => "self.code" }, |
219 |
{ cascade_copy => 0, cascade_delete => 0 }, |
220 |
{ cascade_copy => 0, cascade_delete => 0 }, |
220 |
); |
221 |
); |
221 |
|
222 |
|
222 |
=head2 borrower_attributes |
223 |
=head2 borrower_attributes |
Lines 228-237
Related object: L<Koha::Schema::Result::BorrowerAttribute>
Link Here
|
228 |
=cut |
229 |
=cut |
229 |
|
230 |
|
230 |
__PACKAGE__->has_many( |
231 |
__PACKAGE__->has_many( |
231 |
"borrower_attributes", |
232 |
"borrower_attributes", |
232 |
"Koha::Schema::Result::BorrowerAttribute", |
233 |
"Koha::Schema::Result::BorrowerAttribute", |
233 |
{ "foreign.code" => "self.code" }, |
234 |
{ "foreign.code" => "self.code" }, |
234 |
{ cascade_copy => 0, cascade_delete => 0 }, |
235 |
{ cascade_copy => 0, cascade_delete => 0 }, |
235 |
); |
236 |
); |
236 |
|
237 |
|
237 |
=head2 category_code |
238 |
=head2 category_code |
Lines 243-257
Related object: L<Koha::Schema::Result::Category>
Link Here
|
243 |
=cut |
244 |
=cut |
244 |
|
245 |
|
245 |
__PACKAGE__->belongs_to( |
246 |
__PACKAGE__->belongs_to( |
246 |
"category_code", |
247 |
"category_code", |
247 |
"Koha::Schema::Result::Category", |
248 |
"Koha::Schema::Result::Category", |
248 |
{ categorycode => "category_code" }, |
249 |
{ categorycode => "category_code" }, |
249 |
{ |
250 |
{ |
250 |
is_deferrable => 1, |
251 |
is_deferrable => 1, |
251 |
join_type => "LEFT", |
252 |
join_type => "LEFT", |
252 |
on_delete => "RESTRICT", |
253 |
on_delete => "RESTRICT", |
253 |
on_update => "RESTRICT", |
254 |
on_update => "RESTRICT", |
254 |
}, |
255 |
}, |
255 |
); |
256 |
); |
256 |
|
257 |
|
257 |
=head2 pseudonymized_borrower_attributes |
258 |
=head2 pseudonymized_borrower_attributes |
Lines 263-275
Related object: L<Koha::Schema::Result::PseudonymizedBorrowerAttribute>
Link Here
|
263 |
=cut |
264 |
=cut |
264 |
|
265 |
|
265 |
__PACKAGE__->has_many( |
266 |
__PACKAGE__->has_many( |
266 |
"pseudonymized_borrower_attributes", |
267 |
"pseudonymized_borrower_attributes", |
267 |
"Koha::Schema::Result::PseudonymizedBorrowerAttribute", |
268 |
"Koha::Schema::Result::PseudonymizedBorrowerAttribute", |
268 |
{ "foreign.code" => "self.code" }, |
269 |
{ "foreign.code" => "self.code" }, |
269 |
{ cascade_copy => 0, cascade_delete => 0 }, |
270 |
{ cascade_copy => 0, cascade_delete => 0 }, |
270 |
); |
271 |
); |
271 |
|
272 |
|
272 |
|
|
|
273 |
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-05-10 14:00:56 |
273 |
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-05-10 14:00:56 |
274 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZmiiXHqRGV2SDb4IgSPvJQ |
274 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZmiiXHqRGV2SDb4IgSPvJQ |
275 |
|
275 |
|
Lines 287-292
__PACKAGE__->add_columns(
Link Here
|
287 |
sub koha_object_class { |
287 |
sub koha_object_class { |
288 |
'Koha::Patron::Attribute::Type'; |
288 |
'Koha::Patron::Attribute::Type'; |
289 |
} |
289 |
} |
|
|
290 |
|
290 |
sub koha_objects_class { |
291 |
sub koha_objects_class { |
291 |
'Koha::Patron::Attribute::Types'; |
292 |
'Koha::Patron::Attribute::Types'; |
292 |
} |
293 |
} |
293 |
- |
|
|