package App::IdiotBox::Video;

use Moo;

sub fields { return qw(slug bucket_slug name author details announcement_id) }

sub slug { shift->{slug} }
sub name { shift->{name} }
sub author { shift->{author} }
sub details { shift->{details} }
sub bucket { shift->{bucket} }
sub file_name {
  (my $s = join(' ', @{+shift}{qw(author name)})) =~ s/ /-/g;
  $s;
}
sub url_path {
  join('/', $_[0]->bucket->slug, $_[0]->slug);
}

1;
