]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/DB/Result/CorrespondentFullName.pm
update to new schema which includes many_to_many relationships
[debbugs.git] / Debbugs / DB / Result / CorrespondentFullName.pm
1 use utf8;
2 package Debbugs::DB::Result::CorrespondentFullName;
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::CorrespondentFullName - Full names of BTS correspondents
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<correspondent_full_name>
33
34 =cut
35
36 __PACKAGE__->table("correspondent_full_name");
37
38 =head1 ACCESSORS
39
40 =head2 correspondent
41
42   data_type: 'integer'
43   is_foreign_key: 1
44   is_nullable: 0
45
46 Correspondent ID (matches correspondent)
47
48 =head2 full_name
49
50   data_type: 'text'
51   is_nullable: 0
52
53 Correspondent full name (includes e-mail address)
54
55 =head2 last_seen
56
57   data_type: 'timestamp'
58   default_value: current_timestamp
59   is_nullable: 0
60   original: {default_value => \"now()"}
61
62 =cut
63
64 __PACKAGE__->add_columns(
65   "correspondent",
66   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
67   "full_name",
68   { data_type => "text", is_nullable => 0 },
69   "last_seen",
70   {
71     data_type     => "timestamp",
72     default_value => \"current_timestamp",
73     is_nullable   => 0,
74     original      => { default_value => \"now()" },
75   },
76 );
77
78 =head1 UNIQUE CONSTRAINTS
79
80 =head2 C<correspondent_full_name_correspondent_full_name_idx>
81
82 =over 4
83
84 =item * L</correspondent>
85
86 =item * L</full_name>
87
88 =back
89
90 =cut
91
92 __PACKAGE__->add_unique_constraint(
93   "correspondent_full_name_correspondent_full_name_idx",
94   ["correspondent", "full_name"],
95 );
96
97 =head1 RELATIONS
98
99 =head2 correspondent
100
101 Type: belongs_to
102
103 Related object: L<Debbugs::DB::Result::Correspondent>
104
105 =cut
106
107 __PACKAGE__->belongs_to(
108   "correspondent",
109   "Debbugs::DB::Result::Correspondent",
110   { id => "correspondent" },
111   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
112 );
113
114
115 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-04 10:59:03
116 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2Ac8mrDV2IsE/11YsYoqQQ
117
118
119 # You can replace this text with custom code or comments, and it will be preserved on regeneration
120 1;