diff --git a/DB/lib/MJB/DB/Result/AdminJob.pm b/DB/lib/MJB/DB/Result/AdminJob.pm index daaafb9..925854c 100644 --- a/DB/lib/MJB/DB/Result/AdminJob.pm +++ b/DB/lib/MJB/DB/Result/AdminJob.pm @@ -91,6 +91,14 @@ __PACKAGE__->set_primary_key("id"); # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-09 14:53:07 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cBdbwYX0+0iPbxVol0Iskg +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + minion_job_id => $self->minion_job_id, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/DB/lib/MJB/DB/Result/AuthPassword.pm b/DB/lib/MJB/DB/Result/AuthPassword.pm index 4d62c21..c04ac4d 100644 --- a/DB/lib/MJB/DB/Result/AuthPassword.pm +++ b/DB/lib/MJB/DB/Result/AuthPassword.pm @@ -123,6 +123,18 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-07 02:12:13 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:y9fTRaD/zpn3Z+KL3HZv1Q +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + person_id => $self->person_id, + password => $self->password, + salt => $self->salt, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} + __PACKAGE__->set_primary_key('person_id'); use Crypt::Eksblowfish::Bcrypt qw( bcrypt_hash en_base64 de_base64 ); diff --git a/DB/lib/MJB/DB/Result/AuthToken.pm b/DB/lib/MJB/DB/Result/AuthToken.pm index 063cdc9..a26ac9c 100644 --- a/DB/lib/MJB/DB/Result/AuthToken.pm +++ b/DB/lib/MJB/DB/Result/AuthToken.pm @@ -123,6 +123,16 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-07 02:12:13 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QswwNuQ8rXDUWbDi3kaEYA +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + person_id => $self->person_id, + scope => $self->scope, + token => $self->token, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/DB/lib/MJB/DB/Result/BasicAuth.pm b/DB/lib/MJB/DB/Result/BasicAuth.pm index e8b3867..809ec61 100644 --- a/DB/lib/MJB/DB/Result/BasicAuth.pm +++ b/DB/lib/MJB/DB/Result/BasicAuth.pm @@ -138,6 +138,16 @@ __PACKAGE__->has_many( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-15 21:45:36 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1LtVymHyzVae3ckPba5ROA +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + person_id => $self->person_id, + username => $self->username, + password => $self->password, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/DB/lib/MJB/DB/Result/Blog.pm b/DB/lib/MJB/DB/Result/Blog.pm index ad8377b..763485f 100644 --- a/DB/lib/MJB/DB/Result/Blog.pm +++ b/DB/lib/MJB/DB/Result/Blog.pm @@ -233,6 +233,25 @@ __PACKAGE__->has_many( use DateTime; +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + person_id => $self->person_id, + domain_id => $self->domain_id, + max_static_file_count => $self->max_static_file_count, + max_static_file_size => $self->max_static_file_size, + max_static_webroot_size => $self->max_static_webroot_size, + minutes_wait_after_build => $self->minutes_wait_after_build, + builds_per_hour => $self->builds_per_hour, + builds_per_day => $self->builds_per_day, + build_priority => $self->build_priority, + is_enabled => $self->is_enabled, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} + sub repo { my ( $self ) = @_; diff --git a/DB/lib/MJB/DB/Result/Domain.pm b/DB/lib/MJB/DB/Result/Domain.pm index fd85def..cdff49e 100644 --- a/DB/lib/MJB/DB/Result/Domain.pm +++ b/DB/lib/MJB/DB/Result/Domain.pm @@ -152,6 +152,16 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-06 19:24:12 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:agNtunaurulCvfqzy39meg +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + person_id => $self->person_id, + name => $self->name, + ssl => $self->ssl, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/DB/lib/MJB/DB/Result/HostedDomain.pm b/DB/lib/MJB/DB/Result/HostedDomain.pm index c8254df..a664e71 100644 --- a/DB/lib/MJB/DB/Result/HostedDomain.pm +++ b/DB/lib/MJB/DB/Result/HostedDomain.pm @@ -113,6 +113,16 @@ __PACKAGE__->set_primary_key("id"); # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-04 18:27:03 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Jn80IGZYKR1o1cMoeUGPYQ +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + name => $self->name, + letsencrypt_challenge => $self->letsencrypt_challenge, + letsencrypt_dns_auth => $self->letsencrypt_dns_auth, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/DB/lib/MJB/DB/Result/Invite.pm b/DB/lib/MJB/DB/Result/Invite.pm index f764ad4..b60bc2e 100644 --- a/DB/lib/MJB/DB/Result/Invite.pm +++ b/DB/lib/MJB/DB/Result/Invite.pm @@ -107,6 +107,16 @@ __PACKAGE__->set_primary_key("id"); # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-09 15:14:54 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fKY1dtin3SHa2Elljm4C9Q +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + code => $self->code, + is_active => $self->is_active, + is_one_time_use => $self->is_one_time_use, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/DB/lib/MJB/DB/Result/Job.pm b/DB/lib/MJB/DB/Result/Job.pm index 85049ec..a8b66d8 100644 --- a/DB/lib/MJB/DB/Result/Job.pm +++ b/DB/lib/MJB/DB/Result/Job.pm @@ -116,6 +116,14 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-09 14:53:07 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pe81AkUx/77N6bBy1hrx0g +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + minion_job_id => $self->minion_job_id, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/DB/lib/MJB/DB/Result/Person.pm b/DB/lib/MJB/DB/Result/Person.pm index e4d711c..83861e9 100644 --- a/DB/lib/MJB/DB/Result/Person.pm +++ b/DB/lib/MJB/DB/Result/Person.pm @@ -280,6 +280,21 @@ __PACKAGE__->has_many( # Created by DBIx::Class::Schema::Loader v0.07051 @ 2022-11-30 08:15:37 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Qd7nLf0vOON2dDPyaISk8g +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + name => $self->name, + email => $self->email, + stripe_customer_id => $self->stripe_customer_id, + is_subscribed => $self->is_subscribed, + is_enabled => $self->is_enabled, + is_admin => $self->is_admin, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} + use Data::GUID; sub setting { diff --git a/DB/lib/MJB/DB/Result/PersonNote.pm b/DB/lib/MJB/DB/Result/PersonNote.pm index bfa6069..7e68462 100644 --- a/DB/lib/MJB/DB/Result/PersonNote.pm +++ b/DB/lib/MJB/DB/Result/PersonNote.pm @@ -139,6 +139,18 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-09 15:14:54 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mKX96r3xdfqqYNDSro14Hg +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + person_id => $self->person_id, + person => { name => $self->person->name }, + source_id => $self->source_id, + source => { name => $self->source->name }, + content => $self->content, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/DB/lib/MJB/DB/Result/PersonSetting.pm b/DB/lib/MJB/DB/Result/PersonSetting.pm index 74eac5a..6e11432 100644 --- a/DB/lib/MJB/DB/Result/PersonSetting.pm +++ b/DB/lib/MJB/DB/Result/PersonSetting.pm @@ -146,6 +146,16 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-07 02:12:13 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:up8WXyHIVQXePFBYFKs5xA +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + person_id => $self->person_id, + name => $self->name, + value => $self->value, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/DB/lib/MJB/DB/Result/Repo.pm b/DB/lib/MJB/DB/Result/Repo.pm index de95238..9884e88 100644 --- a/DB/lib/MJB/DB/Result/Repo.pm +++ b/DB/lib/MJB/DB/Result/Repo.pm @@ -177,6 +177,17 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-15 21:45:36 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1W7mgkNfoG1qrxdg7YXdrw +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + blog_id => $self->blog_id, + url => $self->url, + basic_auth_id => $self->basic_auth_id, + ssh_key_id => $self->ssh_key_id, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/DB/lib/MJB/DB/Result/Server.pm b/DB/lib/MJB/DB/Result/Server.pm index c892d66..59e99c4 100644 --- a/DB/lib/MJB/DB/Result/Server.pm +++ b/DB/lib/MJB/DB/Result/Server.pm @@ -91,6 +91,14 @@ __PACKAGE__->set_primary_key("id"); # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-11 23:08:18 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KSkwM+UHx71G+b9pjhEuZQ +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + hostname => $self->hostname, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/DB/lib/MJB/DB/Result/SshKey.pm b/DB/lib/MJB/DB/Result/SshKey.pm index 49e547f..9c1f72f 100644 --- a/DB/lib/MJB/DB/Result/SshKey.pm +++ b/DB/lib/MJB/DB/Result/SshKey.pm @@ -145,6 +145,17 @@ __PACKAGE__->has_many( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-15 21:45:36 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qYPaCRZsz0cOc6HtKnK4Rw +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + person_id => $self->person_id, + title => $self->title, + public_key => $self->public_key, + private_key => $self->private_key, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/DB/lib/MJB/DB/Result/SystemNote.pm b/DB/lib/MJB/DB/Result/SystemNote.pm index b602740..c96ccc3 100644 --- a/DB/lib/MJB/DB/Result/SystemNote.pm +++ b/DB/lib/MJB/DB/Result/SystemNote.pm @@ -106,6 +106,16 @@ __PACKAGE__->set_primary_key("id"); # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-09 15:14:54 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zJbvo73sRKwhcGgq5h4TYw +sub as_hashref { + my ( $self ) = @_; + + return +{ + id => $self->id, + is_read => $self->is_read, + source => $self->source, + content => $self->content, + created_at => $self->created_at->strftime( '%F %T' ), + }; +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1;