]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/BugUserTag.pm
add usertag support to the database
[debbugs.git] / Debbugs / DB / Result / BugUserTag.pm
1 use utf8;
2 package Debbugs::DB::Result::BugUserTag;
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::BugUserTag - Bug <-> user tag mapping
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<bug_user_tag>
33
34 =cut
35
36 __PACKAGE__->table("bug_user_tag");
37
38 =head1 ACCESSORS
39
40 =head2 id
41
42   data_type: 'integer'
43   is_auto_increment: 1
44   is_nullable: 0
45   sequence: 'bug_user_tag_id_seq'
46
47 =head2 bug
48
49   data_type: 'integer'
50   is_foreign_key: 1
51   is_nullable: 0
52
53 Bug id (matches bug)
54
55 =head2 user_tag
56
57   data_type: 'integer'
58   is_foreign_key: 1
59   is_nullable: 0
60
61 =cut
62
63 __PACKAGE__->add_columns(
64   "id",
65   {
66     data_type         => "integer",
67     is_auto_increment => 1,
68     is_nullable       => 0,
69     sequence          => "bug_user_tag_id_seq",
70   },
71   "bug",
72   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
73   "user_tag",
74   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
75 );
76
77 =head1 PRIMARY KEY
78
79 =over 4
80
81 =item * L</id>
82
83 =back
84
85 =cut
86
87 __PACKAGE__->set_primary_key("id");
88
89 =head1 UNIQUE CONSTRAINTS
90
91 =head2 C<bug_user_tag_bug_tag>
92
93 =over 4
94
95 =item * L</bug>
96
97 =item * L</user_tag>
98
99 =back
100
101 =cut
102
103 __PACKAGE__->add_unique_constraint("bug_user_tag_bug_tag", ["bug", "user_tag"]);
104
105 =head1 RELATIONS
106
107 =head2 bug
108
109 Type: belongs_to
110
111 Related object: L<Debbugs::DB::Result::Bug>
112
113 =cut
114
115 __PACKAGE__->belongs_to(
116   "bug",
117   "Debbugs::DB::Result::Bug",
118   { id => "bug" },
119   { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
120 );
121
122 =head2 user_tag
123
124 Type: belongs_to
125
126 Related object: L<Debbugs::DB::Result::UserTag>
127
128 =cut
129
130 __PACKAGE__->belongs_to(
131   "user_tag",
132   "Debbugs::DB::Result::UserTag",
133   { id => "user_tag" },
134   { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
135 );
136
137
138 # Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-09-24 14:51:07
139 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bczKcbFkWt98BDvXLdhpcg
140
141
142 # You can replace this text with custom code or comments, and it will be preserved on regeneration
143 1;