|
Lines 50-55
key used to identify the authorized value category
Link Here
|
| 50 |
|
50 |
|
| 51 |
code use to identify the authorized value |
51 |
code use to identify the authorized value |
| 52 |
|
52 |
|
|
|
53 |
=head2 parent_authorised_value_id |
| 54 |
|
| 55 |
data_type: 'integer' |
| 56 |
is_foreign_key: 1 |
| 57 |
is_nullable: 1 |
| 58 |
|
| 59 |
id of parent authorised value |
| 60 |
|
| 53 |
=head2 lib |
61 |
=head2 lib |
| 54 |
|
62 |
|
| 55 |
data_type: 'varchar' |
63 |
data_type: 'varchar' |
|
Lines 89-94
__PACKAGE__->add_columns(
Link Here
|
| 89 |
}, |
97 |
}, |
| 90 |
"authorised_value", |
98 |
"authorised_value", |
| 91 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 80 }, |
99 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 80 }, |
|
|
100 |
"parent_authorised_value_id", |
| 101 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
| 92 |
"lib", |
102 |
"lib", |
| 93 |
{ data_type => "varchar", is_nullable => 1, size => 200 }, |
103 |
{ data_type => "varchar", is_nullable => 1, size => 200 }, |
| 94 |
"lib_opac", |
104 |
"lib_opac", |
|
Lines 127-132
__PACKAGE__->add_unique_constraint("av_uniq", ["category", "authorised_value"]);
Link Here
|
| 127 |
|
137 |
|
| 128 |
=head1 RELATIONS |
138 |
=head1 RELATIONS |
| 129 |
|
139 |
|
|
|
140 |
=head2 authorised_values |
| 141 |
|
| 142 |
Type: has_many |
| 143 |
|
| 144 |
Related object: L<Koha::Schema::Result::AuthorisedValue> |
| 145 |
|
| 146 |
=cut |
| 147 |
|
| 148 |
__PACKAGE__->has_many( |
| 149 |
"authorised_values", |
| 150 |
"Koha::Schema::Result::AuthorisedValue", |
| 151 |
{ "foreign.parent_authorised_value_id" => "self.id" }, |
| 152 |
{ cascade_copy => 0, cascade_delete => 0 }, |
| 153 |
); |
| 154 |
|
| 130 |
=head2 authorised_values_branches |
155 |
=head2 authorised_values_branches |
| 131 |
|
156 |
|
| 132 |
Type: has_many |
157 |
Type: has_many |
|
Lines 172-180
__PACKAGE__->has_many(
Link Here
|
| 172 |
{ cascade_copy => 0, cascade_delete => 0 }, |
197 |
{ cascade_copy => 0, cascade_delete => 0 }, |
| 173 |
); |
198 |
); |
| 174 |
|
199 |
|
|
|
200 |
=head2 parent_authorised_value |
| 175 |
|
201 |
|
| 176 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 |
202 |
Type: belongs_to |
| 177 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LH9dpEEzlVVsjNVv/jnONg |
203 |
|
|
|
204 |
Related object: L<Koha::Schema::Result::AuthorisedValue> |
| 205 |
|
| 206 |
=cut |
| 207 |
|
| 208 |
__PACKAGE__->belongs_to( |
| 209 |
"parent_authorised_value", |
| 210 |
"Koha::Schema::Result::AuthorisedValue", |
| 211 |
{ id => "parent_authorised_value_id" }, |
| 212 |
{ |
| 213 |
is_deferrable => 1, |
| 214 |
join_type => "LEFT", |
| 215 |
on_delete => "SET NULL", |
| 216 |
on_update => "CASCADE", |
| 217 |
}, |
| 218 |
); |
| 219 |
|
| 220 |
|
| 221 |
# Created by DBIx::Class::Schema::Loader v0.07052 @ 2025-10-30 11:59:08 |
| 222 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pF2KR2JI+ugIGxyuSC1e4A |
| 178 |
|
223 |
|
| 179 |
|
224 |
|
| 180 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
225 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |