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