package Platform::Event;
use strict;
use warnings;
use base 'Platform::DBI';

__PACKAGE__->table('event');
__PACKAGE__->sequence('event_event_seq');
__PACKAGE__->columns( Primary => 'event' );
__PACKAGE__->columns( Essential => qw / 
  datetime
  webinar_link
  webinar_username
  webinar_password
  phone
/ );

__PACKAGE__->has_a( datetime => 'Class::Date' );

sub arrival_datetime {
  my ($event) = @_;

  return $event->datetime - '30m';
}

sub end_datetime {
  my ($event) = @_;

  return $event->datetime + '2h';
}