]> git.ktnx.net Git - lsl.git/blobdiff - lib/App/LazyShoppingList/Schema/Result/ShoppingList.pm
first take at a Dancer2 app, some functions work
[lsl.git] / lib / App / LazyShoppingList / Schema / Result / ShoppingList.pm
diff --git a/lib/App/LazyShoppingList/Schema/Result/ShoppingList.pm b/lib/App/LazyShoppingList/Schema/Result/ShoppingList.pm
new file mode 100644 (file)
index 0000000..bc8784e
--- /dev/null
@@ -0,0 +1,25 @@
+use v5.28;
+use warnings;
+use utf8;
+
+package App::LazyShoppingList::Schema::Result::ShoppingList;
+
+use parent qw( DBIx::Class::Core );
+
+__PACKAGE__->table('shopping_lists');
+
+__PACKAGE__->add_columns(
+    id => { data_type => 'integer',
+        is_auto_increment => 1,
+    },
+    name => { data_type => 'text' },
+    version => { data_type => 'integer' },
+);
+
+__PACKAGE__->set_primary_key('id');
+
+__PACKAGE__->has_many(
+    items => 'App::LazyShoppingList::Schema::Result::ShoppingListItem' =>
+        'shopping_list' );
+
+1;