summary refs log tree commit diff
path: root/lib/Lifestream/Schema/Result/Entry.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Lifestream/Schema/Result/Entry.pm')
-rw-r--r--lib/Lifestream/Schema/Result/Entry.pm34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/Lifestream/Schema/Result/Entry.pm b/lib/Lifestream/Schema/Result/Entry.pm
new file mode 100644
index 0000000..43013c5
--- /dev/null
+++ b/lib/Lifestream/Schema/Result/Entry.pm
@@ -0,0 +1,34 @@
+package Lifestream::Schema::Result::Entry;
+use base qw/DBIx::Class/;
+
+__PACKAGE__->load_components(qw/Core/);
+__PACKAGE__->table('entry');
+__PACKAGE__->add_columns(
+    id => {
+        data_type   => "varchar",
+        is_nullable => 0,
+    },
+    permalink => {
+        data_type   => "varchar",
+        is_nullable => 0,
+    },
+    feedid => {
+        data_type   => "integer",
+        is_nullable => 0,
+    },
+    date => {
+        data_type   => "date",
+        is_nullable => 0,
+    },
+    title => {
+        data_type   => "text",
+        is_nullable => 0,
+    },
+);
+__PACKAGE__->set_primary_key('id');
+__PACKAGE__->belongs_to(
+    feed => 'Lifestream::Schema::Result::Feed',
+    'feedid'
+);
+
+1;