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
76 data_type: 'timestamp'
77 datetime_undef_if_invalid: 1
82 data_type: 'timestamp'
83 datetime_undef_if_invalid: 1
84 default_value: current_timestamp
89 __PACKAGE__->add_columns(
91 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
93 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
95 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
97 { data_type => "varchar", is_nullable => 1, size => 100 },
99 { data_type => "mediumtext", is_nullable => 1 },
100 "ft_hide_patron_info",
101 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
102 "ft_search_groups_opac",
103 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
104 "ft_search_groups_staff",
105 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
108 data_type => "timestamp",
109 datetime_undef_if_invalid => 1,
114 data_type => "timestamp",
115 datetime_undef_if_invalid => 1,
116 default_value => \"current_timestamp",
131 __PACKAGE__->set_primary_key("id");
133 =head1 UNIQUE CONSTRAINTS
145 __PACKAGE__->add_unique_constraint("title", ["title"]);
153 Related object: L<Koha::Schema::Result::Branch>
157 __PACKAGE__->belongs_to(
159 "Koha::Schema::Result::Branch",
160 { branchcode => "branchcode" },
164 on_delete => "CASCADE",
165 on_update => "CASCADE",
169 =head2 library_groups
173 Related object: L<Koha::Schema::Result::LibraryGroup>
177 __PACKAGE__->has_many(
179 "Koha::Schema::Result::LibraryGroup",
180 { "foreign.parent_id" => "self.id" },
181 { cascade_copy => 0, cascade_delete => 0 },
188 Related object: L<Koha::Schema::Result::LibraryGroup>
192 __PACKAGE__->belongs_to(
194 "Koha::Schema::Result::LibraryGroup",
195 { id => "parent_id" },
199 on_delete => "CASCADE",
200 on_update => "CASCADE",
205 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54
206 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8hvTh2lWoG/MpfSdq4kx5Q
208 sub koha_object_class {
209 'Koha::Library::Group';
211 sub koha_objects_class {
212 'Koha::Library::Groups';