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");
58 data_type: 'timestamp'
59 datetime_undef_if_invalid: 1
64 data_type: 'timestamp'
65 datetime_undef_if_invalid: 1
66 default_value: current_timestamp
71 __PACKAGE__->add_columns(
73 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
75 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
77 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
79 { data_type => "varchar", is_nullable => 1, size => 100 },
81 { data_type => "text", is_nullable => 1 },
84 data_type => "timestamp",
85 datetime_undef_if_invalid => 1,
90 data_type => "timestamp",
91 datetime_undef_if_invalid => 1,
92 default_value => \"current_timestamp",
107 __PACKAGE__->set_primary_key("id");
109 =head1 UNIQUE CONSTRAINTS
121 __PACKAGE__->add_unique_constraint("title", ["title"]);
129 Related object: L<Koha::Schema::Result::Branch>
133 __PACKAGE__->belongs_to(
135 "Koha::Schema::Result::Branch",
136 { branchcode => "branchcode" },
140 on_delete => "CASCADE",
141 on_update => "CASCADE",
145 =head2 library_groups
149 Related object: L<Koha::Schema::Result::LibraryGroup>
153 __PACKAGE__->has_many(
155 "Koha::Schema::Result::LibraryGroup",
156 { "foreign.parent_id" => "self.id" },
157 { cascade_copy => 0, cascade_delete => 0 },
164 Related object: L<Koha::Schema::Result::LibraryGroup>
168 __PACKAGE__->belongs_to(
170 "Koha::Schema::Result::LibraryGroup",
171 { id => "parent_id" },
175 on_delete => "CASCADE",
176 on_update => "CASCADE",
181 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-09 16:27:08
182 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7JN93utlgFEyQhE9BMx1QQ
185 # You can replace this text with custom code or comments, and it will be preserved on regeneration