Bug 17397 - Update Schema Files
[koha.git] / Koha / Schema / Result / Message.pm
1 use utf8;
2 package Koha::Schema::Result::Message;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Koha::Schema::Result::Message
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<messages>
19
20 =cut
21
22 __PACKAGE__->table("messages");
23
24 =head1 ACCESSORS
25
26 =head2 message_id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 borrowernumber
33
34   data_type: 'integer'
35   is_nullable: 0
36
37 =head2 branchcode
38
39   data_type: 'varchar'
40   is_nullable: 1
41   size: 10
42
43 =head2 message_type
44
45   data_type: 'varchar'
46   is_nullable: 0
47   size: 1
48
49 =head2 message
50
51   data_type: 'text'
52   is_nullable: 0
53
54 =head2 message_date
55
56   data_type: 'timestamp'
57   datetime_undef_if_invalid: 1
58   default_value: current_timestamp
59   is_nullable: 0
60
61 =head2 manager_id
62
63   data_type: 'integer'
64   is_foreign_key: 1
65   is_nullable: 1
66
67 =cut
68
69 __PACKAGE__->add_columns(
70   "message_id",
71   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
72   "borrowernumber",
73   { data_type => "integer", is_nullable => 0 },
74   "branchcode",
75   { data_type => "varchar", is_nullable => 1, size => 10 },
76   "message_type",
77   { data_type => "varchar", is_nullable => 0, size => 1 },
78   "message",
79   { data_type => "text", is_nullable => 0 },
80   "message_date",
81   {
82     data_type => "timestamp",
83     datetime_undef_if_invalid => 1,
84     default_value => \"current_timestamp",
85     is_nullable => 0,
86   },
87   "manager_id",
88   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
89 );
90
91 =head1 PRIMARY KEY
92
93 =over 4
94
95 =item * L</message_id>
96
97 =back
98
99 =cut
100
101 __PACKAGE__->set_primary_key("message_id");
102
103 =head1 RELATIONS
104
105 =head2 manager
106
107 Type: belongs_to
108
109 Related object: L<Koha::Schema::Result::Borrower>
110
111 =cut
112
113 __PACKAGE__->belongs_to(
114   "manager",
115   "Koha::Schema::Result::Borrower",
116   { borrowernumber => "manager_id" },
117   {
118     is_deferrable => 1,
119     join_type     => "LEFT",
120     on_delete     => "SET NULL",
121     on_update     => "RESTRICT",
122   },
123 );
124
125
126 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-31 10:39:36
127 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lmkl/u8Lr1cQumfZvn5D4A
128
129
130 # You can replace this text with custom content, and it will be preserved on regeneration
131 1;