Skip to content

Commit 1181772

Browse files
committed
Regenerate DB classes.
1 parent 12cb88a commit 1181772

File tree

6 files changed

+755
-5
lines changed

6 files changed

+755
-5
lines changed

Database/lib/OpenNewsWire/DB/Result/Message.pm

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,27 @@ __PACKAGE__->table("message");
5050
is_foreign_key: 1
5151
is_nullable: 0
5252
53+
=head2 parent_id
54+
55+
data_type: 'integer'
56+
is_foreign_key: 1
57+
is_nullable: 1
58+
59+
=head2 title
60+
61+
data_type: 'text'
62+
is_nullable: 1
63+
5364
=head2 content
5465
5566
data_type: 'text'
5667
is_nullable: 0
5768
69+
=head2 url
70+
71+
data_type: 'text'
72+
is_nullable: 1
73+
5874
=head2 created_at
5975
6076
data_type: 'timestamp with time zone'
@@ -73,8 +89,14 @@ __PACKAGE__->add_columns(
7389
},
7490
"author_id",
7591
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
92+
"parent_id",
93+
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
94+
"title",
95+
{ data_type => "text", is_nullable => 1 },
7696
"content",
7797
{ data_type => "text", is_nullable => 0 },
98+
"url",
99+
{ data_type => "text", is_nullable => 1 },
78100
"created_at",
79101
{
80102
data_type => "timestamp with time zone",
@@ -112,6 +134,21 @@ __PACKAGE__->belongs_to(
112134
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
113135
);
114136

137+
=head2 messages
138+
139+
Type: has_many
140+
141+
Related object: L<OpenNewsWire::DB::Result::Message>
142+
143+
=cut
144+
145+
__PACKAGE__->has_many(
146+
"messages",
147+
"OpenNewsWire::DB::Result::Message",
148+
{ "foreign.parent_id" => "self.id" },
149+
{ cascade_copy => 0, cascade_delete => 0 },
150+
);
151+
115152
=head2 messages_read
116153
117154
Type: has_many
@@ -127,9 +164,44 @@ __PACKAGE__->has_many(
127164
{ cascade_copy => 0, cascade_delete => 0 },
128165
);
129166

167+
=head2 parent
168+
169+
Type: belongs_to
170+
171+
Related object: L<OpenNewsWire::DB::Result::Message>
172+
173+
=cut
174+
175+
__PACKAGE__->belongs_to(
176+
"parent",
177+
"OpenNewsWire::DB::Result::Message",
178+
{ id => "parent_id" },
179+
{
180+
is_deferrable => 0,
181+
join_type => "LEFT",
182+
on_delete => "NO ACTION",
183+
on_update => "NO ACTION",
184+
},
185+
);
186+
187+
=head2 topic_channel_messages
188+
189+
Type: has_many
190+
191+
Related object: L<OpenNewsWire::DB::Result::TopicChannelMessage>
192+
193+
=cut
194+
195+
__PACKAGE__->has_many(
196+
"topic_channel_messages",
197+
"OpenNewsWire::DB::Result::TopicChannelMessage",
198+
{ "foreign.message_id" => "self.id" },
199+
{ cascade_copy => 0, cascade_delete => 0 },
200+
);
201+
130202

131-
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-06 15:34:11
132-
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RLSsmBZbN7R2vFFjdHsWyg
203+
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-08 14:30:18
204+
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UqCL3m0DEMgcjDA73SZk2w
133205

134206

135207

Database/lib/OpenNewsWire/DB/Result/Person.pm

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,54 @@ __PACKAGE__->has_many(
163163
{ cascade_copy => 0, cascade_delete => 0 },
164164
);
165165

166+
=head2 person_settings
166167
167-
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-06 15:34:11
168-
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4xVWqi0rjeL+Z+/qvVdSdg
168+
Type: has_many
169+
170+
Related object: L<OpenNewsWire::DB::Result::PersonSetting>
171+
172+
=cut
173+
174+
__PACKAGE__->has_many(
175+
"person_settings",
176+
"OpenNewsWire::DB::Result::PersonSetting",
177+
{ "foreign.person_id" => "self.id" },
178+
{ cascade_copy => 0, cascade_delete => 0 },
179+
);
180+
181+
=head2 topic_channel_messages
182+
183+
Type: has_many
184+
185+
Related object: L<OpenNewsWire::DB::Result::TopicChannelMessage>
186+
187+
=cut
188+
189+
__PACKAGE__->has_many(
190+
"topic_channel_messages",
191+
"OpenNewsWire::DB::Result::TopicChannelMessage",
192+
{ "foreign.author_id" => "self.id" },
193+
{ cascade_copy => 0, cascade_delete => 0 },
194+
);
195+
196+
=head2 topic_channels
197+
198+
Type: has_many
199+
200+
Related object: L<OpenNewsWire::DB::Result::TopicChannel>
201+
202+
=cut
203+
204+
__PACKAGE__->has_many(
205+
"topic_channels",
206+
"OpenNewsWire::DB::Result::TopicChannel",
207+
{ "foreign.owner_id" => "self.id" },
208+
{ cascade_copy => 0, cascade_delete => 0 },
209+
);
169210

170211

212+
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-08 14:30:18
213+
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:irY/GBQ/r8VIJXqXiJpL2Q
171214

172215

173-
# You can replace this text with custom code or comments, and it will be preserved on regeneration
174216
1;
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
use utf8;
2+
package OpenNewsWire::DB::Result::PersonSetting;
3+
4+
# Created by DBIx::Class::Schema::Loader
5+
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6+
7+
=head1 NAME
8+
9+
OpenNewsWire::DB::Result::PersonSetting
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::InflateColumn::Serializer>
25+
26+
=back
27+
28+
=cut
29+
30+
__PACKAGE__->load_components("InflateColumn::DateTime", "InflateColumn::Serializer");
31+
32+
=head1 TABLE: C<person_settings>
33+
34+
=cut
35+
36+
__PACKAGE__->table("person_settings");
37+
38+
=head1 ACCESSORS
39+
40+
=head2 id
41+
42+
data_type: 'integer'
43+
is_auto_increment: 1
44+
is_nullable: 0
45+
sequence: 'person_settings_id_seq'
46+
47+
=head2 person_id
48+
49+
data_type: 'integer'
50+
is_foreign_key: 1
51+
is_nullable: 0
52+
53+
=head2 name
54+
55+
data_type: 'text'
56+
is_nullable: 0
57+
58+
=head2 value
59+
60+
data_type: 'json'
61+
default_value: '{}'
62+
is_nullable: 0
63+
serializer_class: 'JSON'
64+
65+
=head2 created_at
66+
67+
data_type: 'timestamp with time zone'
68+
default_value: current_timestamp
69+
is_nullable: 0
70+
71+
=cut
72+
73+
__PACKAGE__->add_columns(
74+
"id",
75+
{
76+
data_type => "integer",
77+
is_auto_increment => 1,
78+
is_nullable => 0,
79+
sequence => "person_settings_id_seq",
80+
},
81+
"person_id",
82+
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
83+
"name",
84+
{ data_type => "text", is_nullable => 0 },
85+
"value",
86+
{
87+
data_type => "json",
88+
default_value => "{}",
89+
is_nullable => 0,
90+
serializer_class => "JSON",
91+
},
92+
"created_at",
93+
{
94+
data_type => "timestamp with time zone",
95+
default_value => \"current_timestamp",
96+
is_nullable => 0,
97+
},
98+
);
99+
100+
=head1 PRIMARY KEY
101+
102+
=over 4
103+
104+
=item * L</id>
105+
106+
=back
107+
108+
=cut
109+
110+
__PACKAGE__->set_primary_key("id");
111+
112+
=head1 UNIQUE CONSTRAINTS
113+
114+
=head2 C<unq_person_id_name>
115+
116+
=over 4
117+
118+
=item * L</person_id>
119+
120+
=item * L</name>
121+
122+
=back
123+
124+
=cut
125+
126+
__PACKAGE__->add_unique_constraint("unq_person_id_name", ["person_id", "name"]);
127+
128+
=head1 RELATIONS
129+
130+
=head2 person
131+
132+
Type: belongs_to
133+
134+
Related object: L<OpenNewsWire::DB::Result::Person>
135+
136+
=cut
137+
138+
__PACKAGE__->belongs_to(
139+
"person",
140+
"OpenNewsWire::DB::Result::Person",
141+
{ id => "person_id" },
142+
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
143+
);
144+
145+
146+
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-08 14:30:18
147+
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/hU+sStNoMkYTG43I6eSJg
148+
149+
150+
# You can replace this text with custom code or comments, and it will be preserved on regeneration
151+
1;

0 commit comments

Comments
 (0)