summaryrefslogtreecommitdiff
path: root/lib/DeWeave/BO/History.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DeWeave/BO/History.pm')
-rw-r--r--lib/DeWeave/BO/History.pm49
1 files changed, 49 insertions, 0 deletions
diff --git a/lib/DeWeave/BO/History.pm b/lib/DeWeave/BO/History.pm
new file mode 100644
index 0000000..3e9040e
--- /dev/null
+++ b/lib/DeWeave/BO/History.pm
@@ -0,0 +1,49 @@
+package DeWeave::BO::History;
+use Moose;
+use namespace::autoclean;
+use MooseX::Types::Moose qw(Str ArrayRef Int);
+use MooseX::Types::Structured qw(Dict);
+
+extends 'DeWeave::EDO';
+
+has histUri => (
+ isa => Str,
+ required => 1,
+ is => 'ro',
+);
+
+has title => (
+ isa => Str,
+ required => 0,
+ is => 'ro',
+);
+
+has visits => (
+ isa => ArrayRef[Dict[date => Int, type => Int]],
+ required => 1,
+ is => 'ro',
+);
+
+{
+my @visit_types=(
+ undef,
+ 'link',
+ 'typed',
+ 'bookmark',
+ 'embed',
+ 'redirect_permanent',
+ 'redirect_temporary',
+ 'download',
+ 'framed_link',
+);
+sub visit_type {
+ my ($self,$type_int) = @_;
+
+ if ($type_int > 0 && $type_int < @visit_types) {
+ return $visit_types[$type_int];
+ }
+ return undef;
+}
+}
+
+1;