|
| 1 | +use utf8; |
| 2 | +package BlogDB::DB::Result::PendingBlog; |
| 3 | + |
| 4 | +# Created by DBIx::Class::Schema::Loader |
| 5 | +# DO NOT MODIFY THE FIRST PART OF THIS FILE |
| 6 | + |
| 7 | +=head1 NAME |
| 8 | +
|
| 9 | +BlogDB::DB::Result::PendingBlog |
| 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<pending_blog> |
| 33 | +
|
| 34 | +=cut |
| 35 | + |
| 36 | +__PACKAGE__->table("pending_blog"); |
| 37 | + |
| 38 | +=head1 ACCESSORS |
| 39 | +
|
| 40 | +=head2 id |
| 41 | +
|
| 42 | + data_type: 'integer' |
| 43 | + is_auto_increment: 1 |
| 44 | + is_nullable: 0 |
| 45 | + sequence: 'pending_blog_id_seq' |
| 46 | +
|
| 47 | +=head2 url |
| 48 | +
|
| 49 | + data_type: 'text' |
| 50 | + is_nullable: 0 |
| 51 | +
|
| 52 | +=head2 img_url |
| 53 | +
|
| 54 | + data_type: 'text' |
| 55 | + is_nullable: 1 |
| 56 | +
|
| 57 | +=head2 rss_url |
| 58 | +
|
| 59 | + data_type: 'text' |
| 60 | + is_nullable: 1 |
| 61 | +
|
| 62 | +=head2 title |
| 63 | +
|
| 64 | + data_type: 'text' |
| 65 | + is_nullable: 1 |
| 66 | +
|
| 67 | +=head2 tagline |
| 68 | +
|
| 69 | + data_type: 'text' |
| 70 | + is_nullable: 1 |
| 71 | +
|
| 72 | +=head2 about |
| 73 | +
|
| 74 | + data_type: 'text' |
| 75 | + is_nullable: 1 |
| 76 | +
|
| 77 | +=head2 last_updated |
| 78 | +
|
| 79 | + data_type: 'timestamp with time zone' |
| 80 | + is_nullable: 1 |
| 81 | +
|
| 82 | +=head2 is_published |
| 83 | +
|
| 84 | + data_type: 'boolean' |
| 85 | + default_value: true |
| 86 | + is_nullable: 0 |
| 87 | +
|
| 88 | +=head2 is_adult |
| 89 | +
|
| 90 | + data_type: 'boolean' |
| 91 | + default_value: false |
| 92 | + is_nullable: 0 |
| 93 | +
|
| 94 | +=head2 submitter_id |
| 95 | +
|
| 96 | + data_type: 'integer' |
| 97 | + is_foreign_key: 1 |
| 98 | + is_nullable: 1 |
| 99 | +
|
| 100 | +=head2 edit_token |
| 101 | +
|
| 102 | + data_type: 'text' |
| 103 | + is_nullable: 0 |
| 104 | +
|
| 105 | +=head2 state |
| 106 | +
|
| 107 | + data_type: 'text' |
| 108 | + is_nullable: 0 |
| 109 | +
|
| 110 | +=head2 created_at |
| 111 | +
|
| 112 | + data_type: 'timestamp with time zone' |
| 113 | + default_value: current_timestamp |
| 114 | + is_nullable: 0 |
| 115 | +
|
| 116 | +=cut |
| 117 | + |
| 118 | +__PACKAGE__->add_columns( |
| 119 | + "id", |
| 120 | + { |
| 121 | + data_type => "integer", |
| 122 | + is_auto_increment => 1, |
| 123 | + is_nullable => 0, |
| 124 | + sequence => "pending_blog_id_seq", |
| 125 | + }, |
| 126 | + "url", |
| 127 | + { data_type => "text", is_nullable => 0 }, |
| 128 | + "img_url", |
| 129 | + { data_type => "text", is_nullable => 1 }, |
| 130 | + "rss_url", |
| 131 | + { data_type => "text", is_nullable => 1 }, |
| 132 | + "title", |
| 133 | + { data_type => "text", is_nullable => 1 }, |
| 134 | + "tagline", |
| 135 | + { data_type => "text", is_nullable => 1 }, |
| 136 | + "about", |
| 137 | + { data_type => "text", is_nullable => 1 }, |
| 138 | + "last_updated", |
| 139 | + { data_type => "timestamp with time zone", is_nullable => 1 }, |
| 140 | + "is_published", |
| 141 | + { data_type => "boolean", default_value => \"true", is_nullable => 0 }, |
| 142 | + "is_adult", |
| 143 | + { data_type => "boolean", default_value => \"false", is_nullable => 0 }, |
| 144 | + "submitter_id", |
| 145 | + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
| 146 | + "edit_token", |
| 147 | + { data_type => "text", is_nullable => 0 }, |
| 148 | + "state", |
| 149 | + { data_type => "text", is_nullable => 0 }, |
| 150 | + "created_at", |
| 151 | + { |
| 152 | + data_type => "timestamp with time zone", |
| 153 | + default_value => \"current_timestamp", |
| 154 | + is_nullable => 0, |
| 155 | + }, |
| 156 | +); |
| 157 | + |
| 158 | +=head1 PRIMARY KEY |
| 159 | +
|
| 160 | +=over 4 |
| 161 | +
|
| 162 | +=item * L</id> |
| 163 | +
|
| 164 | +=back |
| 165 | +
|
| 166 | +=cut |
| 167 | + |
| 168 | +__PACKAGE__->set_primary_key("id"); |
| 169 | + |
| 170 | +=head1 UNIQUE CONSTRAINTS |
| 171 | +
|
| 172 | +=head2 C<pending_blog_url_key> |
| 173 | +
|
| 174 | +=over 4 |
| 175 | +
|
| 176 | +=item * L</url> |
| 177 | +
|
| 178 | +=back |
| 179 | +
|
| 180 | +=cut |
| 181 | + |
| 182 | +__PACKAGE__->add_unique_constraint("pending_blog_url_key", ["url"]); |
| 183 | + |
| 184 | +=head1 RELATIONS |
| 185 | +
|
| 186 | +=head2 submitter |
| 187 | +
|
| 188 | +Type: belongs_to |
| 189 | +
|
| 190 | +Related object: L<BlogDB::DB::Result::Person> |
| 191 | +
|
| 192 | +=cut |
| 193 | + |
| 194 | +__PACKAGE__->belongs_to( |
| 195 | + "submitter", |
| 196 | + "BlogDB::DB::Result::Person", |
| 197 | + { id => "submitter_id" }, |
| 198 | + { |
| 199 | + is_deferrable => 0, |
| 200 | + join_type => "LEFT", |
| 201 | + on_delete => "NO ACTION", |
| 202 | + on_update => "NO ACTION", |
| 203 | + }, |
| 204 | +); |
| 205 | + |
| 206 | + |
| 207 | +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-11-05 14:49:36 |
| 208 | +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4Ms5W+IBBcccbKjRTi1z8A |
| 209 | + |
| 210 | + |
| 211 | +# You can replace this text with custom code or comments, and it will be preserved on regeneration |
| 212 | +1; |
0 commit comments