parent
c0e3bdb2ff
commit
c42c947a88
4 changed files with 524 additions and 2 deletions
@ -0,0 +1,221 @@ |
||||
use utf8; |
||||
package MJB::DB::Result::Blog; |
||||
|
||||
# Created by DBIx::Class::Schema::Loader |
||||
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
||||
|
||||
=head1 NAME |
||||
|
||||
MJB::DB::Result::Blog |
||||
|
||||
=cut |
||||
|
||||
use strict; |
||||
use warnings; |
||||
|
||||
use base 'DBIx::Class::Core'; |
||||
|
||||
=head1 COMPONENTS LOADED |
||||
|
||||
=over 4 |
||||
|
||||
=item * L<DBIx::Class::InflateColumn::DateTime> |
||||
|
||||
=item * L<DBIx::Class::InflateColumn::Serializer> |
||||
|
||||
=back |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->load_components("InflateColumn::DateTime", "InflateColumn::Serializer"); |
||||
|
||||
=head1 TABLE: C<blog> |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->table("blog"); |
||||
|
||||
=head1 ACCESSORS |
||||
|
||||
=head2 id |
||||
|
||||
data_type: 'integer' |
||||
is_auto_increment: 1 |
||||
is_nullable: 0 |
||||
sequence: 'blog_id_seq' |
||||
|
||||
=head2 person_id |
||||
|
||||
data_type: 'integer' |
||||
is_foreign_key: 1 |
||||
is_nullable: 0 |
||||
|
||||
=head2 domain_id |
||||
|
||||
data_type: 'integer' |
||||
is_foreign_key: 1 |
||||
is_nullable: 1 |
||||
|
||||
=head2 max_static_file_count |
||||
|
||||
data_type: 'integer' |
||||
default_value: 100 |
||||
is_nullable: 0 |
||||
|
||||
=head2 max_static_file_size |
||||
|
||||
data_type: 'integer' |
||||
default_value: 5 |
||||
is_nullable: 0 |
||||
|
||||
=head2 max_static_webroot_size |
||||
|
||||
data_type: 'integer' |
||||
default_value: 50 |
||||
is_nullable: 0 |
||||
|
||||
=head2 minutes_wait_after_build |
||||
|
||||
data_type: 'integer' |
||||
default_value: 10 |
||||
is_nullable: 0 |
||||
|
||||
=head2 builds_per_hour |
||||
|
||||
data_type: 'integer' |
||||
default_value: 3 |
||||
is_nullable: 0 |
||||
|
||||
=head2 builds_per_day |
||||
|
||||
data_type: 'integer' |
||||
default_value: 12 |
||||
is_nullable: 0 |
||||
|
||||
=head2 build_priority |
||||
|
||||
data_type: 'integer' |
||||
default_value: 1 |
||||
is_nullable: 0 |
||||
|
||||
=head2 is_enabled |
||||
|
||||
data_type: 'boolean' |
||||
default_value: true |
||||
is_nullable: 0 |
||||
|
||||
=head2 created_at |
||||
|
||||
data_type: 'timestamp with time zone' |
||||
default_value: current_timestamp |
||||
is_nullable: 0 |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->add_columns( |
||||
"id", |
||||
{ |
||||
data_type => "integer", |
||||
is_auto_increment => 1, |
||||
is_nullable => 0, |
||||
sequence => "blog_id_seq", |
||||
}, |
||||
"person_id", |
||||
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
||||
"domain_id", |
||||
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
||||
"max_static_file_count", |
||||
{ data_type => "integer", default_value => 100, is_nullable => 0 }, |
||||
"max_static_file_size", |
||||
{ data_type => "integer", default_value => 5, is_nullable => 0 }, |
||||
"max_static_webroot_size", |
||||
{ data_type => "integer", default_value => 50, is_nullable => 0 }, |
||||
"minutes_wait_after_build", |
||||
{ data_type => "integer", default_value => 10, is_nullable => 0 }, |
||||
"builds_per_hour", |
||||
{ data_type => "integer", default_value => 3, is_nullable => 0 }, |
||||
"builds_per_day", |
||||
{ data_type => "integer", default_value => 12, is_nullable => 0 }, |
||||
"build_priority", |
||||
{ data_type => "integer", default_value => 1, is_nullable => 0 }, |
||||
"is_enabled", |
||||
{ data_type => "boolean", default_value => \"true", is_nullable => 0 }, |
||||
"created_at", |
||||
{ |
||||
data_type => "timestamp with time zone", |
||||
default_value => \"current_timestamp", |
||||
is_nullable => 0, |
||||
}, |
||||
); |
||||
|
||||
=head1 PRIMARY KEY |
||||
|
||||
=over 4 |
||||
|
||||
=item * L</id> |
||||
|
||||
=back |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->set_primary_key("id"); |
||||
|
||||
=head1 RELATIONS |
||||
|
||||
=head2 builds |
||||
|
||||
Type: has_many |
||||
|
||||
Related object: L<MJB::DB::Result::Build> |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->has_many( |
||||
"builds", |
||||
"MJB::DB::Result::Build", |
||||
{ "foreign.blog_id" => "self.id" }, |
||||
{ cascade_copy => 0, cascade_delete => 0 }, |
||||
); |
||||
|
||||
=head2 domain |
||||
|
||||
Type: belongs_to |
||||
|
||||
Related object: L<MJB::DB::Result::Domain> |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->belongs_to( |
||||
"domain", |
||||
"MJB::DB::Result::Domain", |
||||
{ id => "domain_id" }, |
||||
{ |
||||
is_deferrable => 0, |
||||
join_type => "LEFT", |
||||
on_delete => "NO ACTION", |
||||
on_update => "NO ACTION", |
||||
}, |
||||
); |
||||
|
||||
=head2 person |
||||
|
||||
Type: belongs_to |
||||
|
||||
Related object: L<MJB::DB::Result::Person> |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->belongs_to( |
||||
"person", |
||||
"MJB::DB::Result::Person", |
||||
{ id => "person_id" }, |
||||
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, |
||||
); |
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-07 05:14:59 |
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nXEEcu7TDNPHpSGNnle5Dw |
||||
|
||||
|
||||
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
||||
1; |
||||
@ -0,0 +1,121 @@ |
||||
use utf8; |
||||
package MJB::DB::Result::Build; |
||||
|
||||
# Created by DBIx::Class::Schema::Loader |
||||
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
||||
|
||||
=head1 NAME |
||||
|
||||
MJB::DB::Result::Build |
||||
|
||||
=cut |
||||
|
||||
use strict; |
||||
use warnings; |
||||
|
||||
use base 'DBIx::Class::Core'; |
||||
|
||||
=head1 COMPONENTS LOADED |
||||
|
||||
=over 4 |
||||
|
||||
=item * L<DBIx::Class::InflateColumn::DateTime> |
||||
|
||||
=item * L<DBIx::Class::InflateColumn::Serializer> |
||||
|
||||
=back |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->load_components("InflateColumn::DateTime", "InflateColumn::Serializer"); |
||||
|
||||
=head1 TABLE: C<build> |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->table("build"); |
||||
|
||||
=head1 ACCESSORS |
||||
|
||||
=head2 id |
||||
|
||||
data_type: 'integer' |
||||
is_auto_increment: 1 |
||||
is_nullable: 0 |
||||
sequence: 'build_id_seq' |
||||
|
||||
=head2 blog_id |
||||
|
||||
data_type: 'integer' |
||||
is_foreign_key: 1 |
||||
is_nullable: 0 |
||||
|
||||
=head2 job_id |
||||
|
||||
data_type: 'integer' |
||||
is_nullable: 0 |
||||
|
||||
=head2 created_at |
||||
|
||||
data_type: 'timestamp with time zone' |
||||
default_value: current_timestamp |
||||
is_nullable: 0 |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->add_columns( |
||||
"id", |
||||
{ |
||||
data_type => "integer", |
||||
is_auto_increment => 1, |
||||
is_nullable => 0, |
||||
sequence => "build_id_seq", |
||||
}, |
||||
"blog_id", |
||||
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
||||
"job_id", |
||||
{ data_type => "integer", is_nullable => 0 }, |
||||
"created_at", |
||||
{ |
||||
data_type => "timestamp with time zone", |
||||
default_value => \"current_timestamp", |
||||
is_nullable => 0, |
||||
}, |
||||
); |
||||
|
||||
=head1 PRIMARY KEY |
||||
|
||||
=over 4 |
||||
|
||||
=item * L</id> |
||||
|
||||
=back |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->set_primary_key("id"); |
||||
|
||||
=head1 RELATIONS |
||||
|
||||
=head2 blog |
||||
|
||||
Type: belongs_to |
||||
|
||||
Related object: L<MJB::DB::Result::Blog> |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->belongs_to( |
||||
"blog", |
||||
"MJB::DB::Result::Blog", |
||||
{ id => "blog_id" }, |
||||
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, |
||||
); |
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-07 05:14:59 |
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2Yfx2//Fg5KBBNXVnq6FMA |
||||
|
||||
|
||||
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
||||
1; |
||||
@ -0,0 +1,150 @@ |
||||
use utf8; |
||||
package MJB::DB::Result::Domain; |
||||
|
||||
# Created by DBIx::Class::Schema::Loader |
||||
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
||||
|
||||
=head1 NAME |
||||
|
||||
MJB::DB::Result::Domain |
||||
|
||||
=cut |
||||
|
||||
use strict; |
||||
use warnings; |
||||
|
||||
use base 'DBIx::Class::Core'; |
||||
|
||||
=head1 COMPONENTS LOADED |
||||
|
||||
=over 4 |
||||
|
||||
=item * L<DBIx::Class::InflateColumn::DateTime> |
||||
|
||||
=item * L<DBIx::Class::InflateColumn::Serializer> |
||||
|
||||
=back |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->load_components("InflateColumn::DateTime", "InflateColumn::Serializer"); |
||||
|
||||
=head1 TABLE: C<domain> |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->table("domain"); |
||||
|
||||
=head1 ACCESSORS |
||||
|
||||
=head2 id |
||||
|
||||
data_type: 'integer' |
||||
is_auto_increment: 1 |
||||
is_nullable: 0 |
||||
sequence: 'domain_id_seq' |
||||
|
||||
=head2 person_id |
||||
|
||||
data_type: 'integer' |
||||
is_foreign_key: 1 |
||||
is_nullable: 0 |
||||
|
||||
=head2 name |
||||
|
||||
data_type: 'citext' |
||||
is_nullable: 0 |
||||
|
||||
=head2 created_at |
||||
|
||||
data_type: 'timestamp with time zone' |
||||
default_value: current_timestamp |
||||
is_nullable: 0 |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->add_columns( |
||||
"id", |
||||
{ |
||||
data_type => "integer", |
||||
is_auto_increment => 1, |
||||
is_nullable => 0, |
||||
sequence => "domain_id_seq", |
||||
}, |
||||
"person_id", |
||||
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
||||
"name", |
||||
{ data_type => "citext", is_nullable => 0 }, |
||||
"created_at", |
||||
{ |
||||
data_type => "timestamp with time zone", |
||||
default_value => \"current_timestamp", |
||||
is_nullable => 0, |
||||
}, |
||||
); |
||||
|
||||
=head1 PRIMARY KEY |
||||
|
||||
=over 4 |
||||
|
||||
=item * L</id> |
||||
|
||||
=back |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->set_primary_key("id"); |
||||
|
||||
=head1 UNIQUE CONSTRAINTS |
||||
|
||||
=head2 C<domain_name_key> |
||||
|
||||
=over 4 |
||||
|
||||
=item * L</name> |
||||
|
||||
=back |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->add_unique_constraint("domain_name_key", ["name"]); |
||||
|
||||
=head1 RELATIONS |
||||
|
||||
=head2 blogs |
||||
|
||||
Type: has_many |
||||
|
||||
Related object: L<MJB::DB::Result::Blog> |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->has_many( |
||||
"blogs", |
||||
"MJB::DB::Result::Blog", |
||||
{ "foreign.domain_id" => "self.id" }, |
||||
{ cascade_copy => 0, cascade_delete => 0 }, |
||||
); |
||||
|
||||
=head2 person |
||||
|
||||
Type: belongs_to |
||||
|
||||
Related object: L<MJB::DB::Result::Person> |
||||
|
||||
=cut |
||||
|
||||
__PACKAGE__->belongs_to( |
||||
"person", |
||||
"MJB::DB::Result::Person", |
||||
{ id => "person_id" }, |
||||
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, |
||||
); |
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-07 05:14:59 |
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:J/Y4weagD34GOj8npijaUg |
||||
|
||||
|
||||
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
||||
1; |
||||
Loading…
Reference in new issue