2 package Koha::Schema::Result::Club;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Club
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<clubs>
22 __PACKAGE__->table("clubs");
32 =head2 club_template_id
45 data_type: 'mediumtext'
51 datetime_undef_if_invalid: 1
57 datetime_undef_if_invalid: 1
69 data_type: 'timestamp'
70 datetime_undef_if_invalid: 1
71 default_value: current_timestamp
76 data_type: 'timestamp'
77 datetime_undef_if_invalid: 1
82 __PACKAGE__->add_columns(
84 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
86 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
88 { data_type => "text", is_nullable => 0 },
90 { data_type => "mediumtext", is_nullable => 1 },
92 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
94 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
96 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
99 data_type => "timestamp",
100 datetime_undef_if_invalid => 1,
101 default_value => \"current_timestamp",
106 data_type => "timestamp",
107 datetime_undef_if_invalid => 1,
122 __PACKAGE__->set_primary_key("id");
130 Related object: L<Koha::Schema::Result::Branch>
134 __PACKAGE__->belongs_to(
136 "Koha::Schema::Result::Branch",
137 { branchcode => "branchcode" },
141 on_delete => "RESTRICT",
142 on_update => "RESTRICT",
146 =head2 club_enrollments
150 Related object: L<Koha::Schema::Result::ClubEnrollment>
154 __PACKAGE__->has_many(
156 "Koha::Schema::Result::ClubEnrollment",
157 { "foreign.club_id" => "self.id" },
158 { cascade_copy => 0, cascade_delete => 0 },
165 Related object: L<Koha::Schema::Result::ClubField>
169 __PACKAGE__->has_many(
171 "Koha::Schema::Result::ClubField",
172 { "foreign.club_id" => "self.id" },
173 { cascade_copy => 0, cascade_delete => 0 },
180 Related object: L<Koha::Schema::Result::ClubHold>
184 __PACKAGE__->has_many(
186 "Koha::Schema::Result::ClubHold",
187 { "foreign.club_id" => "self.id" },
188 { cascade_copy => 0, cascade_delete => 0 },
195 Related object: L<Koha::Schema::Result::ClubTemplate>
199 __PACKAGE__->belongs_to(
201 "Koha::Schema::Result::ClubTemplate",
202 { id => "club_template_id" },
203 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
207 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:47
208 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WbB7PSSU4xaszsKe9Eacqw
211 # You can replace this text with custom content, and it will be preserved on regeneration