]> git.ktnx.net Git - lsl.git/blob - 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
1 use v5.28;
2 use warnings;
3 use utf8;
4
5 package App::LazyShoppingList::Schema::Result::ShoppingList;
6
7 use parent qw( DBIx::Class::Core );
8
9 __PACKAGE__->table('shopping_lists');
10
11 __PACKAGE__->add_columns(
12     id => { data_type => 'integer',
13         is_auto_increment => 1,
14     },
15     name => { data_type => 'text' },
16     version => { data_type => 'integer' },
17 );
18
19 __PACKAGE__->set_primary_key('id');
20
21 __PACKAGE__->has_many(
22     items => 'App::LazyShoppingList::Schema::Result::ShoppingListItem' =>
23         'shopping_list' );
24
25 1;