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.
 
 
 
 
 
 

147 lines
2.5 KiB

use utf8;
package Koha::Schema::Result::Message;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Koha::Schema::Result::Message
=cut
use strict;
use warnings;
use base 'DBIx::Class::Core';
=head1 TABLE: C<messages>
=cut
__PACKAGE__->table("messages");
=head1 ACCESSORS
=head2 message_id
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 borrowernumber
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 branchcode
data_type: 'varchar'
is_nullable: 1
size: 10
=head2 message_type
data_type: 'varchar'
is_nullable: 0
size: 1
=head2 message
data_type: 'mediumtext'
is_nullable: 0
=head2 message_date
data_type: 'timestamp'
datetime_undef_if_invalid: 1
default_value: current_timestamp
is_nullable: 0
=head2 manager_id
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
=cut
__PACKAGE__->add_columns(
"message_id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"borrowernumber",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"branchcode",
{ data_type => "varchar", is_nullable => 1, size => 10 },
"message_type",
{ data_type => "varchar", is_nullable => 0, size => 1 },
"message",
{ data_type => "mediumtext", is_nullable => 0 },
"message_date",
{
data_type => "timestamp",
datetime_undef_if_invalid => 1,
default_value => \"current_timestamp",
is_nullable => 0,
},
"manager_id",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
);
=head1 PRIMARY KEY
=over 4
=item * L</message_id>
=back
=cut
__PACKAGE__->set_primary_key("message_id");
=head1 RELATIONS
=head2 borrowernumber
Type: belongs_to
Related object: L<Koha::Schema::Result::Borrower>
=cut
__PACKAGE__->belongs_to(
"borrowernumber",
"Koha::Schema::Result::Borrower",
{ borrowernumber => "borrowernumber" },
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
=head2 manager
Type: belongs_to
Related object: L<Koha::Schema::Result::Borrower>
=cut
__PACKAGE__->belongs_to(
"manager",
"Koha::Schema::Result::Borrower",
{ borrowernumber => "manager_id" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "SET NULL",
on_update => "RESTRICT",
},
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-02-15 13:15:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kYM+0CFPm/wdNp7EosdlRw
# You can replace this text with custom content, and it will be preserved on regeneration
1;