]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/MessageRef.pm
5f39e432512bac669519dea3ad4f472fb8aa9a48
[debbugs.git] / Debbugs / DB / Result / MessageRef.pm
1 use utf8;
2 package Debbugs::DB::Result::MessageRef;
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::MessageRef - Message references
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_refs>
31
32 =cut
33
34 __PACKAGE__->table("message_refs");
35
36 =head1 ACCESSORS
37
38 =head2 message
39
40   data_type: 'integer'
41   is_foreign_key: 1
42   is_nullable: 0
43
44 Message id (matches message)
45
46 =head2 refs
47
48   data_type: 'integer'
49   is_foreign_key: 1
50   is_nullable: 0
51
52 Reference id (matches message)
53
54 =head2 inferred
55
56   data_type: 'boolean'
57   default_value: false
58   is_nullable: 1
59
60 TRUE if this message reference was reconstructed; primarily of use for messages which lack In-Reply-To: or References: headers
61
62 =head2 primary_ref
63
64   data_type: 'boolean'
65   default_value: false
66   is_nullable: 1
67
68 TRUE if this message->ref came from In-Reply-To: or similar.
69
70 =cut
71
72 __PACKAGE__->add_columns(
73   "message",
74   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
75   "refs",
76   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
77   "inferred",
78   { data_type => "boolean", default_value => \"false", is_nullable => 1 },
79   "primary_ref",
80   { data_type => "boolean", default_value => \"false", is_nullable => 1 },
81 );
82
83 =head1 UNIQUE CONSTRAINTS
84
85 =head2 C<message_refs_message_refs_idx>
86
87 =over 4
88
89 =item * L</message>
90
91 =item * L</refs>
92
93 =back
94
95 =cut
96
97 __PACKAGE__->add_unique_constraint("message_refs_message_refs_idx", ["message", "refs"]);
98
99 =head1 RELATIONS
100
101 =head2 message
102
103 Type: belongs_to
104
105 Related object: L<Debbugs::DB::Result::Message>
106
107 =cut
108
109 __PACKAGE__->belongs_to(
110   "message",
111   "Debbugs::DB::Result::Message",
112   { id => "message" },
113   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
114 );
115
116 =head2 ref
117
118 Type: belongs_to
119
120 Related object: L<Debbugs::DB::Result::Message>
121
122 =cut
123
124 __PACKAGE__->belongs_to(
125   "ref",
126   "Debbugs::DB::Result::Message",
127   { id => "refs" },
128   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
129 );
130
131
132 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-01-22 21:35:43
133 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qPL3EsH3iVrcwJKRNVzTEQ
134
135
136 # You can replace this text with custom code or comments, and it will be preserved on regeneration
137 1;