Main Koha release repository
https://koha-community.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
167 lines
3.0 KiB
167 lines
3.0 KiB
use utf8;
|
|
package Koha::Schema::Result::Letter;
|
|
|
|
# Created by DBIx::Class::Schema::Loader
|
|
# DO NOT MODIFY THE FIRST PART OF THIS FILE
|
|
|
|
=head1 NAME
|
|
|
|
Koha::Schema::Result::Letter
|
|
|
|
=cut
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use base 'DBIx::Class::Core';
|
|
|
|
=head1 TABLE: C<letter>
|
|
|
|
=cut
|
|
|
|
__PACKAGE__->table("letter");
|
|
|
|
=head1 ACCESSORS
|
|
|
|
=head2 module
|
|
|
|
data_type: 'varchar'
|
|
default_value: (empty string)
|
|
is_nullable: 0
|
|
size: 20
|
|
|
|
=head2 code
|
|
|
|
data_type: 'varchar'
|
|
default_value: (empty string)
|
|
is_nullable: 0
|
|
size: 20
|
|
|
|
=head2 branchcode
|
|
|
|
data_type: 'varchar'
|
|
default_value: (empty string)
|
|
is_nullable: 0
|
|
size: 10
|
|
|
|
=head2 name
|
|
|
|
data_type: 'varchar'
|
|
default_value: (empty string)
|
|
is_nullable: 0
|
|
size: 100
|
|
|
|
=head2 is_html
|
|
|
|
data_type: 'tinyint'
|
|
default_value: 0
|
|
is_nullable: 1
|
|
|
|
=head2 title
|
|
|
|
data_type: 'varchar'
|
|
default_value: (empty string)
|
|
is_nullable: 0
|
|
size: 200
|
|
|
|
=head2 content
|
|
|
|
data_type: 'text'
|
|
is_nullable: 1
|
|
|
|
=head2 message_transport_type
|
|
|
|
data_type: 'varchar'
|
|
default_value: 'email'
|
|
is_foreign_key: 1
|
|
is_nullable: 0
|
|
size: 20
|
|
|
|
=cut
|
|
|
|
__PACKAGE__->add_columns(
|
|
"module",
|
|
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 20 },
|
|
"code",
|
|
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 20 },
|
|
"branchcode",
|
|
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
|
|
"name",
|
|
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 100 },
|
|
"is_html",
|
|
{ data_type => "tinyint", default_value => 0, is_nullable => 1 },
|
|
"title",
|
|
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 200 },
|
|
"content",
|
|
{ data_type => "text", is_nullable => 1 },
|
|
"message_transport_type",
|
|
{
|
|
data_type => "varchar",
|
|
default_value => "email",
|
|
is_foreign_key => 1,
|
|
is_nullable => 0,
|
|
size => 20,
|
|
},
|
|
);
|
|
|
|
=head1 PRIMARY KEY
|
|
|
|
=over 4
|
|
|
|
=item * L</module>
|
|
|
|
=item * L</code>
|
|
|
|
=item * L</branchcode>
|
|
|
|
=item * L</message_transport_type>
|
|
|
|
=back
|
|
|
|
=cut
|
|
|
|
__PACKAGE__->set_primary_key("module", "code", "branchcode", "message_transport_type");
|
|
|
|
=head1 RELATIONS
|
|
|
|
=head2 message_transport_type
|
|
|
|
Type: belongs_to
|
|
|
|
Related object: L<Koha::Schema::Result::MessageTransportType>
|
|
|
|
=cut
|
|
|
|
__PACKAGE__->belongs_to(
|
|
"message_transport_type",
|
|
"Koha::Schema::Result::MessageTransportType",
|
|
{ message_transport_type => "message_transport_type" },
|
|
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
|
|
);
|
|
|
|
=head2 message_transports
|
|
|
|
Type: has_many
|
|
|
|
Related object: L<Koha::Schema::Result::MessageTransport>
|
|
|
|
=cut
|
|
|
|
__PACKAGE__->has_many(
|
|
"message_transports",
|
|
"Koha::Schema::Result::MessageTransport",
|
|
{
|
|
"foreign.branchcode" => "self.branchcode",
|
|
"foreign.letter_code" => "self.code",
|
|
"foreign.letter_module" => "self.module",
|
|
},
|
|
{ cascade_copy => 0, cascade_delete => 0 },
|
|
);
|
|
|
|
|
|
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-05-02 18:04:32
|
|
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HFUQ+/BKlweHglzOlm0lUQ
|
|
|
|
|
|
# You can replace this text with custom content, and it will be preserved on regeneration
|
|
1;
|
|
|