]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/MessageCorrespondent.pm
update for correspondent in maintainer
[debbugs.git] / Debbugs / DB / Result / MessageCorrespondent.pm
1 use utf8;
2 package Debbugs::DB::Result::MessageCorrespondent;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Debbugs::DB::Result::MessageCorrespondent - Linkage between correspondent and message
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 COMPONENTS LOADED
19
20 =over 4
21
22 =item * L<DBIx::Class::InflateColumn::DateTime>
23
24 =back
25
26 =cut
27
28 __PACKAGE__->load_components("InflateColumn::DateTime");
29
30 =head1 TABLE: C<message_correspondent>
31
32 =cut
33
34 __PACKAGE__->table("message_correspondent");
35
36 =head1 ACCESSORS
37
38 =head2 id
39
40   data_type: 'integer'
41   is_auto_increment: 1
42   is_nullable: 0
43   sequence: 'message_correspondent_id_seq'
44
45 =head2 message
46
47   data_type: 'integer'
48   is_foreign_key: 1
49   is_nullable: 0
50
51 Message id (matches message)
52
53 =head2 correspondent
54
55   data_type: 'integer'
56   is_foreign_key: 1
57   is_nullable: 0
58
59 Correspondent (matches correspondent)
60
61 =head2 correspondent_type
62
63   data_type: 'enum'
64   default_value: 'to'
65   extra: {custom_type_name => "message_correspondent_type",list => ["to","from","envfrom","cc"]}
66   is_nullable: 0
67
68 Type of correspondent (to, from, envfrom, cc, etc.)
69
70 =cut
71
72 __PACKAGE__->add_columns(
73   "id",
74   {
75     data_type         => "integer",
76     is_auto_increment => 1,
77     is_nullable       => 0,
78     sequence          => "message_correspondent_id_seq",
79   },
80   "message",
81   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
82   "correspondent",
83   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
84   "correspondent_type",
85   {
86     data_type => "enum",
87     default_value => "to",
88     extra => {
89       custom_type_name => "message_correspondent_type",
90       list => ["to", "from", "envfrom", "cc"],
91     },
92     is_nullable => 0,
93   },
94 );
95
96 =head1 PRIMARY KEY
97
98 =over 4
99
100 =item * L</id>
101
102 =back
103
104 =cut
105
106 __PACKAGE__->set_primary_key("id");
107
108 =head1 UNIQUE CONSTRAINTS
109
110 =head2 C<message_correspondent_message_correspondent_correspondent_t_idx>
111
112 =over 4
113
114 =item * L</message>
115
116 =item * L</correspondent>
117
118 =item * L</correspondent_type>
119
120 =back
121
122 =cut
123
124 __PACKAGE__->add_unique_constraint(
125   "message_correspondent_message_correspondent_correspondent_t_idx",
126   ["message", "correspondent", "correspondent_type"],
127 );
128
129 =head1 RELATIONS
130
131 =head2 correspondent
132
133 Type: belongs_to
134
135 Related object: L<Debbugs::DB::Result::Correspondent>
136
137 =cut
138
139 __PACKAGE__->belongs_to(
140   "correspondent",
141   "Debbugs::DB::Result::Correspondent",
142   { id => "correspondent" },
143   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
144 );
145
146 =head2 message
147
148 Type: belongs_to
149
150 Related object: L<Debbugs::DB::Result::Message>
151
152 =cut
153
154 __PACKAGE__->belongs_to(
155   "message",
156   "Debbugs::DB::Result::Message",
157   { id => "message" },
158   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
159 );
160
161
162 # Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-10-09 20:27:54
163 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:O+1oiAgBblG5UTsHpF4xRw
164
165
166 # You can replace this text with custom code or comments, and it will be preserved on regeneration
167 1;