package myHive::Model::PestControl;
use Moose;
use namespace::autoclean;

extends 'Catalyst::Model';

=head1 NAME

myHive::Model::PestControl - Catalyst Model

=head1 DESCRIPTION

Catalyst Model.

=head1 AUTHOR

root

=head1 LICENSE

This library is free software. You can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

has 'account'   => ( is => 'rw', isa => 'Int',  default => 0 );
has 'id'        => ( is => 'rw', isa => 'Int',  default => 0 );
has 'name'      => ( is => 'rw', isa => 'Str'   );
has 'updated'   => ( is => 'rw', isa => 'DateTime', default => sub {  return  DateTime->now( time_zone => 'UTC' ); });

sub lastUpdated {
        my ( $self ) = @_;
        my $year  = $self->updated->year;
        my $month = $self->updated->month;
        my $day = $self->updated->day;
        return qq{${year}-${month}-${day}};

}





__PACKAGE__->meta->make_immutable;

1;
