]> git.ktnx.net Git - lsl.git/blob - lib/App/LazyShoppingList/Schema/Result/ShoppingListItem.pm
first take at a Dancer2 app, some functions work
[lsl.git] / lib / App / LazyShoppingList / Schema / Result / ShoppingListItem.pm
1 use v5.28;
2 use warnings;
3 use utf8;
4
5 package App::LazyShoppingList::Schema::Result::ShoppingListItem;
6
7 use parent qw( DBIx::Class::Core );
8
9 __PACKAGE__->table('shopping_list_items');
10
11 __PACKAGE__->add_columns(
12     id => {
13         data_type => 'integer',
14         is_auto_increment => 1,
15     },
16     shopping_list => {
17         data_type => 'integer',
18     },
19     description => {
20         data_type => 'text',
21     },
22     done => {
23         data_type => 'boolean',
24     },
25     version  => {
26         data_type => 'integer',
27     },
28 );
29
30 __PACKAGE__->set_primary_key('id');
31
32 __PACKAGE__->belongs_to( shopping_list =>
33         'App::LazyShoppingList::Schema::Result::ShoppingList' =>
34         'shopping_list' );
35
36 1;