2 package Koha::Schema::Result::Message;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Message
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<messages>
22 __PACKAGE__->table("messages");
32 unique identifier assigned by Koha
40 foreign key linking this message to the borrowers table
48 foreign key linking the message to the branches table
56 whether the message is for the librarians (L) or the patron (B)
60 data_type: 'mediumtext'
63 the text of the message
67 data_type: 'timestamp'
68 datetime_undef_if_invalid: 1
69 default_value: current_timestamp
72 the date and time the message was written
84 __PACKAGE__->add_columns(
86 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
88 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
90 { data_type => "varchar", is_nullable => 1, size => 10 },
92 { data_type => "varchar", is_nullable => 0, size => 1 },
94 { data_type => "mediumtext", is_nullable => 0 },
97 data_type => "timestamp",
98 datetime_undef_if_invalid => 1,
99 default_value => \"current_timestamp",
103 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
110 =item * L</message_id>
116 __PACKAGE__->set_primary_key("message_id");
120 =head2 borrowernumber
124 Related object: L<Koha::Schema::Result::Borrower>
128 __PACKAGE__->belongs_to(
130 "Koha::Schema::Result::Borrower",
131 { borrowernumber => "borrowernumber" },
132 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
139 Related object: L<Koha::Schema::Result::Borrower>
143 __PACKAGE__->belongs_to(
145 "Koha::Schema::Result::Borrower",
146 { borrowernumber => "manager_id" },
150 on_delete => "SET NULL",
151 on_update => "RESTRICT",
156 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
157 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EvxjiNgWGReZ9rEVmS5YVw
159 sub koha_object_class {
160 'Koha::Patron::Message';
162 sub koha_objects_class {
163 'Koha::Patron::Messages';