Bug 11844: Use additional fields for order lines
[koha.git] / Koha / Schema / Result / MessageQueue.pm
1 use utf8;
2 package Koha::Schema::Result::MessageQueue;
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::MessageQueue
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<message_queue>
19
20 =cut
21
22 __PACKAGE__->table("message_queue");
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 letter_id
33
34   data_type: 'integer'
35   is_foreign_key: 1
36   is_nullable: 1
37
38 Foreign key to the letters table
39
40 =head2 borrowernumber
41
42   data_type: 'integer'
43   is_foreign_key: 1
44   is_nullable: 1
45
46 =head2 subject
47
48   data_type: 'mediumtext'
49   is_nullable: 1
50
51 =head2 content
52
53   data_type: 'mediumtext'
54   is_nullable: 1
55
56 =head2 metadata
57
58   data_type: 'mediumtext'
59   is_nullable: 1
60
61 =head2 letter_code
62
63   data_type: 'varchar'
64   is_nullable: 1
65   size: 64
66
67 =head2 message_transport_type
68
69   data_type: 'varchar'
70   is_foreign_key: 1
71   is_nullable: 0
72   size: 20
73
74 =head2 status
75
76   data_type: 'enum'
77   default_value: 'pending'
78   extra: {list => ["sent","pending","failed","deleted"]}
79   is_nullable: 0
80
81 =head2 time_queued
82
83   data_type: 'timestamp'
84   datetime_undef_if_invalid: 1
85   is_nullable: 1
86
87 =head2 updated_on
88
89   data_type: 'timestamp'
90   datetime_undef_if_invalid: 1
91   default_value: current_timestamp
92   is_nullable: 0
93
94 =head2 to_address
95
96   data_type: 'longtext'
97   is_nullable: 1
98
99 =head2 from_address
100
101   data_type: 'longtext'
102   is_nullable: 1
103
104 =head2 reply_address
105
106   data_type: 'longtext'
107   is_nullable: 1
108
109 =head2 content_type
110
111   data_type: 'mediumtext'
112   is_nullable: 1
113
114 =head2 failure_code
115
116   data_type: 'mediumtext'
117   is_nullable: 1
118
119 =cut
120
121 __PACKAGE__->add_columns(
122   "message_id",
123   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
124   "letter_id",
125   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
126   "borrowernumber",
127   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
128   "subject",
129   { data_type => "mediumtext", is_nullable => 1 },
130   "content",
131   { data_type => "mediumtext", is_nullable => 1 },
132   "metadata",
133   { data_type => "mediumtext", is_nullable => 1 },
134   "letter_code",
135   { data_type => "varchar", is_nullable => 1, size => 64 },
136   "message_transport_type",
137   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 20 },
138   "status",
139   {
140     data_type => "enum",
141     default_value => "pending",
142     extra => { list => ["sent", "pending", "failed", "deleted"] },
143     is_nullable => 0,
144   },
145   "time_queued",
146   {
147     data_type => "timestamp",
148     datetime_undef_if_invalid => 1,
149     is_nullable => 1,
150   },
151   "updated_on",
152   {
153     data_type => "timestamp",
154     datetime_undef_if_invalid => 1,
155     default_value => \"current_timestamp",
156     is_nullable => 0,
157   },
158   "to_address",
159   { data_type => "longtext", is_nullable => 1 },
160   "from_address",
161   { data_type => "longtext", is_nullable => 1 },
162   "reply_address",
163   { data_type => "longtext", is_nullable => 1 },
164   "content_type",
165   { data_type => "mediumtext", is_nullable => 1 },
166   "failure_code",
167   { data_type => "mediumtext", is_nullable => 1 },
168 );
169
170 =head1 PRIMARY KEY
171
172 =over 4
173
174 =item * L</message_id>
175
176 =back
177
178 =cut
179
180 __PACKAGE__->set_primary_key("message_id");
181
182 =head1 RELATIONS
183
184 =head2 borrowernumber
185
186 Type: belongs_to
187
188 Related object: L<Koha::Schema::Result::Borrower>
189
190 =cut
191
192 __PACKAGE__->belongs_to(
193   "borrowernumber",
194   "Koha::Schema::Result::Borrower",
195   { borrowernumber => "borrowernumber" },
196   {
197     is_deferrable => 1,
198     join_type     => "LEFT",
199     on_delete     => "CASCADE",
200     on_update     => "CASCADE",
201   },
202 );
203
204 =head2 letter
205
206 Type: belongs_to
207
208 Related object: L<Koha::Schema::Result::Letter>
209
210 =cut
211
212 __PACKAGE__->belongs_to(
213   "letter",
214   "Koha::Schema::Result::Letter",
215   { id => "letter_id" },
216   {
217     is_deferrable => 1,
218     join_type     => "LEFT",
219     on_delete     => "SET NULL",
220     on_update     => "CASCADE",
221   },
222 );
223
224 =head2 message_transport_type
225
226 Type: belongs_to
227
228 Related object: L<Koha::Schema::Result::MessageTransportType>
229
230 =cut
231
232 __PACKAGE__->belongs_to(
233   "message_transport_type",
234   "Koha::Schema::Result::MessageTransportType",
235   { message_transport_type => "message_transport_type" },
236   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "CASCADE" },
237 );
238
239
240 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-10-18 12:50:14
241 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PX9JzZw0v134xuHqNbB0cA
242
243 sub koha_object_class {
244     'Koha::Notice::Message';
245 }
246 sub koha_objects_class {
247     'Koha::Notice::Messages';
248 }
249
250 1;