2 package Koha::Schema::Result::AdditionalContent;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::AdditionalContent
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<additional_contents>
22 __PACKAGE__->table("additional_contents");
29 extra: {unsigned => 1}
33 unique identifier for the additional content
41 category for the additional content
49 code to group content per lang
57 location of the additional content
66 branch code users to create branch specific additional content, NULL is every branch.
71 default_value: (empty string)
75 title of the additional content
79 data_type: 'mediumtext'
82 the body of your additional content
87 default_value: (empty string)
91 location for the additional content(koha is the staff interface, slip is the circulation receipt and language codes are for the opac)
96 datetime_undef_if_invalid: 1
103 data_type: 'timestamp'
104 datetime_undef_if_invalid: 1
105 default_value: current_timestamp
110 =head2 expirationdate
113 datetime_undef_if_invalid: 1
116 date the additional content is set to expire or no longer be visible
123 the order in which this additional content appears in that specific location
125 =head2 borrowernumber
131 The user who created the additional content
135 __PACKAGE__->add_columns(
138 data_type => "integer",
139 extra => { unsigned => 1 },
140 is_auto_increment => 1,
144 { data_type => "varchar", is_nullable => 0, size => 20 },
146 { data_type => "varchar", is_nullable => 0, size => 100 },
148 { data_type => "varchar", is_nullable => 0, size => 255 },
150 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
152 { data_type => "varchar", default_value => "", is_nullable => 0, size => 250 },
154 { data_type => "mediumtext", is_nullable => 0 },
156 { data_type => "varchar", default_value => "", is_nullable => 0, size => 50 },
158 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
161 data_type => "timestamp",
162 datetime_undef_if_invalid => 1,
163 default_value => \"current_timestamp",
167 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
169 { data_type => "integer", is_nullable => 1 },
171 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
184 __PACKAGE__->set_primary_key("idnew");
186 =head1 UNIQUE CONSTRAINTS
188 =head2 C<additional_contents_uniq>
196 =item * L</branchcode>
204 __PACKAGE__->add_unique_constraint(
205 "additional_contents_uniq",
206 ["category", "code", "branchcode", "lang"],
211 =head2 borrowernumber
215 Related object: L<Koha::Schema::Result::Borrower>
219 __PACKAGE__->belongs_to(
221 "Koha::Schema::Result::Borrower",
222 { borrowernumber => "borrowernumber" },
226 on_delete => "SET NULL",
227 on_update => "CASCADE",
235 Related object: L<Koha::Schema::Result::Branch>
239 __PACKAGE__->belongs_to(
241 "Koha::Schema::Result::Branch",
242 { branchcode => "branchcode" },
246 on_delete => "CASCADE",
247 on_update => "CASCADE",
252 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-02 07:12:59
253 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/h/wWfmyVxW7skwrMn3scg
256 # You can replace this text with custom code or comments, and it will be preserved on regeneration