The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
package TestApp::Schema::Result::Stations;
use base 'DBIx::Class';
use strict;
use warnings;

__PACKAGE__->load_components('Core');
__PACKAGE__->table('Station');
__PACKAGE__->add_columns(qw/ id bill ted /);
__PACKAGE__->set_primary_key('id');

sub TO_JSON {
   my $self = shift;
   return { map { $_ => $self->$_ } qw{id bill} };
}
1;