Bug 20434: Update UNIMARC framework - auth (SAUTTIT)
[koha.git] / Koha / Schema / Result / ClubTemplate.pm
blobbbc5f49a5f9382bca284166c54c289ab940d0c8c
1 use utf8;
2 package Koha::Schema::Result::ClubTemplate;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::ClubTemplate
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<club_templates>
20 =cut
22 __PACKAGE__->table("club_templates");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 name
34 data_type: 'text'
35 is_nullable: 0
37 =head2 description
39 data_type: 'mediumtext'
40 is_nullable: 1
42 =head2 is_enrollable_from_opac
44 data_type: 'tinyint'
45 default_value: 0
46 is_nullable: 0
48 =head2 is_email_required
50 data_type: 'tinyint'
51 default_value: 0
52 is_nullable: 0
54 =head2 branchcode
56 data_type: 'varchar'
57 is_foreign_key: 1
58 is_nullable: 1
59 size: 10
61 =head2 date_created
63 data_type: 'timestamp'
64 datetime_undef_if_invalid: 1
65 default_value: current_timestamp
66 is_nullable: 0
68 =head2 date_updated
70 data_type: 'timestamp'
71 datetime_undef_if_invalid: 1
72 is_nullable: 1
74 =head2 is_deletable
76 data_type: 'tinyint'
77 default_value: 1
78 is_nullable: 0
80 =cut
82 __PACKAGE__->add_columns(
83 "id",
84 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
85 "name",
86 { data_type => "text", is_nullable => 0 },
87 "description",
88 { data_type => "mediumtext", is_nullable => 1 },
89 "is_enrollable_from_opac",
90 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
91 "is_email_required",
92 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
93 "branchcode",
94 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
95 "date_created",
97 data_type => "timestamp",
98 datetime_undef_if_invalid => 1,
99 default_value => \"current_timestamp",
100 is_nullable => 0,
102 "date_updated",
104 data_type => "timestamp",
105 datetime_undef_if_invalid => 1,
106 is_nullable => 1,
108 "is_deletable",
109 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
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 => "CASCADE",
142 on_update => "CASCADE",
146 =head2 club_template_enrollment_fields
148 Type: has_many
150 Related object: L<Koha::Schema::Result::ClubTemplateEnrollmentField>
152 =cut
154 __PACKAGE__->has_many(
155 "club_template_enrollment_fields",
156 "Koha::Schema::Result::ClubTemplateEnrollmentField",
157 { "foreign.club_template_id" => "self.id" },
158 { cascade_copy => 0, cascade_delete => 0 },
161 =head2 club_template_fields
163 Type: has_many
165 Related object: L<Koha::Schema::Result::ClubTemplateField>
167 =cut
169 __PACKAGE__->has_many(
170 "club_template_fields",
171 "Koha::Schema::Result::ClubTemplateField",
172 { "foreign.club_template_id" => "self.id" },
173 { cascade_copy => 0, cascade_delete => 0 },
176 =head2 clubs
178 Type: has_many
180 Related object: L<Koha::Schema::Result::Club>
182 =cut
184 __PACKAGE__->has_many(
185 "clubs",
186 "Koha::Schema::Result::Club",
187 { "foreign.club_template_id" => "self.id" },
188 { cascade_copy => 0, cascade_delete => 0 },
192 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
193 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1UuejI9kkTb9eeNKvSLAQQ
195 sub koha_object_class {
196 'Koha::Club::Template';
198 sub koha_objects_class {
199 'Koha::Club::Templates';