2 package Koha
::Schema
::Result
::LibraryGroup
;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::LibraryGroup
16 use base
'DBIx::Class::Core';
18 =head1 TABLE: C<library_groups>
22 __PACKAGE__
->table("library_groups");
53 data_type: 'mediumtext'
56 =head2 ft_hide_patron_info
62 =head2 ft_search_groups_opac
68 =head2 ft_search_groups_staff
74 =head2 ft_local_hold_group
82 data_type: 'timestamp'
83 datetime_undef_if_invalid: 1
88 data_type: 'timestamp'
89 datetime_undef_if_invalid: 1
90 default_value: current_timestamp
95 __PACKAGE__
->add_columns(
97 { data_type
=> "integer", is_auto_increment
=> 1, is_nullable
=> 0 },
99 { data_type
=> "integer", is_foreign_key
=> 1, is_nullable
=> 1 },
101 { data_type
=> "varchar", is_foreign_key
=> 1, is_nullable
=> 1, size
=> 10 },
103 { data_type
=> "varchar", is_nullable
=> 1, size
=> 100 },
105 { data_type
=> "mediumtext", is_nullable
=> 1 },
106 "ft_hide_patron_info",
107 { data_type
=> "tinyint", default_value
=> 0, is_nullable
=> 0 },
108 "ft_search_groups_opac",
109 { data_type
=> "tinyint", default_value
=> 0, is_nullable
=> 0 },
110 "ft_search_groups_staff",
111 { data_type
=> "tinyint", default_value
=> 0, is_nullable
=> 0 },
112 "ft_local_hold_group",
113 { data_type
=> "tinyint", default_value
=> 0, is_nullable
=> 0 },
116 data_type
=> "timestamp",
117 datetime_undef_if_invalid
=> 1,
122 data_type
=> "timestamp",
123 datetime_undef_if_invalid
=> 1,
124 default_value
=> \"current_timestamp
",
139 __PACKAGE__->set_primary_key("id
");
141 =head1 UNIQUE CONSTRAINTS
143 =head2 C<library_groups_uniq_2>
147 =item * L</parent_id>
149 =item * L</branchcode>
155 __PACKAGE__->add_unique_constraint("library_groups_uniq_2
", ["parent_id
", "branchcode
"]);
167 __PACKAGE__->add_unique_constraint("title
", ["title
"]);
175 Related object: L<Koha::Schema::Result::Branch>
179 __PACKAGE__->belongs_to(
181 "Koha
::Schema
::Result
::Branch
",
182 { branchcode => "branchcode
" },
186 on_delete => "CASCADE
",
187 on_update => "CASCADE
",
191 =head2 library_groups
195 Related object: L<Koha::Schema::Result::LibraryGroup>
199 __PACKAGE__->has_many(
201 "Koha
::Schema
::Result
::LibraryGroup
",
202 { "foreign
.parent_id
" => "self
.id
" },
203 { cascade_copy => 0, cascade_delete => 0 },
210 Related object: L<Koha::Schema::Result::LibraryGroup>
214 __PACKAGE__->belongs_to(
216 "Koha
::Schema
::Result
::LibraryGroup
",
217 { id => "parent_id
" },
221 on_delete => "CASCADE
",
222 on_update => "CASCADE
",
227 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-30 15:43:39
228 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qg0Ckj0ZBRjSaQgEcvxSZA
230 sub koha_object_class {
231 'Koha::Library::Group';
233 sub koha_objects_class {
234 'Koha::Library::Groups';
237 __PACKAGE__->add_columns(
238 '+ft_hide_patron_info' => { is_boolean => 1 },
239 '+ft_search_groups_opac' => { is_boolean => 1 },
240 '+ft_search_groups_staff' => { is_boolean => 1 },
241 '+ft_local_hold_group' => { is_boolean => 1 },