Add as_hashref to DB RS.

master
Manager Bot 3 years ago
parent b0b4dd5c71
commit f4cc028789
  1. 10
      DB/lib/MJB/DB/Result/AdminJob.pm
  2. 12
      DB/lib/MJB/DB/Result/AuthPassword.pm
  3. 12
      DB/lib/MJB/DB/Result/AuthToken.pm
  4. 12
      DB/lib/MJB/DB/Result/BasicAuth.pm
  5. 19
      DB/lib/MJB/DB/Result/Blog.pm
  6. 12
      DB/lib/MJB/DB/Result/Domain.pm
  7. 12
      DB/lib/MJB/DB/Result/HostedDomain.pm
  8. 12
      DB/lib/MJB/DB/Result/Invite.pm
  9. 10
      DB/lib/MJB/DB/Result/Job.pm
  10. 15
      DB/lib/MJB/DB/Result/Person.pm
  11. 14
      DB/lib/MJB/DB/Result/PersonNote.pm
  12. 12
      DB/lib/MJB/DB/Result/PersonSetting.pm
  13. 13
      DB/lib/MJB/DB/Result/Repo.pm
  14. 10
      DB/lib/MJB/DB/Result/Server.pm
  15. 13
      DB/lib/MJB/DB/Result/SshKey.pm
  16. 12
      DB/lib/MJB/DB/Result/SystemNote.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;

@ -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 );

@ -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;

@ -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;

@ -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 ) = @_;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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 {

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

Loading…
Cancel
Save