|
Lines 23-36
__PACKAGE__->table("additional_contents");
Link Here
|
| 23 |
|
23 |
|
| 24 |
=head1 ACCESSORS |
24 |
=head1 ACCESSORS |
| 25 |
|
25 |
|
| 26 |
=head2 idnew |
26 |
=head2 id |
| 27 |
|
27 |
|
| 28 |
data_type: 'integer' |
28 |
data_type: 'integer' |
| 29 |
extra: {unsigned => 1} |
29 |
extra: {unsigned => 1} |
| 30 |
is_auto_increment: 1 |
30 |
is_auto_increment: 1 |
| 31 |
is_nullable: 0 |
31 |
is_nullable: 0 |
| 32 |
|
32 |
|
| 33 |
unique identifier for the additional content |
33 |
unique identifier for the additional content category |
| 34 |
|
34 |
|
| 35 |
=head2 category |
35 |
=head2 category |
| 36 |
|
36 |
|
|
Lines 65-95
location of the additional content
Link Here
|
| 65 |
|
65 |
|
| 66 |
branch code users to create branch specific additional content, NULL is every branch. |
66 |
branch code users to create branch specific additional content, NULL is every branch. |
| 67 |
|
67 |
|
| 68 |
=head2 title |
|
|
| 69 |
|
| 70 |
data_type: 'varchar' |
| 71 |
default_value: (empty string) |
| 72 |
is_nullable: 0 |
| 73 |
size: 250 |
| 74 |
|
| 75 |
title of the additional content |
| 76 |
|
| 77 |
=head2 content |
| 78 |
|
| 79 |
data_type: 'mediumtext' |
| 80 |
is_nullable: 0 |
| 81 |
|
| 82 |
the body of your additional content |
| 83 |
|
| 84 |
=head2 lang |
| 85 |
|
| 86 |
data_type: 'varchar' |
| 87 |
default_value: (empty string) |
| 88 |
is_nullable: 0 |
| 89 |
size: 50 |
| 90 |
|
| 91 |
location for the additional content(koha is the staff interface, slip is the circulation receipt and language codes are for the opac) |
| 92 |
|
| 93 |
=head2 published_on |
68 |
=head2 published_on |
| 94 |
|
69 |
|
| 95 |
data_type: 'date' |
70 |
data_type: 'date' |
|
Lines 133-139
The user who created the additional content
Link Here
|
| 133 |
=cut |
108 |
=cut |
| 134 |
|
109 |
|
| 135 |
__PACKAGE__->add_columns( |
110 |
__PACKAGE__->add_columns( |
| 136 |
"idnew", |
111 |
"id", |
| 137 |
{ |
112 |
{ |
| 138 |
data_type => "integer", |
113 |
data_type => "integer", |
| 139 |
extra => { unsigned => 1 }, |
114 |
extra => { unsigned => 1 }, |
|
Lines 148-159
__PACKAGE__->add_columns(
Link Here
|
| 148 |
{ data_type => "varchar", is_nullable => 0, size => 255 }, |
123 |
{ data_type => "varchar", is_nullable => 0, size => 255 }, |
| 149 |
"branchcode", |
124 |
"branchcode", |
| 150 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, |
125 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, |
| 151 |
"title", |
|
|
| 152 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 250 }, |
| 153 |
"content", |
| 154 |
{ data_type => "mediumtext", is_nullable => 0 }, |
| 155 |
"lang", |
| 156 |
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 50 }, |
| 157 |
"published_on", |
126 |
"published_on", |
| 158 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
127 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
| 159 |
"updated_on", |
128 |
"updated_on", |
|
Lines 175-187
__PACKAGE__->add_columns(
Link Here
|
| 175 |
|
144 |
|
| 176 |
=over 4 |
145 |
=over 4 |
| 177 |
|
146 |
|
| 178 |
=item * L</idnew> |
147 |
=item * L</id> |
| 179 |
|
148 |
|
| 180 |
=back |
149 |
=back |
| 181 |
|
150 |
|
| 182 |
=cut |
151 |
=cut |
| 183 |
|
152 |
|
| 184 |
__PACKAGE__->set_primary_key("idnew"); |
153 |
__PACKAGE__->set_primary_key("id"); |
| 185 |
|
154 |
|
| 186 |
=head1 UNIQUE CONSTRAINTS |
155 |
=head1 UNIQUE CONSTRAINTS |
| 187 |
|
156 |
|
|
Lines 195-213
__PACKAGE__->set_primary_key("idnew");
Link Here
|
| 195 |
|
164 |
|
| 196 |
=item * L</branchcode> |
165 |
=item * L</branchcode> |
| 197 |
|
166 |
|
| 198 |
=item * L</lang> |
|
|
| 199 |
|
| 200 |
=back |
167 |
=back |
| 201 |
|
168 |
|
| 202 |
=cut |
169 |
=cut |
| 203 |
|
170 |
|
| 204 |
__PACKAGE__->add_unique_constraint( |
171 |
__PACKAGE__->add_unique_constraint( |
| 205 |
"additional_contents_uniq", |
172 |
"additional_contents_uniq", |
| 206 |
["category", "code", "branchcode", "lang"], |
173 |
["category", "code", "branchcode"], |
| 207 |
); |
174 |
); |
| 208 |
|
175 |
|
| 209 |
=head1 RELATIONS |
176 |
=head1 RELATIONS |
| 210 |
|
177 |
|
|
|
178 |
=head2 additional_contents_localizations |
| 179 |
|
| 180 |
Type: has_many |
| 181 |
|
| 182 |
Related object: L<Koha::Schema::Result::AdditionalContentsLocalization> |
| 183 |
|
| 184 |
=cut |
| 185 |
|
| 186 |
__PACKAGE__->has_many( |
| 187 |
"additional_contents_localizations", |
| 188 |
"Koha::Schema::Result::AdditionalContentsLocalization", |
| 189 |
{ "foreign.additional_content_id" => "self.id" }, |
| 190 |
{ cascade_copy => 0, cascade_delete => 0 }, |
| 191 |
); |
| 192 |
|
| 211 |
=head2 borrowernumber |
193 |
=head2 borrowernumber |
| 212 |
|
194 |
|
| 213 |
Type: belongs_to |
195 |
Type: belongs_to |
|
Lines 249-256
__PACKAGE__->belongs_to(
Link Here
|
| 249 |
); |
231 |
); |
| 250 |
|
232 |
|
| 251 |
|
233 |
|
| 252 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-02 07:12:59 |
234 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-03-03 07:19:57 |
| 253 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/h/wWfmyVxW7skwrMn3scg |
235 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0w/fOUAy+4V4aVls/i7Wig |
| 254 |
|
236 |
|
| 255 |
|
237 |
|
| 256 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
238 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |