Bug 21797: Update two-column templates with Bootstrap grid: Acquisitions part 5
[koha.git] / Koha / Schema / Result / Club.pm
blob7011cd54e6d4a68519dd3c1327a6d70182f702b9
1 use utf8;
2 package Koha::Schema::Result::Club;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Club
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<clubs>
20 =cut
22 __PACKAGE__->table("clubs");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 club_template_id
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 name
40 data_type: 'text'
41 is_nullable: 0
43 =head2 description
45 data_type: 'mediumtext'
46 is_nullable: 1
48 =head2 date_start
50 data_type: 'date'
51 datetime_undef_if_invalid: 1
52 is_nullable: 1
54 =head2 date_end
56 data_type: 'date'
57 datetime_undef_if_invalid: 1
58 is_nullable: 1
60 =head2 branchcode
62 data_type: 'varchar'
63 is_foreign_key: 1
64 is_nullable: 1
65 size: 10
67 =head2 date_created
69 data_type: 'timestamp'
70 datetime_undef_if_invalid: 1
71 default_value: current_timestamp
72 is_nullable: 0
74 =head2 date_updated
76 data_type: 'timestamp'
77 datetime_undef_if_invalid: 1
78 is_nullable: 1
80 =cut
82 __PACKAGE__->add_columns(
83 "id",
84 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
85 "club_template_id",
86 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
87 "name",
88 { data_type => "text", is_nullable => 0 },
89 "description",
90 { data_type => "mediumtext", is_nullable => 1 },
91 "date_start",
92 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
93 "date_end",
94 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
95 "branchcode",
96 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
97 "date_created",
99 data_type => "timestamp",
100 datetime_undef_if_invalid => 1,
101 default_value => \"current_timestamp",
102 is_nullable => 0,
104 "date_updated",
106 data_type => "timestamp",
107 datetime_undef_if_invalid => 1,
108 is_nullable => 1,
112 =head1 PRIMARY KEY
114 =over 4
116 =item * L</id>
118 =back
120 =cut
122 __PACKAGE__->set_primary_key("id");
124 =head1 RELATIONS
126 =head2 branchcode
128 Type: belongs_to
130 Related object: L<Koha::Schema::Result::Branch>
132 =cut
134 __PACKAGE__->belongs_to(
135 "branchcode",
136 "Koha::Schema::Result::Branch",
137 { branchcode => "branchcode" },
139 is_deferrable => 1,
140 join_type => "LEFT",
141 on_delete => "RESTRICT",
142 on_update => "RESTRICT",
146 =head2 club_enrollments
148 Type: has_many
150 Related object: L<Koha::Schema::Result::ClubEnrollment>
152 =cut
154 __PACKAGE__->has_many(
155 "club_enrollments",
156 "Koha::Schema::Result::ClubEnrollment",
157 { "foreign.club_id" => "self.id" },
158 { cascade_copy => 0, cascade_delete => 0 },
161 =head2 club_fields
163 Type: has_many
165 Related object: L<Koha::Schema::Result::ClubField>
167 =cut
169 __PACKAGE__->has_many(
170 "club_fields",
171 "Koha::Schema::Result::ClubField",
172 { "foreign.club_id" => "self.id" },
173 { cascade_copy => 0, cascade_delete => 0 },
176 =head2 club_template
178 Type: belongs_to
180 Related object: L<Koha::Schema::Result::ClubTemplate>
182 =cut
184 __PACKAGE__->belongs_to(
185 "club_template",
186 "Koha::Schema::Result::ClubTemplate",
187 { id => "club_template_id" },
188 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
192 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
193 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6EB6FURHN+brOhDoPZVeGQ
196 # You can replace this text with custom content, and it will be preserved on regeneration