Bug 8798: DBIx::Class base classes for all Koha tables
[koha_ffzg] / Koha / Schema / Result / MessageQueue.pm
1 package Koha::Schema::Result::MessageQueue;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::MessageQueue
15
16 =cut
17
18 __PACKAGE__->table("message_queue");
19
20 =head1 ACCESSORS
21
22 =head2 message_id
23
24   data_type: 'integer'
25   is_auto_increment: 1
26   is_nullable: 0
27
28 =head2 borrowernumber
29
30   data_type: 'integer'
31   is_foreign_key: 1
32   is_nullable: 1
33
34 =head2 subject
35
36   data_type: 'text'
37   is_nullable: 1
38
39 =head2 content
40
41   data_type: 'text'
42   is_nullable: 1
43
44 =head2 metadata
45
46   data_type: 'text'
47   is_nullable: 1
48
49 =head2 letter_code
50
51   data_type: 'varchar'
52   is_nullable: 1
53   size: 64
54
55 =head2 message_transport_type
56
57   data_type: 'varchar'
58   is_foreign_key: 1
59   is_nullable: 0
60   size: 20
61
62 =head2 status
63
64   data_type: 'enum'
65   default_value: 'pending'
66   extra: {list => ["sent","pending","failed","deleted"]}
67   is_nullable: 0
68
69 =head2 time_queued
70
71   data_type: 'timestamp'
72   default_value: current_timestamp
73   is_nullable: 0
74
75 =head2 to_address
76
77   data_type: 'mediumtext'
78   is_nullable: 1
79
80 =head2 from_address
81
82   data_type: 'mediumtext'
83   is_nullable: 1
84
85 =head2 content_type
86
87   data_type: 'text'
88   is_nullable: 1
89
90 =cut
91
92 __PACKAGE__->add_columns(
93   "message_id",
94   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
95   "borrowernumber",
96   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
97   "subject",
98   { data_type => "text", is_nullable => 1 },
99   "content",
100   { data_type => "text", is_nullable => 1 },
101   "metadata",
102   { data_type => "text", is_nullable => 1 },
103   "letter_code",
104   { data_type => "varchar", is_nullable => 1, size => 64 },
105   "message_transport_type",
106   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 20 },
107   "status",
108   {
109     data_type => "enum",
110     default_value => "pending",
111     extra => { list => ["sent", "pending", "failed", "deleted"] },
112     is_nullable => 0,
113   },
114   "time_queued",
115   {
116     data_type     => "timestamp",
117     default_value => \"current_timestamp",
118     is_nullable   => 0,
119   },
120   "to_address",
121   { data_type => "mediumtext", is_nullable => 1 },
122   "from_address",
123   { data_type => "mediumtext", is_nullable => 1 },
124   "content_type",
125   { data_type => "text", is_nullable => 1 },
126 );
127
128 =head1 RELATIONS
129
130 =head2 borrowernumber
131
132 Type: belongs_to
133
134 Related object: L<Koha::Schema::Result::Borrower>
135
136 =cut
137
138 __PACKAGE__->belongs_to(
139   "borrowernumber",
140   "Koha::Schema::Result::Borrower",
141   { borrowernumber => "borrowernumber" },
142   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
143 );
144
145 =head2 message_transport_type
146
147 Type: belongs_to
148
149 Related object: L<Koha::Schema::Result::MessageTransportType>
150
151 =cut
152
153 __PACKAGE__->belongs_to(
154   "message_transport_type",
155   "Koha::Schema::Result::MessageTransportType",
156   { message_transport_type => "message_transport_type" },
157   { on_delete => "CASCADE", on_update => "CASCADE" },
158 );
159
160
161 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
162 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kcpiO2MjqoETlnMyCBhP6Q
163
164
165 # You can replace this text with custom content, and it will be preserved on regeneration
166 1;